Changeset 55185 in webkit for trunk/JavaScriptCore/jit/JITStubs.cpp
- Timestamp:
- Feb 24, 2010, 1:02:40 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/jit/JITStubs.cpp
r55002 r55185 39 39 #include "Debugger.h" 40 40 #include "ExceptionHelpers.h" 41 #include "GetterSetter.h" 41 42 #include "GlobalEvalFunction.h" 42 43 #include "JIT.h" … … 857 858 858 859 // Uncacheable: give up. 859 if (!slot.isCacheable Value()) {860 if (!slot.isCacheable()) { 860 861 ctiPatchCallByReturnAddress(codeBlock, returnAddress, FunctionPtr(cti_op_get_by_id_generic)); 861 862 return; 862 863 } 863 ASSERT(!slot.isGetter());864 864 865 865 JSCell* baseCell = asCell(baseValue); … … 876 876 // set this up, so derefStructures can do it's job. 877 877 stubInfo->initGetByIdSelf(structure); 878 879 JIT::patchGetByIdSelf(codeBlock, stubInfo, structure, slot.cachedOffset(), returnAddress); 878 if (slot.isGetter()) 879 ctiPatchCallByReturnAddress(codeBlock, returnAddress, FunctionPtr(cti_op_get_by_id_self_fail)); 880 else 881 JIT::patchGetByIdSelf(codeBlock, stubInfo, structure, slot.cachedOffset(), returnAddress); 880 882 return; 881 883 } … … 903 905 ASSERT(!structure->isDictionary()); 904 906 ASSERT(!slotBaseObject->structure()->isDictionary()); 905 JIT::compileGetByIdProto(callFrame->scopeChain()->globalData, callFrame, codeBlock, stubInfo, structure, slotBaseObject->structure(), offset, returnAddress);907 JIT::compileGetByIdProto(callFrame->scopeChain()->globalData, callFrame, codeBlock, stubInfo, structure, slotBaseObject->structure(), slot.isGetter(), offset, returnAddress); 906 908 return; 907 909 } … … 916 918 StructureChain* prototypeChain = structure->prototypeChain(callFrame); 917 919 stubInfo->initGetByIdChain(structure, prototypeChain); 918 JIT::compileGetByIdChain(callFrame->scopeChain()->globalData, callFrame, codeBlock, stubInfo, structure, prototypeChain, count, offset, returnAddress);920 JIT::compileGetByIdChain(callFrame->scopeChain()->globalData, callFrame, codeBlock, stubInfo, structure, prototypeChain, count, slot.isGetter(), offset, returnAddress); 919 921 } 920 922 … … 1376 1378 1377 1379 if (baseValue.isCell() 1378 && slot.isCacheable Value()1380 && slot.isCacheable() 1379 1381 && !asCell(baseValue)->structure()->isUncacheableDictionary() 1380 1382 && slot.slotBase() == baseValue) { … … 1398 1400 } 1399 1401 1400 JIT::compileGetByIdSelfList(callFrame->scopeChain()->globalData, codeBlock, stubInfo, polymorphicStructureList, listIndex, asCell(baseValue)->structure(), slot. cachedOffset());1402 JIT::compileGetByIdSelfList(callFrame->scopeChain()->globalData, codeBlock, stubInfo, polymorphicStructureList, listIndex, asCell(baseValue)->structure(), slot.isGetter(), slot.cachedOffset()); 1401 1403 1402 1404 if (listIndex == (POLYMORPHIC_LIST_CACHE_SIZE - 1)) … … 1436 1438 } 1437 1439 1440 DEFINE_STUB_FUNCTION(EncodedJSValue, op_get_by_id_getter_stub) 1441 { 1442 STUB_INIT_STACK_FRAME(stackFrame); 1443 CallFrame* callFrame = stackFrame.callFrame; 1444 GetterSetter* getterSetter = asGetterSetter(stackFrame.args[0].jsObject()); 1445 if (!getterSetter->getter()) 1446 return JSValue::encode(jsUndefined()); 1447 JSObject* getter = asObject(getterSetter->getter()); 1448 CallData callData; 1449 CallType callType = getter->getCallData(callData); 1450 JSValue result = call(callFrame, getter, callType, callData, stackFrame.args[1].jsObject(), ArgList()); 1451 if (callFrame->hadException()) 1452 returnToThrowTrampoline(&callFrame->globalData(), stackFrame.args[2].returnAddress(), STUB_RETURN_ADDRESS); 1453 1454 return JSValue::encode(result); 1455 } 1456 1438 1457 DEFINE_STUB_FUNCTION(EncodedJSValue, op_get_by_id_proto_list) 1439 1458 { … … 1449 1468 CHECK_FOR_EXCEPTION(); 1450 1469 1451 if (!baseValue.isCell() || !slot.isCacheable Value() || asCell(baseValue)->structure()->isDictionary()) {1470 if (!baseValue.isCell() || !slot.isCacheable() || asCell(baseValue)->structure()->isDictionary()) { 1452 1471 ctiPatchCallByReturnAddress(callFrame->codeBlock(), STUB_RETURN_ADDRESS, FunctionPtr(cti_op_get_by_id_proto_fail)); 1453 1472 return JSValue::encode(result); … … 1477 1496 PolymorphicAccessStructureList* prototypeStructureList = getPolymorphicAccessStructureListSlot(stubInfo, listIndex); 1478 1497 1479 JIT::compileGetByIdProtoList(callFrame->scopeChain()->globalData, callFrame, codeBlock, stubInfo, prototypeStructureList, listIndex, structure, slotBaseObject->structure(), offset);1498 JIT::compileGetByIdProtoList(callFrame->scopeChain()->globalData, callFrame, codeBlock, stubInfo, prototypeStructureList, listIndex, structure, slotBaseObject->structure(), slot.isGetter(), offset); 1480 1499 1481 1500 if (listIndex == (POLYMORPHIC_LIST_CACHE_SIZE - 1)) … … 1487 1506 1488 1507 StructureChain* protoChain = structure->prototypeChain(callFrame); 1489 JIT::compileGetByIdChainList(callFrame->scopeChain()->globalData, callFrame, codeBlock, stubInfo, prototypeStructureList, listIndex, structure, protoChain, count, offset);1508 JIT::compileGetByIdChainList(callFrame->scopeChain()->globalData, callFrame, codeBlock, stubInfo, prototypeStructureList, listIndex, structure, protoChain, count, slot.isGetter(), offset); 1490 1509 1491 1510 if (listIndex == (POLYMORPHIC_LIST_CACHE_SIZE - 1))
Note:
See TracChangeset
for help on using the changeset viewer.