Changeset 37050 in webkit for trunk/JavaScriptCore/VM/CodeGenerator.cpp
- Timestamp:
- Sep 28, 2008, 8:04:08 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/VM/CodeGenerator.cpp
r36976 r37050 293 293 codeBlock->globalData = m_globalData; 294 294 295 bool usesArguments = functionBody->usesArguments(); 296 295 297 const Node::FunctionStack& functionStack = functionBody->functionStack(); 296 298 for (size_t i = 0; i < functionStack.size(); ++i) { 297 299 FuncDeclNode* funcDecl = functionStack[i].get(); 298 300 const Identifier& ident = funcDecl->m_ident; 299 301 if (ident == propertyNames().arguments) 302 usesArguments = true; 300 303 m_functions.add(ident.ustring().rep()); 301 304 emitNewFunction(addVar(ident, false), funcDecl); … … 305 308 for (size_t i = 0; i < varStack.size(); ++i) { 306 309 const Identifier& ident = varStack[i].first; 307 if (ident == propertyNames().arguments) 310 if (ident == propertyNames().arguments) { 311 usesArguments = true; 308 312 continue; 313 } 309 314 addVar(ident, varStack[i].second & DeclarationStacks::IsConstant); 315 } 316 317 if (usesArguments) { 318 emitOpcode(op_init_arguments); 319 m_codeBlock->needsFullScopeChain = true; 320 m_argumentsRegister.setIndex(RegisterFile::OptionalCalleeArguments); 321 symbolTable->add(propertyNames().arguments.ustring().rep(), SymbolTableEntry(RegisterFile::OptionalCalleeArguments)); 310 322 } 311 323 … … 367 379 RegisterID* CodeGenerator::registerFor(const Identifier& ident) 368 380 { 369 if (m_codeType == FunctionCode && ident == propertyNames().arguments)370 m_codeBlock->needsFullScopeChain = true;371 372 381 if (ident == propertyNames().thisIdentifier) 373 382 return &m_thisRegister;
Note:
See TracChangeset
for help on using the changeset viewer.