Changeset 249418 in webkit
- Timestamp:
- Sep 3, 2019 12:26:55 AM (5 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r249372 r249418 1 2019-09-03 Yusuke Suzuki <ysuzuki@apple.com> 2 3 [JSC] Remove BytecodeGenerator::emitPopScope 4 https://bugs.webkit.org/show_bug.cgi?id=201395 5 6 Reviewed by Saam Barati. 7 8 Use emitGetParentScope. And this patch also removes several unnecessary mov bytecode emissions. 9 10 * bytecompiler/BytecodeGenerator.cpp: 11 (JSC::BytecodeGenerator::popLexicalScopeInternal): 12 (JSC::BytecodeGenerator::prepareLexicalScopeForNextForLoopIteration): 13 (JSC::BytecodeGenerator::emitPopWithScope): 14 (JSC::BytecodeGenerator::emitPopScope): Deleted. 15 * bytecompiler/BytecodeGenerator.h: 16 1 17 2019-09-01 Yusuke Suzuki <ysuzuki@apple.com> 2 18 -
trunk/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp
r249372 r249418 2220 2220 if (hasCapturedVariables) { 2221 2221 RELEASE_ASSERT(stackEntry.m_scope); 2222 emit PopScope(scopeRegister(), stackEntry.m_scope);2222 emitGetParentScope(scopeRegister(), stackEntry.m_scope); 2223 2223 popLocalControlFlowScope(); 2224 2224 stackEntry.m_scope->deref(); … … 2278 2278 // the assumption that the scope's register index is constant even 2279 2279 // though the value in that register will change on each loop iteration. 2280 RefPtr<RegisterID> parentScope = emitGetParentScope(newTemporary(), loopScope); 2281 move(scopeRegister(), parentScope.get()); 2280 emitGetParentScope(scopeRegister(), loopScope); 2282 2281 2283 2282 OpCreateLexicalEnvironment::emit(this, loopScope, scopeRegister(), loopSymbolTable, addConstantValue(jsTDZValue())); … … 3512 3511 } 3513 3512 3514 void BytecodeGenerator::emitPopScope(RegisterID* dst, RegisterID* scope)3515 {3516 RefPtr<RegisterID> parentScope = emitGetParentScope(newTemporary(), scope);3517 move(dst, parentScope.get());3518 }3519 3520 3513 void BytecodeGenerator::emitPopWithScope() 3521 3514 { 3522 emit PopScope(scopeRegister(), scopeRegister());3515 emitGetParentScope(scopeRegister(), scopeRegister()); 3523 3516 popLocalControlFlowScope(); 3524 3517 auto stackEntry = m_lexicalScopeStack.takeLast(); -
trunk/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h
r249372 r249418 1019 1019 bool instantiateLexicalVariables(const VariableEnvironment&, SymbolTable*, ScopeRegisterType, LookUpVarKindFunctor); 1020 1020 void emitPrefillStackTDZVariables(const VariableEnvironment&, SymbolTable*); 1021 void emitPopScope(RegisterID* dst, RegisterID* scope);1022 1021 RegisterID* emitGetParentScope(RegisterID* dst, RegisterID* scope); 1023 1022 void emitPushFunctionNameScope(const Identifier& property, RegisterID* value, bool isCaptured);
Note: See TracChangeset
for help on using the changeset viewer.