Changeset 44700 in webkit for trunk/JavaScriptCore/jit/JIT.cpp
- Timestamp:
- Jun 15, 2009, 5:26:53 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/jit/JIT.cpp
r44693 r44700 49 49 void ctiPatchNearCallByReturnAddress(MacroAssembler::ProcessorReturnAddress returnAddress, MacroAssemblerCodePtr newCalleeFunction) 50 50 { 51 returnAddress.relinkNearCallerToTrampoline(newCalleeFunction); 51 MacroAssembler::RepatchBuffer repatchBuffer; 52 repatchBuffer.relinkNearCallerToTrampoline(returnAddress, newCalleeFunction); 52 53 } 53 54 54 55 void ctiPatchCallByReturnAddress(MacroAssembler::ProcessorReturnAddress returnAddress, MacroAssemblerCodePtr newCalleeFunction) 55 56 { 56 returnAddress.relinkCallerToTrampoline(newCalleeFunction); 57 MacroAssembler::RepatchBuffer repatchBuffer; 58 repatchBuffer.relinkCallerToTrampoline(returnAddress, newCalleeFunction); 57 59 } 58 60 59 61 void ctiPatchCallByReturnAddress(MacroAssembler::ProcessorReturnAddress returnAddress, FunctionPtr newCalleeFunction) 60 62 { 61 returnAddress.relinkCallerToFunction(newCalleeFunction); 63 MacroAssembler::RepatchBuffer repatchBuffer; 64 repatchBuffer.relinkCallerToFunction(returnAddress, newCalleeFunction); 62 65 } 63 66 … … 903 906 // (and, if a new JSFunction happened to be constructed at the same location, we could get a false positive 904 907 // match). Reset the check so it no longer matches. 905 callLinkInfo->hotPathBegin.repatch(JSValue::encode(JSValue())); 908 RepatchBuffer repatchBuffer; 909 repatchBuffer.repatch(callLinkInfo->hotPathBegin, JSValue::encode(JSValue())); 906 910 } 907 911 908 912 void JIT::linkCall(JSFunction* callee, CodeBlock* calleeCodeBlock, JITCode& code, CallLinkInfo* callLinkInfo, int callerArgCount, JSGlobalData* globalData) 909 913 { 914 RepatchBuffer repatchBuffer; 915 910 916 // Currently we only link calls with the exact number of arguments. 911 917 // If this is a native call calleeCodeBlock is null so the number of parameters is unimportant … … 916 922 calleeCodeBlock->addCaller(callLinkInfo); 917 923 918 callLinkInfo->hotPathBegin.repatch(callee);919 callLinkInfo->hotPathOther.relink(code.addressForCall());924 repatchBuffer.repatch(callLinkInfo->hotPathBegin, callee); 925 repatchBuffer.relink(callLinkInfo->hotPathOther, code.addressForCall()); 920 926 } 921 927 922 928 // patch the call so we do not continue to try to link. 923 callLinkInfo->callReturnLocation.relink(globalData->jitStubs.ctiVirtualCall());929 repatchBuffer.relink(callLinkInfo->callReturnLocation, globalData->jitStubs.ctiVirtualCall()); 924 930 } 925 931
Note:
See TracChangeset
for help on using the changeset viewer.