Changeset 38688 in webkit for trunk/JavaScriptCore/jit/JIT.cpp
- Timestamp:
- Nov 21, 2008, 7:34:43 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/jit/JIT.cpp
r38669 r38688 2360 2360 case op_get_by_id_proto_list: 2361 2361 case op_get_by_id_self: 2362 case op_get_by_id_self_list: 2362 2363 case op_get_string_length: 2363 2364 case op_put_by_id_generic: … … 3231 3232 3232 3233 #if USE(CTI_REPATCH_PIC) 3233 void JIT::privateCompileGetByIdProtoList(StructureStubInfo* stubInfo, PrototypeStructureList* prototypeStructures, int currentIndex, Structure* structure, Structure* prototypeStructure, size_t cachedOffset, CallFrame* callFrame) 3234 void JIT::privateCompileGetByIdSelfList(StructureStubInfo* stubInfo, PolymorphicAccessStructureList* polymorphicStructures, int currentIndex, Structure* structure, size_t cachedOffset) 3235 { 3236 JmpSrc failureCase = checkStructure(X86::eax, structure); 3237 __ movl_mr(FIELD_OFFSET(JSObject, m_propertyStorage), X86::eax, X86::eax); 3238 __ movl_mr(cachedOffset * sizeof(JSValue*), X86::eax, X86::eax); 3239 JmpSrc success = __ jmp(); 3240 3241 void* code = __ executableCopy(); 3242 ASSERT(code); 3243 3244 // Use the repatch information to link the failure cases back to the original slow case routine. 3245 void* lastProtoBegin = polymorphicStructures->list[currentIndex - 1].stubRoutine; 3246 if (!lastProtoBegin) 3247 lastProtoBegin = reinterpret_cast<char*>(stubInfo->callReturnLocation) - repatchOffsetGetByIdSlowCaseCall; 3248 3249 X86Assembler::link(code, failureCase, lastProtoBegin); 3250 3251 // On success return back to the hot patch code, at a point it will perform the store to dest for us. 3252 intptr_t successDest = reinterpret_cast<intptr_t>(stubInfo->hotPathBegin) + repatchOffsetGetByIdPropertyMapOffset; 3253 X86Assembler::link(code, success, reinterpret_cast<void*>(successDest)); 3254 3255 structure->ref(); 3256 polymorphicStructures->list[currentIndex].set(structure, 0, cachedOffset, 0/*code*/); 3257 3258 // Finally repatch the jump to slow case back in the hot path to jump here instead. 3259 intptr_t jmpLocation = reinterpret_cast<intptr_t>(stubInfo->hotPathBegin) + repatchOffsetGetByIdBranchToSlowCase; 3260 X86Assembler::repatchBranchOffset(jmpLocation, code); 3261 } 3262 3263 void JIT::privateCompileGetByIdProtoList(StructureStubInfo* stubInfo, PolymorphicAccessStructureList* prototypeStructures, int currentIndex, Structure* structure, Structure* prototypeStructure, size_t cachedOffset, CallFrame* callFrame) 3234 3264 { 3235 3265 // The prototype object definitely exists (if this stub exists the CodeBlock is referencing a Structure that is … … 3667 3697 // We don't want to repatch more than once - in future go to cti_op_get_by_id_generic. 3668 3698 // Should probably go to Interpreter::cti_op_get_by_id_fail, but that doesn't do anything interesting right now. 3669 ctiRepatchCallByReturnAddress(returnAddress, reinterpret_cast<void*>(Interpreter::cti_op_get_by_id_ generic));3699 ctiRepatchCallByReturnAddress(returnAddress, reinterpret_cast<void*>(Interpreter::cti_op_get_by_id_self_fail)); 3670 3700 3671 3701 // Repatch the offset into the propoerty map to load from, then repatch the Structure to look for.
Note:
See TracChangeset
for help on using the changeset viewer.