Changeset 44705 in webkit for trunk/JavaScriptCore
- Timestamp:
- Jun 15, 2009, 8:01:12 PM (16 years ago)
- Location:
- trunk/JavaScriptCore
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/ChangeLog
r44702 r44705 1 2009-06-15 Gavin Barraclough <[email protected]> 2 3 Reviewed by Sam Weinig. 4 5 Having introduced the RepatchBuffer, ProcessorReturnAddress is now a do-nothing 6 wrapper around ReturnAddressPtr. Remove it. In tugging on this piece of string 7 it made sense to roll out the use of ReturnAddressPtr a little further into 8 JITStubs (which had always been the intention). 9 10 No performance impact. 11 12 * assembler/AbstractMacroAssembler.h: 13 (JSC::AbstractMacroAssembler::RepatchBuffer::relinkCallerToTrampoline): 14 (JSC::AbstractMacroAssembler::RepatchBuffer::relinkCallerToFunction): 15 (JSC::AbstractMacroAssembler::RepatchBuffer::relinkNearCallerToTrampoline): 16 * assembler/MacroAssemblerCodeRef.h: 17 (JSC::ReturnAddressPtr::ReturnAddressPtr): 18 * bytecode/CodeBlock.h: 19 (JSC::CodeBlock::getStubInfo): 20 (JSC::CodeBlock::getCallLinkInfo): 21 (JSC::CodeBlock::getMethodCallLinkInfo): 22 (JSC::CodeBlock::getBytecodeIndex): 23 * interpreter/Interpreter.cpp: 24 (JSC::bytecodeOffsetForPC): 25 * jit/JIT.cpp: 26 (JSC::ctiPatchNearCallByReturnAddress): 27 (JSC::ctiPatchCallByReturnAddress): 28 * jit/JIT.h: 29 (JSC::JIT::compileGetByIdProto): 30 (JSC::JIT::compileGetByIdChain): 31 (JSC::JIT::compilePutByIdTransition): 32 (JSC::JIT::compilePatchGetArrayLength): 33 * jit/JITPropertyAccess.cpp: 34 (JSC::JIT::privateCompilePutByIdTransition): 35 (JSC::JIT::patchGetByIdSelf): 36 (JSC::JIT::patchPutByIdReplace): 37 (JSC::JIT::privateCompilePatchGetArrayLength): 38 (JSC::JIT::privateCompileGetByIdProto): 39 (JSC::JIT::privateCompileGetByIdChain): 40 * jit/JITStubs.cpp: 41 (JSC::JITThunks::tryCachePutByID): 42 (JSC::JITThunks::tryCacheGetByID): 43 (JSC::StackHack::StackHack): 44 (JSC::returnToThrowTrampoline): 45 (JSC::throwStackOverflowError): 46 (JSC::JITStubs::DEFINE_STUB_FUNCTION): 47 * jit/JITStubs.h: 48 (JSC::): 49 (JSC::JITStackFrame::returnAddressSlot): 50 * runtime/JSGlobalData.h: 51 1 52 2009-06-15 Simon Fraser <[email protected]> 2 53 -
trunk/JavaScriptCore/assembler/AbstractMacroAssembler.h
r44700 r44705 58 58 class CodeLocationDataLabel32; 59 59 class CodeLocationDataLabelPtr; 60 class ProcessorReturnAddress;61 60 62 61 typedef typename AssemblerType::RegisterID RegisterID; … … 493 492 friend class PatchBuffer; 494 493 friend class RepatchBuffer; 495 friend class ProcessorReturnAddress;496 494 497 495 public: … … 628 626 { 629 627 } 630 };631 632 // ProcessorReturnAddress:633 //634 // This class can be used to relink a call identified by its return address.635 class ProcessorReturnAddress {636 public:637 ProcessorReturnAddress(void* location)638 : m_location(location)639 {640 }641 642 void* addressForLookup()643 {644 return m_location.value();645 }646 647 ReturnAddressPtr m_location;648 628 }; 649 629 … … 863 843 } 864 844 865 void relinkCallerToTrampoline( ProcessorReturnAddressreturnAddress, CodeLocationLabel label)866 { 867 relink(CodeLocationCall(CodePtr(returnAddress .m_location)), label);868 } 869 870 void relinkCallerToTrampoline( ProcessorReturnAddressreturnAddress, CodePtr newCalleeFunction)845 void relinkCallerToTrampoline(ReturnAddressPtr returnAddress, CodeLocationLabel label) 846 { 847 relink(CodeLocationCall(CodePtr(returnAddress)), label); 848 } 849 850 void relinkCallerToTrampoline(ReturnAddressPtr returnAddress, CodePtr newCalleeFunction) 871 851 { 872 852 relinkCallerToTrampoline(returnAddress, CodeLocationLabel(newCalleeFunction)); 873 853 } 874 854 875 void relinkCallerToFunction( ProcessorReturnAddressreturnAddress, FunctionPtr function)876 { 877 relink(CodeLocationCall(CodePtr(returnAddress .m_location)), function);878 } 879 880 void relinkNearCallerToTrampoline( ProcessorReturnAddressreturnAddress, CodeLocationLabel label)881 { 882 relink(CodeLocationNearCall(CodePtr(returnAddress .m_location)), label);883 } 884 885 void relinkNearCallerToTrampoline( ProcessorReturnAddressreturnAddress, CodePtr newCalleeFunction)855 void relinkCallerToFunction(ReturnAddressPtr returnAddress, FunctionPtr function) 856 { 857 relink(CodeLocationCall(CodePtr(returnAddress)), function); 858 } 859 860 void relinkNearCallerToTrampoline(ReturnAddressPtr returnAddress, CodeLocationLabel label) 861 { 862 relink(CodeLocationNearCall(CodePtr(returnAddress)), label); 863 } 864 865 void relinkNearCallerToTrampoline(ReturnAddressPtr returnAddress, CodePtr newCalleeFunction) 886 866 { 887 867 relinkNearCallerToTrampoline(returnAddress, CodeLocationLabel(newCalleeFunction)); -
trunk/JavaScriptCore/assembler/MacroAssemblerCodeRef.h
r44514 r44705 99 99 } 100 100 101 explicit ReturnAddressPtr(FunctionPtr function) 102 : m_value(function.value()) 103 { 104 ASSERT_VALID_CODE_POINTER(m_value); 105 } 106 101 107 void* value() const { return m_value; } 102 108 -
trunk/JavaScriptCore/bytecode/CodeBlock.h
r44693 r44705 287 287 } 288 288 289 StructureStubInfo& getStubInfo( void*returnAddress)290 { 291 return *(binaryChop<StructureStubInfo, void*, getStructureStubInfoReturnLocation>(m_structureStubInfos.begin(), m_structureStubInfos.size(), returnAddress ));292 } 293 294 CallLinkInfo& getCallLinkInfo( void*returnAddress)295 { 296 return *(binaryChop<CallLinkInfo, void*, getCallLinkInfoReturnLocation>(m_callLinkInfos.begin(), m_callLinkInfos.size(), returnAddress ));297 } 298 299 MethodCallLinkInfo& getMethodCallLinkInfo( void*returnAddress)300 { 301 return *(binaryChop<MethodCallLinkInfo, void*, getMethodCallLinkInfoReturnLocation>(m_methodCallLinkInfos.begin(), m_methodCallLinkInfos.size(), returnAddress ));302 } 303 304 unsigned getBytecodeIndex(CallFrame* callFrame, void* nativePC)289 StructureStubInfo& getStubInfo(ReturnAddressPtr returnAddress) 290 { 291 return *(binaryChop<StructureStubInfo, void*, getStructureStubInfoReturnLocation>(m_structureStubInfos.begin(), m_structureStubInfos.size(), returnAddress.value())); 292 } 293 294 CallLinkInfo& getCallLinkInfo(ReturnAddressPtr returnAddress) 295 { 296 return *(binaryChop<CallLinkInfo, void*, getCallLinkInfoReturnLocation>(m_callLinkInfos.begin(), m_callLinkInfos.size(), returnAddress.value())); 297 } 298 299 MethodCallLinkInfo& getMethodCallLinkInfo(ReturnAddressPtr returnAddress) 300 { 301 return *(binaryChop<MethodCallLinkInfo, void*, getMethodCallLinkInfoReturnLocation>(m_methodCallLinkInfos.begin(), m_methodCallLinkInfos.size(), returnAddress.value())); 302 } 303 304 unsigned getBytecodeIndex(CallFrame* callFrame, ReturnAddressPtr returnAddress) 305 305 { 306 306 reparseForExceptionInfoIfNecessary(callFrame); 307 return binaryChop<CallReturnOffsetToBytecodeIndex, unsigned, getCallReturnOffset>(m_exceptionInfo->m_callReturnIndexVector.begin(), m_exceptionInfo->m_callReturnIndexVector.size(), ownerNode()->generatedJITCode().offsetOf( nativePC))->bytecodeIndex;307 return binaryChop<CallReturnOffsetToBytecodeIndex, unsigned, getCallReturnOffset>(m_exceptionInfo->m_callReturnIndexVector.begin(), m_exceptionInfo->m_callReturnIndexVector.size(), ownerNode()->generatedJITCode().offsetOf(returnAddress.value()))->bytecodeIndex; 308 308 } 309 309 -
trunk/JavaScriptCore/interpreter/Interpreter.cpp
r44088 r44705 77 77 { 78 78 #if ENABLE(JIT) 79 return codeBlock->getBytecodeIndex(callFrame, pc);79 return codeBlock->getBytecodeIndex(callFrame, ReturnAddressPtr(pc)); 80 80 #else 81 81 UNUSED_PARAM(callFrame); -
trunk/JavaScriptCore/jit/JIT.cpp
r44700 r44705 47 47 namespace JSC { 48 48 49 void ctiPatchNearCallByReturnAddress( MacroAssembler::ProcessorReturnAddressreturnAddress, MacroAssemblerCodePtr newCalleeFunction)49 void ctiPatchNearCallByReturnAddress(ReturnAddressPtr returnAddress, MacroAssemblerCodePtr newCalleeFunction) 50 50 { 51 51 MacroAssembler::RepatchBuffer repatchBuffer; … … 53 53 } 54 54 55 void ctiPatchCallByReturnAddress( MacroAssembler::ProcessorReturnAddressreturnAddress, MacroAssemblerCodePtr newCalleeFunction)55 void ctiPatchCallByReturnAddress(ReturnAddressPtr returnAddress, MacroAssemblerCodePtr newCalleeFunction) 56 56 { 57 57 MacroAssembler::RepatchBuffer repatchBuffer; … … 59 59 } 60 60 61 void ctiPatchCallByReturnAddress( MacroAssembler::ProcessorReturnAddressreturnAddress, FunctionPtr newCalleeFunction)61 void ctiPatchCallByReturnAddress(ReturnAddressPtr returnAddress, FunctionPtr newCalleeFunction) 62 62 { 63 63 MacroAssembler::RepatchBuffer repatchBuffer; -
trunk/JavaScriptCore/jit/JIT.h
r44693 r44705 167 167 168 168 // Near calls can only be patched to other JIT code, regular calls can be patched to JIT code or relinked to stub functions. 169 void ctiPatchNearCallByReturnAddress( MacroAssembler::ProcessorReturnAddressreturnAddress, MacroAssemblerCodePtr newCalleeFunction);170 void ctiPatchCallByReturnAddress( MacroAssembler::ProcessorReturnAddressreturnAddress, MacroAssemblerCodePtr newCalleeFunction);171 void ctiPatchCallByReturnAddress( MacroAssembler::ProcessorReturnAddressreturnAddress, FunctionPtr newCalleeFunction);169 void ctiPatchNearCallByReturnAddress(ReturnAddressPtr returnAddress, MacroAssemblerCodePtr newCalleeFunction); 170 void ctiPatchCallByReturnAddress(ReturnAddressPtr returnAddress, MacroAssemblerCodePtr newCalleeFunction); 171 void ctiPatchCallByReturnAddress(ReturnAddressPtr returnAddress, FunctionPtr newCalleeFunction); 172 172 173 173 class JIT : private MacroAssembler { … … 335 335 } 336 336 337 static void compileGetByIdProto(JSGlobalData* globalData, CallFrame* callFrame, CodeBlock* codeBlock, StructureStubInfo* stubInfo, Structure* structure, Structure* prototypeStructure, size_t cachedOffset, ProcessorReturnAddressreturnAddress)337 static void compileGetByIdProto(JSGlobalData* globalData, CallFrame* callFrame, CodeBlock* codeBlock, StructureStubInfo* stubInfo, Structure* structure, Structure* prototypeStructure, size_t cachedOffset, ReturnAddressPtr returnAddress) 338 338 { 339 339 JIT jit(globalData, codeBlock); … … 357 357 } 358 358 359 static void compileGetByIdChain(JSGlobalData* globalData, CallFrame* callFrame, CodeBlock* codeBlock, StructureStubInfo* stubInfo, Structure* structure, StructureChain* chain, size_t count, size_t cachedOffset, ProcessorReturnAddressreturnAddress)359 static void compileGetByIdChain(JSGlobalData* globalData, CallFrame* callFrame, CodeBlock* codeBlock, StructureStubInfo* stubInfo, Structure* structure, StructureChain* chain, size_t count, size_t cachedOffset, ReturnAddressPtr returnAddress) 360 360 { 361 361 JIT jit(globalData, codeBlock); … … 363 363 } 364 364 365 static void compilePutByIdTransition(JSGlobalData* globalData, CodeBlock* codeBlock, StructureStubInfo* stubInfo, Structure* oldStructure, Structure* newStructure, size_t cachedOffset, StructureChain* chain, ProcessorReturnAddressreturnAddress)365 static void compilePutByIdTransition(JSGlobalData* globalData, CodeBlock* codeBlock, StructureStubInfo* stubInfo, Structure* oldStructure, Structure* newStructure, size_t cachedOffset, StructureChain* chain, ReturnAddressPtr returnAddress) 366 366 { 367 367 JIT jit(globalData, codeBlock); … … 375 375 } 376 376 377 static void patchGetByIdSelf(StructureStubInfo*, Structure*, size_t cachedOffset, ProcessorReturnAddressreturnAddress);378 static void patchPutByIdReplace(StructureStubInfo*, Structure*, size_t cachedOffset, ProcessorReturnAddressreturnAddress);377 static void patchGetByIdSelf(StructureStubInfo*, Structure*, size_t cachedOffset, ReturnAddressPtr returnAddress); 378 static void patchPutByIdReplace(StructureStubInfo*, Structure*, size_t cachedOffset, ReturnAddressPtr returnAddress); 379 379 static void patchMethodCallProto(MethodCallLinkInfo&, JSFunction*, Structure*, JSObject*); 380 380 381 static void compilePatchGetArrayLength(JSGlobalData* globalData, CodeBlock* codeBlock, ProcessorReturnAddressreturnAddress)381 static void compilePatchGetArrayLength(JSGlobalData* globalData, CodeBlock* codeBlock, ReturnAddressPtr returnAddress) 382 382 { 383 383 JIT jit(globalData, codeBlock); … … 406 406 void privateCompileSlowCases(); 407 407 void privateCompile(); 408 void privateCompileGetByIdProto(StructureStubInfo*, Structure*, Structure* prototypeStructure, size_t cachedOffset, ProcessorReturnAddressreturnAddress, CallFrame* callFrame);408 void privateCompileGetByIdProto(StructureStubInfo*, Structure*, Structure* prototypeStructure, size_t cachedOffset, ReturnAddressPtr returnAddress, CallFrame* callFrame); 409 409 void privateCompileGetByIdSelfList(StructureStubInfo*, PolymorphicAccessStructureList*, int, Structure*, size_t cachedOffset); 410 410 void privateCompileGetByIdProtoList(StructureStubInfo*, PolymorphicAccessStructureList*, int, Structure*, Structure* prototypeStructure, size_t cachedOffset, CallFrame* callFrame); 411 411 void privateCompileGetByIdChainList(StructureStubInfo*, PolymorphicAccessStructureList*, int, Structure*, StructureChain* chain, size_t count, size_t cachedOffset, CallFrame* callFrame); 412 void privateCompileGetByIdChain(StructureStubInfo*, Structure*, StructureChain*, size_t count, size_t cachedOffset, ProcessorReturnAddressreturnAddress, CallFrame* callFrame);413 void privateCompilePutByIdTransition(StructureStubInfo*, Structure*, Structure*, size_t cachedOffset, StructureChain*, ProcessorReturnAddressreturnAddress);412 void privateCompileGetByIdChain(StructureStubInfo*, Structure*, StructureChain*, size_t count, size_t cachedOffset, ReturnAddressPtr returnAddress, CallFrame* callFrame); 413 void privateCompilePutByIdTransition(StructureStubInfo*, Structure*, Structure*, size_t cachedOffset, StructureChain*, ReturnAddressPtr returnAddress); 414 414 415 415 void privateCompileCTIMachineTrampolines(RefPtr<ExecutablePool>* executablePool, JSGlobalData* data, CodePtr* ctiArrayLengthTrampoline, CodePtr* ctiStringLengthTrampoline, CodePtr* ctiVirtualCallPreLink, CodePtr* ctiVirtualCallLink, CodePtr* ctiVirtualCall, CodePtr* ctiNativeCallThunk); 416 void privateCompilePatchGetArrayLength( ProcessorReturnAddressreturnAddress);416 void privateCompilePatchGetArrayLength(ReturnAddressPtr returnAddress); 417 417 418 418 void addSlowCase(Jump); -
trunk/JavaScriptCore/jit/JITPropertyAccess.cpp
r44700 r44705 422 422 } 423 423 424 void JIT::privateCompilePutByIdTransition(StructureStubInfo* stubInfo, Structure* oldStructure, Structure* newStructure, size_t cachedOffset, StructureChain* chain, ProcessorReturnAddressreturnAddress)424 void JIT::privateCompilePutByIdTransition(StructureStubInfo* stubInfo, Structure* oldStructure, Structure* newStructure, size_t cachedOffset, StructureChain* chain, ReturnAddressPtr returnAddress) 425 425 { 426 426 JumpList failureCases; … … 503 503 } 504 504 505 void JIT::patchGetByIdSelf(StructureStubInfo* stubInfo, Structure* structure, size_t cachedOffset, ProcessorReturnAddressreturnAddress)505 void JIT::patchGetByIdSelf(StructureStubInfo* stubInfo, Structure* structure, size_t cachedOffset, ReturnAddressPtr returnAddress) 506 506 { 507 507 RepatchBuffer repatchBuffer; … … 537 537 } 538 538 539 void JIT::patchPutByIdReplace(StructureStubInfo* stubInfo, Structure* structure, size_t cachedOffset, ProcessorReturnAddressreturnAddress)539 void JIT::patchPutByIdReplace(StructureStubInfo* stubInfo, Structure* structure, size_t cachedOffset, ReturnAddressPtr returnAddress) 540 540 { 541 541 RepatchBuffer repatchBuffer; … … 557 557 } 558 558 559 void JIT::privateCompilePatchGetArrayLength( ProcessorReturnAddressreturnAddress)560 { 561 StructureStubInfo* stubInfo = &m_codeBlock->getStubInfo(returnAddress .addressForLookup());559 void JIT::privateCompilePatchGetArrayLength(ReturnAddressPtr returnAddress) 560 { 561 StructureStubInfo* stubInfo = &m_codeBlock->getStubInfo(returnAddress); 562 562 563 563 // Check eax is an array … … 596 596 } 597 597 598 void JIT::privateCompileGetByIdProto(StructureStubInfo* stubInfo, Structure* structure, Structure* prototypeStructure, size_t cachedOffset, ProcessorReturnAddressreturnAddress, CallFrame* callFrame)598 void JIT::privateCompileGetByIdProto(StructureStubInfo* stubInfo, Structure* structure, Structure* prototypeStructure, size_t cachedOffset, ReturnAddressPtr returnAddress, CallFrame* callFrame) 599 599 { 600 600 // The prototype object definitely exists (if this stub exists the CodeBlock is referencing a Structure that is … … 770 770 } 771 771 772 void JIT::privateCompileGetByIdChain(StructureStubInfo* stubInfo, Structure* structure, StructureChain* chain, size_t count, size_t cachedOffset, ProcessorReturnAddressreturnAddress, CallFrame* callFrame)772 void JIT::privateCompileGetByIdChain(StructureStubInfo* stubInfo, Structure* structure, StructureChain* chain, size_t count, size_t cachedOffset, ReturnAddressPtr returnAddress, CallFrame* callFrame) 773 773 { 774 774 ASSERT(count); -
trunk/JavaScriptCore/jit/JITStubs.cpp
r44693 r44705 323 323 #if ENABLE(JIT_OPTIMIZE_PROPERTY_ACCESS) 324 324 325 NEVER_INLINE void JITThunks::tryCachePutByID(CallFrame* callFrame, CodeBlock* codeBlock, void*returnAddress, JSValue baseValue, const PutPropertySlot& slot)325 NEVER_INLINE void JITThunks::tryCachePutByID(CallFrame* callFrame, CodeBlock* codeBlock, ReturnAddressPtr returnAddress, JSValue baseValue, const PutPropertySlot& slot) 326 326 { 327 327 // The interpreter checks for recursion here; I do not believe this can occur in CTI. … … 367 367 } 368 368 369 NEVER_INLINE void JITThunks::tryCacheGetByID(CallFrame* callFrame, CodeBlock* codeBlock, void*returnAddress, JSValue baseValue, const Identifier& propertyName, const PropertySlot& slot)369 NEVER_INLINE void JITThunks::tryCacheGetByID(CallFrame* callFrame, CodeBlock* codeBlock, ReturnAddressPtr returnAddress, JSValue baseValue, const Identifier& propertyName, const PropertySlot& slot) 370 370 { 371 371 // FIXME: Write a test that proves we need to check for recursion here just … … 474 474 , savedReturnAddress(*stackFrame.returnAddressSlot()) 475 475 { 476 *stackFrame.returnAddressSlot() = reinterpret_cast<void*>(jscGeneratedNativeCode);476 *stackFrame.returnAddressSlot() = ReturnAddressPtr(FunctionPtr(jscGeneratedNativeCode)); 477 477 } 478 478 … … 483 483 484 484 JITStackFrame& stackFrame; 485 void*savedReturnAddress;485 ReturnAddressPtr savedReturnAddress; 486 486 }; 487 487 488 488 #define STUB_INIT_STACK_FRAME(stackFrame) SETUP_VA_LISTL_ARGS; JITStackFrame& stackFrame = *reinterpret_cast<JITStackFrame*>(STUB_ARGS); StackHack stackHack(stackFrame) 489 #define STUB_SET_RETURN_ADDRESS(returnAddress) stackHack.savedReturnAddress = returnAddress489 #define STUB_SET_RETURN_ADDRESS(returnAddress) stackHack.savedReturnAddress = ReturnAddressPtr(returnAddress) 490 490 #define STUB_RETURN_ADDRESS stackHack.savedReturnAddress 491 491 … … 493 493 494 494 #define STUB_INIT_STACK_FRAME(stackFrame) SETUP_VA_LISTL_ARGS; JITStackFrame& stackFrame = *reinterpret_cast<JITStackFrame*>(STUB_ARGS) 495 #define STUB_SET_RETURN_ADDRESS(returnAddress) *stackFrame.returnAddressSlot() = returnAddress495 #define STUB_SET_RETURN_ADDRESS(returnAddress) *stackFrame.returnAddressSlot() = ReturnAddressPtr(returnAddress) 496 496 #define STUB_RETURN_ADDRESS *stackFrame.returnAddressSlot() 497 497 … … 502 502 // good to keep the code size down by leaving as much of the exception 503 503 // handling code out of line as possible. 504 static NEVER_INLINE void returnToThrowTrampoline(JSGlobalData* globalData, void* exceptionLocation, void*& returnAddressSlot)504 static NEVER_INLINE void returnToThrowTrampoline(JSGlobalData* globalData, ReturnAddressPtr exceptionLocation, ReturnAddressPtr& returnAddressSlot) 505 505 { 506 506 ASSERT(globalData->exception); 507 507 globalData->exceptionLocation = exceptionLocation; 508 returnAddressSlot = reinterpret_cast<void*>(ctiVMThrowTrampoline);509 } 510 511 static NEVER_INLINE void throwStackOverflowError(CallFrame* callFrame, JSGlobalData* globalData, void* exceptionLocation, void*& returnAddressSlot)508 returnAddressSlot = ReturnAddressPtr(FunctionPtr(ctiVMThrowTrampoline)); 509 } 510 511 static NEVER_INLINE void throwStackOverflowError(CallFrame* callFrame, JSGlobalData* globalData, ReturnAddressPtr exceptionLocation, ReturnAddressPtr& returnAddressSlot) 512 512 { 513 513 globalData->exception = createStackOverflowError(callFrame); … … 673 673 CallFrame* oldCallFrame = stackFrame.callFrame->callerFrame(); 674 674 stackFrame.callFrame = oldCallFrame; 675 throwStackOverflowError(oldCallFrame, stackFrame.globalData, oldCallFrame->returnPC(), STUB_RETURN_ADDRESS);675 throwStackOverflowError(oldCallFrame, stackFrame.globalData, ReturnAddressPtr(oldCallFrame->returnPC()), STUB_RETURN_ADDRESS); 676 676 } 677 677 … … 1279 1279 CallFrame* callFrame = CallFrame::create(previousCallFrame->registers() + registerOffset); 1280 1280 1281 callFrame->init(0, static_cast<Instruction*>( STUB_RETURN_ADDRESS), previousCallFrame->scopeChain(), previousCallFrame, 0, argCount, 0);1281 callFrame->init(0, static_cast<Instruction*>((STUB_RETURN_ADDRESS).value()), previousCallFrame->scopeChain(), previousCallFrame, 0, argCount, 0); 1282 1282 stackFrame.callFrame = callFrame; 1283 1283 -
trunk/JavaScriptCore/jit/JITStubs.h
r44523 r44705 69 69 RegExp* regExp() { return static_cast<RegExp*>(asPointer); } 70 70 JSPropertyNameIterator* propertyNameIterator() { return static_cast<JSPropertyNameIterator*>(asPointer); } 71 void* returnAddress() { return asPointer; }71 ReturnAddressPtr returnAddress() { return ReturnAddressPtr(asPointer); } 72 72 }; 73 73 … … 93 93 94 94 // When JIT code makes a call, it pushes its return address just below the rest of the stack. 95 void** returnAddressSlot() { return reinterpret_cast<void**>(this) - 1; }95 ReturnAddressPtr* returnAddressSlot() { return reinterpret_cast<ReturnAddressPtr*>(this) - 1; } 96 96 }; 97 97 #elif PLATFORM(X86) … … 114 114 115 115 // When JIT code makes a call, it pushes its return address just below the rest of the stack. 116 void** returnAddressSlot() { return reinterpret_cast<void**>(this) - 1; }116 ReturnAddressPtr* returnAddressSlot() { return reinterpret_cast<ReturnAddressPtr*>(this) - 1; } 117 117 }; 118 118 #elif PLATFORM(ARM_V7) … … 121 121 JITStubArg args[6]; 122 122 123 void*thunkReturnAddress;123 ReturnAddressPtr thunkReturnAddress; 124 124 125 125 void* preservedReturnAddress; … … 137 137 JSGlobalData* globalData; 138 138 139 void** returnAddressSlot() { return &thunkReturnAddress; }139 ReturnAddressPtr* returnAddressSlot() { return &thunkReturnAddress; } 140 140 }; 141 141 #else … … 196 196 JITThunks(JSGlobalData*); 197 197 198 static void tryCacheGetByID(CallFrame*, CodeBlock*, void*returnAddress, JSValue baseValue, const Identifier& propertyName, const PropertySlot&);199 static void tryCachePutByID(CallFrame*, CodeBlock*, void*returnAddress, JSValue baseValue, const PutPropertySlot&);198 static void tryCacheGetByID(CallFrame*, CodeBlock*, ReturnAddressPtr returnAddress, JSValue baseValue, const Identifier& propertyName, const PropertySlot&); 199 static void tryCachePutByID(CallFrame*, CodeBlock*, ReturnAddressPtr returnAddress, JSValue baseValue, const PutPropertySlot&); 200 200 201 201 MacroAssemblerCodePtr ctiArrayLengthTrampoline() { return m_ctiArrayLengthTrampoline; } -
trunk/JavaScriptCore/runtime/JSGlobalData.h
r44550 r44705 132 132 JSValue exception; 133 133 #if ENABLE(JIT) 134 void*exceptionLocation;134 ReturnAddressPtr exceptionLocation; 135 135 #endif 136 136
Note:
See TracChangeset
for help on using the changeset viewer.