Changeset 160213 in webkit
- Timestamp:
- Dec 5, 2013 9:32:06 PM (10 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r160208 r160213 1 2013-12-05 Michael Saboff <msaboff@apple.com> 2 3 JSC: Simplify interface between throw and catch handler 4 https://bugs.webkit.org/show_bug.cgi?id=125328 5 6 Reviewed by Geoffrey Garen. 7 8 Simplified the throw - catch interface. The throw side is only responsible for 9 jumping to the appropriate op_catch handler or returnFromJavaScript for uncaught 10 exceptions. The handler uses the exception values like VM.callFrameForThrow 11 as appropriate and no longer relies on the throw side putting anything in 12 registers. 13 14 * jit/CCallHelpers.h: 15 (JSC::CCallHelpers::jumpToExceptionHandler): 16 * jit/JITOpcodes.cpp: 17 (JSC::JIT::emit_op_catch): 18 * jit/JITOpcodes32_64.cpp: 19 (JSC::JIT::emit_op_catch): 20 * llint/LowLevelInterpreter32_64.asm: 21 (_llint_op_catch): 22 (_llint_throw_from_slow_path_trampoline): 23 * llint/LowLevelInterpreter64.asm: 24 (_llint_op_catch): 25 (_llint_throw_from_slow_path_trampoline): 26 1 27 2013-12-04 Oliver Hunt <oliver@apple.com> 2 28 -
trunk/Source/JavaScriptCore/jit/CCallHelpers.h
r159748 r160213 1575 1575 // genericUnwind() leaves the handler CallFrame* in vm->callFrameForThrow, 1576 1576 // and the address of the handler in vm->targetMachinePCForThrow. 1577 // The exception handler expects the CallFrame* in regT0. 1578 move(TrustedImmPtr(vm()), GPRInfo::regT0); 1579 loadPtr(Address(GPRInfo::regT0, VM::targetMachinePCForThrowOffset()), GPRInfo::regT1); 1580 loadPtr(Address(GPRInfo::regT0, VM::callFrameForThrowOffset()), GPRInfo::regT0); 1577 loadPtr(&vm()->targetMachinePCForThrow, GPRInfo::regT1); 1581 1578 jump(GPRInfo::regT1); 1582 1579 } -
trunk/Source/JavaScriptCore/jit/JITOpcodes.cpp
r160109 r160213 649 649 void JIT::emit_op_catch(Instruction* currentInstruction) 650 650 { 651 move(regT0, callFrameRegister);652 651 move(TrustedImmPtr(m_vm), regT3); 652 load64(Address(regT3, VM::callFrameForThrowOffset()), callFrameRegister); 653 653 load64(Address(regT3, VM::exceptionOffset()), regT0); 654 654 store64(TrustedImm64(JSValue::encode(JSValue())), Address(regT3, VM::exceptionOffset())); -
trunk/Source/JavaScriptCore/jit/JITOpcodes32_64.cpp
r160109 r160213 925 925 void JIT::emit_op_catch(Instruction* currentInstruction) 926 926 { 927 move(TrustedImmPtr(m_vm), regT3); 927 928 // operationThrow returns the callFrame for the handler. 928 move(regT0, callFrameRegister); 929 929 load32(Address(regT3, VM::callFrameForThrowOffset()), callFrameRegister); 930 930 // Now store the exception returned by operationThrow. 931 move(TrustedImmPtr(m_vm), regT3);932 931 load32(Address(regT3, VM::exceptionOffset() + OBJECT_OFFSETOF(JSValue, u.asBits.payload)), regT0); 933 932 load32(Address(regT3, VM::exceptionOffset() + OBJECT_OFFSETOF(JSValue, u.asBits.tag)), regT1); -
trunk/Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm
r160109 r160213 1981 1981 # machine code return address will be set to _llint_op_catch), and from 1982 1982 # the interpreter's throw trampoline (see _llint_throw_trampoline). 1983 # The JIT throwing protocol calls for the cfr to be in t0. The throwing 1984 # code must have known that we were throwing to the interpreter, and have 1985 # set VM::targetInterpreterPCForThrow. 1986 move t0, cfr 1983 # The throwing code must have known that we were throwing to the interpreter, 1984 # and have set VM::targetInterpreterPCForThrow. 1987 1985 loadp CodeBlock[cfr], t3 1988 1986 loadp CodeBlock::m_vm[t3], t3 1987 loadp VM::callFrameForThrow[t3], cfr 1989 1988 loadi VM::targetInterpreterPCForThrow[t3], PC 1990 1989 loadi VM::m_exception + PayloadOffset[t3], t0 … … 2051 2050 loadp CodeBlock[cfr], t1 2052 2051 loadp CodeBlock::m_vm[t1], t1 2053 loadp VM::topCallFrame[t1], cfr2054 loadp VM::callFrameForThrow[t1], t02055 2052 jmp VM::targetMachinePCForThrow[t1] 2056 2053 -
trunk/Source/JavaScriptCore/llint/LowLevelInterpreter64.asm
r160109 r160213 1784 1784 # machine code return address will be set to _llint_op_catch), and from 1785 1785 # the interpreter's throw trampoline (see _llint_throw_trampoline). 1786 # The JIT throwing protocol calls for the cfr to be in t0. The throwing 1787 # code must have known that we were throwing to the interpreter, and have 1788 # set VM::targetInterpreterPCForThrow. 1789 move t0, cfr 1786 # The throwing code must have known that we were throwing to the interpreter, 1787 # and have set VM::targetInterpreterPCForThrow. 1788 loadp CodeBlock[cfr], t3 1789 loadp CodeBlock::m_vm[t3], t3 1790 loadp VM::callFrameForThrow[t3], cfr 1790 1791 loadp CodeBlock[cfr], PB 1791 1792 loadp CodeBlock::m_instructions[PB], PB 1792 loadp CodeBlock[cfr], t31793 loadp CodeBlock::m_vm[t3], t31794 1793 loadp VM::targetInterpreterPCForThrow[t3], PC 1795 1794 subp PB, PC … … 1820 1819 loadp CodeBlock[cfr], t1 1821 1820 loadp CodeBlock::m_vm[t1], t1 1822 loadp VM::topCallFrame[t1], cfr1823 loadp VM::callFrameForThrow[t1], t01824 1821 jmp VM::targetMachinePCForThrow[t1] 1825 1822
Note: See TracChangeset
for help on using the changeset viewer.