Changeset 37366 in webkit for trunk/JavaScriptCore/VM/CodeGenerator.cpp
- Timestamp:
- Oct 6, 2008, 8:53:47 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/VM/CodeGenerator.cpp
r37324 r37366 288 288 m_codeBlock->needsFullScopeChain = true; 289 289 290 if (m_codeBlock->needsFullScopeChain)291 emitOpcode(op_enter_with_activation);292 else293 emitOpcode(op_enter);294 295 290 codeBlock->globalData = m_globalData; 296 291 … … 298 293 codeBlock->usesArguments = usesArguments; 299 294 if (usesArguments) { 300 emitOpcode(op_create_arguments);301 295 m_argumentsRegister.setIndex(RegisterFile::OptionalCalleeArguments); 302 296 addVar(propertyNames().arguments, false); 303 297 } 298 299 if (m_codeBlock->needsFullScopeChain) { 300 ++m_codeBlock->numVars; 301 m_activationRegisterIndex = newRegister()->index(); 302 emitOpcode(op_enter_with_activation); 303 instructions().append(m_activationRegisterIndex); 304 } else 305 emitOpcode(op_enter); 306 307 if (usesArguments) 308 emitOpcode(op_create_arguments); 304 309 305 310 const Node::FunctionStack& functionStack = functionBody->functionStack(); … … 1161 1166 RegisterID* CodeGenerator::emitReturn(RegisterID* src) 1162 1167 { 1163 if (m_codeBlock->needsFullScopeChain) 1168 if (m_codeBlock->needsFullScopeChain) { 1164 1169 emitOpcode(op_tear_off_activation); 1165 else if (m_codeBlock->usesArguments) 1170 instructions().append(m_activationRegisterIndex); 1171 } else if (m_codeBlock->usesArguments) 1166 1172 emitOpcode(op_tear_off_arguments); 1167 1173
Note:
See TracChangeset
for help on using the changeset viewer.