Changeset 153763 in webkit for trunk/Source/JavaScriptCore/bytecompiler
- Timestamp:
- Aug 6, 2013, 2:20:10 PM (12 years ago)
- Location:
- trunk/Source/JavaScriptCore/bytecompiler
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp
r153477 r153763 239 239 emitInitLazyRegister(unmodifiedArgumentsRegister); 240 240 241 if ( m_codeBlock->isStrictMode()) {241 if (shouldTearOffArgumentsEagerly()) { 242 242 emitOpcode(op_create_arguments); 243 243 instructions().append(argumentsRegister->index()); … … 269 269 } 270 270 271 if (capturesAnyArgumentByName && ! codeBlock->isStrictMode()) {271 if (capturesAnyArgumentByName && !shouldTearOffArgumentsEagerly()) { 272 272 size_t parameterCount = m_symbolTable->parameterCount(); 273 273 OwnArrayPtr<SlowArgument> slowArguments = adoptArrayPtr(new SlowArgument[parameterCount]); … … 1560 1560 return; 1561 1561 1562 // If we're in strict mode we tear off the arguments on function 1563 // entry, so there's no need to check if we need to create them 1564 // now 1565 if (m_codeBlock->isStrictMode()) 1562 if (shouldTearOffArgumentsEagerly()) 1566 1563 return; 1567 1564 … … 1750 1747 } 1751 1748 1752 if (m_codeBlock->usesArguments() && m_codeBlock->numParameters() != 1 && ! m_codeBlock->isStrictMode()) {1749 if (m_codeBlock->usesArguments() && m_codeBlock->numParameters() != 1 && !isStrictMode()) { 1753 1750 emitOpcode(op_tear_off_arguments); 1754 1751 instructions().append(m_codeBlock->argumentsRegister()); -
trunk/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h
r153477 r153763 555 555 } 556 556 557 bool shouldTearOffArgumentsEagerly() 558 { 559 return m_codeType == FunctionCode && isStrictMode() && m_scopeNode->modifiesParameter(); 560 } 561 557 562 RegisterID* emitThrowExpressionTooDeepException(); 558 563
Note:
See TracChangeset
for help on using the changeset viewer.