Changeset 175998 in webkit
- Timestamp:
- Nov 11, 2014, 6:33:43 PM (12 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 8 edited
-
ChangeLog (modified) (1 diff)
-
jit/JIT.h (modified) (2 diffs)
-
jit/JITInlines.h (modified) (1 diff)
-
jit/JITOperations.cpp (modified) (1 diff)
-
jit/JITOperations.h (modified) (1 diff)
-
jit/JITPropertyAccess.cpp (modified) (4 diffs)
-
jit/JITPropertyAccess32_64.cpp (modified) (4 diffs)
-
llint/LLIntSlowPaths.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r175993 r175998 1 2014-11-11 Michael Saboff <msaboff@apple.com> 2 3 Use scope register when processing op_resolve_scope in LLInt and Baseline JIT 4 https://bugs.webkit.org/show_bug.cgi?id=138637 5 6 Reviewed by Mark Lam. 7 8 Filled out op_resolve_scope processing to use the scope operand to access the current 9 scope chain. 10 11 * jit/JIT.h: 12 * jit/JITInlines.h: 13 (JSC::JIT::callOperation): 14 * jit/JITOperations.cpp: 15 * jit/JITOperations.h: 16 Added scope virtual register parameter to emitResolveClosure(). Added new callOperation() to 17 support the additional argument. 18 19 * jit/JITPropertyAccess.cpp: 20 (JSC::JIT::emitResolveClosure): 21 (JSC::JIT::emit_op_resolve_scope): 22 (JSC::JIT::emitSlow_op_resolve_scope): 23 * jit/JITPropertyAccess32_64.cpp: 24 (JSC::JIT::emitResolveClosure): 25 (JSC::JIT::emit_op_resolve_scope): 26 (JSC::JIT::emitSlow_op_resolve_scope): 27 * llint/LLIntSlowPaths.cpp: 28 (JSC::LLInt::LLINT_SLOW_PATH_DECL): 29 Added "scope" parameter to emitResolveClosure(). Passed scope register index to slow path. 30 Used scope virtual register instead of JSStack::ScopeChain. 31 1 32 2014-11-11 Joseph Pecoraro <pecoraro@apple.com> 2 33 -
trunk/Source/JavaScriptCore/jit/JIT.h
r175762 r175998 626 626 627 627 void emitVarInjectionCheck(bool needsVarInjectionChecks); 628 void emitResolveClosure(int dst, bool needsVarInjectionChecks, unsigned depth);628 void emitResolveClosure(int dst, int scope, bool needsVarInjectionChecks, unsigned depth); 629 629 void emitLoadWithStructureCheck(int scope, Structure** structureSlot); 630 630 void emitGetGlobalProperty(uintptr_t* operandSlot); … … 706 706 MacroAssembler::Call callOperation(WithProfileTag, J_JITOperation_EPc, int, Instruction*); 707 707 MacroAssembler::Call callOperation(J_JITOperation_EZ, int, int32_t); 708 MacroAssembler::Call callOperation(J_JITOperation_EZZ, int, int32_t, int32_t); 708 709 MacroAssembler::Call callOperation(P_JITOperation_EJS, GPRReg, size_t); 709 710 MacroAssembler::Call callOperation(S_JITOperation_ECC, RegisterID, RegisterID); -
trunk/Source/JavaScriptCore/jit/JITInlines.h
r175766 r175998 277 277 } 278 278 279 ALWAYS_INLINE MacroAssembler::Call JIT::callOperation(J_JITOperation_EZZ operation, int dst, int32_t arg1, int32_t arg2) 280 { 281 setupArgumentsWithExecState(TrustedImm32(arg1), TrustedImm32(arg2)); 282 return appendCallWithExceptionCheckSetJSValueResult(operation, dst); 283 } 284 279 285 ALWAYS_INLINE MacroAssembler::Call JIT::callOperation(S_JITOperation_ECC operation, RegisterID regOp1, RegisterID regOp2) 280 286 { -
trunk/Source/JavaScriptCore/jit/JITOperations.cpp
r175762 r175998 1719 1719 } 1720 1720 1721 EncodedJSValue JIT_OPERATION operationResolveScope(ExecState* exec, int32_t identifierIndex)1721 EncodedJSValue JIT_OPERATION operationResolveScope(ExecState* exec, int32_t scopeReg, int32_t identifierIndex) 1722 1722 { 1723 1723 VM& vm = exec->vm(); 1724 1724 NativeCallFrameTracer tracer(&vm, exec); 1725 1725 const Identifier& ident = exec->codeBlock()->identifier(identifierIndex); 1726 return JSValue::encode(JSScope::resolve(exec, exec->scope(), ident)); 1726 JSScope* scope = exec->uncheckedR(scopeReg).Register::scope(); 1727 return JSValue::encode(JSScope::resolve(exec, scope, ident)); 1727 1728 } 1728 1729 -
trunk/Source/JavaScriptCore/jit/JITOperations.h
r175762 r175998 311 311 char* JIT_OPERATION operationSwitchImmWithUnknownKeyType(ExecState*, EncodedJSValue key, size_t tableIndex) WTF_INTERNAL; 312 312 char* JIT_OPERATION operationSwitchStringWithUnknownKeyType(ExecState*, EncodedJSValue key, size_t tableIndex) WTF_INTERNAL; 313 EncodedJSValue JIT_OPERATION operationResolveScope(ExecState*, int32_t identifierIndex) WTF_INTERNAL;313 EncodedJSValue JIT_OPERATION operationResolveScope(ExecState*, int32_t scope, int32_t identifierIndex) WTF_INTERNAL; 314 314 EncodedJSValue JIT_OPERATION operationGetFromScope(ExecState*, Instruction* bytecodePC) WTF_INTERNAL; 315 315 void JIT_OPERATION operationPutToScope(ExecState*, Instruction* bytecodePC) WTF_INTERNAL; -
trunk/Source/JavaScriptCore/jit/JITPropertyAccess.cpp
r175593 r175998 591 591 } 592 592 593 void JIT::emitResolveClosure(int dst, bool needsVarInjectionChecks, unsigned depth)593 void JIT::emitResolveClosure(int dst, int scope, bool needsVarInjectionChecks, unsigned depth) 594 594 { 595 595 emitVarInjectionCheck(needsVarInjectionChecks); 596 emitGetVirtualRegister( JSStack::ScopeChain, regT0);596 emitGetVirtualRegister(scope, regT0); 597 597 for (unsigned i = 0; i < depth; ++i) 598 598 loadPtr(Address(regT0, JSScope::offsetOfNext()), regT0); … … 603 603 { 604 604 int dst = currentInstruction[1].u.operand; 605 int scope = currentInstruction[2].u.operand; 605 606 ResolveType resolveType = static_cast<ResolveType>(currentInstruction[4].u.operand); 606 607 unsigned depth = currentInstruction[5].u.operand; … … 617 618 case ClosureVar: 618 619 case ClosureVarWithVarInjectionChecks: 619 emitResolveClosure(dst, needsVarInjectionChecks(resolveType), depth);620 emitResolveClosure(dst, scope, needsVarInjectionChecks(resolveType), depth); 620 621 break; 621 622 case Dynamic: … … 636 637 637 638 linkSlowCase(iter); 639 int32_t scope = currentInstruction[2].u.operand; 638 640 int32_t indentifierIndex = currentInstruction[3].u.operand; 639 callOperation(operationResolveScope, dst, indentifierIndex);641 callOperation(operationResolveScope, dst, scope, indentifierIndex); 640 642 } 641 643 -
trunk/Source/JavaScriptCore/jit/JITPropertyAccess32_64.cpp
r175471 r175998 613 613 } 614 614 615 void JIT::emitResolveClosure(int dst, bool needsVarInjectionChecks, unsigned depth)615 void JIT::emitResolveClosure(int dst, int scope, bool needsVarInjectionChecks, unsigned depth) 616 616 { 617 617 emitVarInjectionCheck(needsVarInjectionChecks); 618 618 move(TrustedImm32(JSValue::CellTag), regT1); 619 emitLoadPayload( JSStack::ScopeChain, regT0);619 emitLoadPayload(scope, regT0); 620 620 for (unsigned i = 0; i < depth; ++i) 621 621 loadPtr(Address(regT0, JSScope::offsetOfNext()), regT0); … … 626 626 { 627 627 int dst = currentInstruction[1].u.operand; 628 int scope = currentInstruction[2].u.operand; 628 629 ResolveType resolveType = static_cast<ResolveType>(currentInstruction[4].u.operand); 629 630 unsigned depth = currentInstruction[5].u.operand; … … 641 642 case ClosureVar: 642 643 case ClosureVarWithVarInjectionChecks: 643 emitResolveClosure(dst, needsVarInjectionChecks(resolveType), depth);644 emitResolveClosure(dst, scope, needsVarInjectionChecks(resolveType), depth); 644 645 break; 645 646 case Dynamic: … … 660 661 661 662 linkSlowCase(iter); 663 int32_t scope = currentInstruction[2].u.operand; 662 664 int32_t indentifierIndex = currentInstruction[3].u.operand; 663 callOperation(operationResolveScope, dst, indentifierIndex);665 callOperation(operationResolveScope, dst, scope, indentifierIndex); 664 666 } 665 667 -
trunk/Source/JavaScriptCore/llint/LLIntSlowPaths.cpp
r175845 r175998 1359 1359 LLINT_BEGIN(); 1360 1360 const Identifier& ident = exec->codeBlock()->identifier(pc[3].u.operand); 1361 LLINT_RETURN(JSScope::resolve(exec, exec->scope(), ident)); 1361 JSScope* scope = LLINT_OP(2).Register::scope(); 1362 LLINT_RETURN(JSScope::resolve(exec, scope, ident)); 1362 1363 } 1363 1364
Note:
See TracChangeset
for help on using the changeset viewer.