Changeset 61588 in webkit for trunk/JavaScriptCore/runtime/Executable.cpp
- Timestamp:
- Jun 21, 2010, 4:17:48 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/runtime/Executable.cpp
r60762 r61588 120 120 } 121 121 122 voidFunctionExecutable::compileForCall(ExecState*, ScopeChainNode* scopeChainNode)122 bool FunctionExecutable::compileForCall(ExecState*, ScopeChainNode* scopeChainNode) 123 123 { 124 124 JSGlobalData* globalData = scopeChainNode->globalData; 125 125 RefPtr<FunctionBodyNode> body = globalData->parser->parse<FunctionBodyNode>(globalData, 0, 0, m_source); 126 if (!body) 127 return false; 126 128 if (m_forceUsesArguments) 127 129 body->setUsesArguments(); … … 142 144 143 145 body->destroyData(); 144 } 145 146 void FunctionExecutable::compileForConstruct(ExecState*, ScopeChainNode* scopeChainNode) 146 return true; 147 } 148 149 bool FunctionExecutable::compileForConstruct(ExecState*, ScopeChainNode* scopeChainNode) 147 150 { 148 151 JSGlobalData* globalData = scopeChainNode->globalData; 149 152 RefPtr<FunctionBodyNode> body = globalData->parser->parse<FunctionBodyNode>(globalData, 0, 0, m_source); 153 if (!body) 154 return false; 150 155 if (m_forceUsesArguments) 151 156 body->setUsesArguments(); … … 166 171 167 172 body->destroyData(); 173 return true; 168 174 } 169 175 … … 194 200 void FunctionExecutable::generateJITCodeForCall(ExecState* exec, ScopeChainNode* scopeChainNode) 195 201 { 196 CodeBlock* codeBlock = &bytecodeForCall(exec, scopeChainNode);202 CodeBlock* codeBlock = bytecodeForCall(exec, scopeChainNode); 197 203 m_jitCodeForCall = JIT::compile(scopeChainNode->globalData, codeBlock, &m_jitCodeForCallWithArityCheck); 198 204 … … 205 211 void FunctionExecutable::generateJITCodeForConstruct(ExecState* exec, ScopeChainNode* scopeChainNode) 206 212 { 207 CodeBlock* codeBlock = &bytecodeForConstruct(exec, scopeChainNode);213 CodeBlock* codeBlock = bytecodeForConstruct(exec, scopeChainNode); 208 214 m_jitCodeForConstruct = JIT::compile(scopeChainNode->globalData, codeBlock, &m_jitCodeForConstructWithArityCheck); 209 215 … … 227 233 { 228 234 RefPtr<FunctionBodyNode> newFunctionBody = globalData->parser->parse<FunctionBodyNode>(globalData, 0, 0, m_source); 235 if (!newFunctionBody) 236 return 0; 229 237 if (m_forceUsesArguments) 230 238 newFunctionBody->setUsesArguments(); … … 256 264 { 257 265 RefPtr<EvalNode> newEvalBody = globalData->parser->parse<EvalNode>(globalData, 0, 0, m_source); 266 if (!newEvalBody) 267 return 0; 258 268 259 269 ScopeChain scopeChain(scopeChainNode);
Note:
See TracChangeset
for help on using the changeset viewer.