Changeset 96988 in webkit


Ignore:
Timestamp:
Oct 7, 2011 4:38:03 PM (13 years ago)
Author:
barraclough@apple.com
Message:

Refactor DFG to make for use of callOperation
https://bugs.webkit.org/show_bug.cgi?id=69672

Reviewed by Oliver Hunt.

  • dfg/DFGJITCodeGenerator.h:

(JSC::DFG::callOperation):

  • Added new callOperation calls, don't ASSERT flushed (use helpers for unexpected calls, too).
  • dfg/DFGOperations.cpp:
  • dfg/DFGOperations.h:
    • Switch operationNewObject/operationCreateThis to return Cells,
    • Added C_DFGOperation_E/C_DFGOperation_EC/J_DFGOperation_EA/J_DFGOperation_EJA call types.
  • dfg/DFGSpeculativeJIT32_64.cpp:

(JSC::DFG::SpeculativeJIT::compileLogicalNot):
(JSC::DFG::SpeculativeJIT::emitBranch):
(JSC::DFG::SpeculativeJIT::compile):

  • Replace code plating calls to operations to with calls to callOperation.
  • dfg/DFGSpeculativeJIT64.cpp:

(JSC::DFG::SpeculativeJIT::compileLogicalNot):
(JSC::DFG::SpeculativeJIT::emitBranch):
(JSC::DFG::SpeculativeJIT::compile):

  • Replace code plating calls to operations to with calls to callOperation.
Location:
trunk/Source/JavaScriptCore
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r96983 r96988  
     12011-10-07  Gavin Barraclough  <barraclough@apple.com>
     2
     3        Refactor DFG to make for use of callOperation
     4        https://bugs.webkit.org/show_bug.cgi?id=69672
     5
     6        Reviewed by Oliver Hunt.
     7
     8        * dfg/DFGJITCodeGenerator.h:
     9        (JSC::DFG::callOperation):
     10            - Added new callOperation calls, don't ASSERT flushed (use helpers for unexpected calls, too).
     11        * dfg/DFGOperations.cpp:
     12        * dfg/DFGOperations.h:
     13            - Switch operationNewObject/operationCreateThis to return Cells,
     14            - Added C_DFGOperation_E/C_DFGOperation_EC/J_DFGOperation_EA/J_DFGOperation_EJA call types.
     15        * dfg/DFGSpeculativeJIT32_64.cpp:
     16        (JSC::DFG::SpeculativeJIT::compileLogicalNot):
     17        (JSC::DFG::SpeculativeJIT::emitBranch):
     18        (JSC::DFG::SpeculativeJIT::compile):
     19            - Replace code plating calls to operations to with calls to callOperation.
     20        * dfg/DFGSpeculativeJIT64.cpp:
     21        (JSC::DFG::SpeculativeJIT::compileLogicalNot):
     22        (JSC::DFG::SpeculativeJIT::emitBranch):
     23        (JSC::DFG::SpeculativeJIT::compile):
     24            - Replace code plating calls to operations to with calls to callOperation.
     25
    1262011-10-07  Oliver Hunt  <oliver@apple.com>
    227
  • trunk/Source/JavaScriptCore/dfg/DFGJITCodeGenerator.h

    r96871 r96988  
    10571057    void callOperation(J_DFGOperation_EP operation, GPRReg result, void* pointer)
    10581058    {
    1059         ASSERT(isFlushed());
    1060 
    10611059        m_jit.move(JITCompiler::TrustedImmPtr(pointer), GPRInfo::argumentGPR1);
    10621060        m_jit.move(GPRInfo::callFrameRegister, GPRInfo::argumentGPR0);
     
    10691067        callOperation((J_DFGOperation_EP)operation, result, identifier);
    10701068    }
     1069    void callOperation(J_DFGOperation_EA operation, GPRReg result, GPRReg arg1)
     1070    {
     1071        callOperation((J_DFGOperation_EP)operation, result, arg1);
     1072    }
    10711073    void callOperation(J_DFGOperation_EPS operation, GPRReg result, void* pointer, size_t size)
    10721074    {
    1073         ASSERT(isFlushed());
    1074 
    10751075        m_jit.move(JITCompiler::TrustedImmPtr(size), GPRInfo::argumentGPR2);
    10761076        m_jit.move(JITCompiler::TrustedImmPtr(pointer), GPRInfo::argumentGPR1);
     
    10821082    void callOperation(J_DFGOperation_ESS operation, GPRReg result, int startConstant, int numConstants)
    10831083    {
    1084         ASSERT(isFlushed());
    1085 
    10861084        m_jit.move(JITCompiler::TrustedImm32(numConstants), GPRInfo::argumentGPR2);
    10871085        m_jit.move(JITCompiler::TrustedImm32(startConstant), GPRInfo::argumentGPR1);
     
    10931091    void callOperation(J_DFGOperation_EJP operation, GPRReg result, GPRReg arg1, void* pointer)
    10941092    {
    1095         ASSERT(isFlushed());
    1096 
    10971093        m_jit.move(arg1, GPRInfo::argumentGPR1);
    10981094        m_jit.move(JITCompiler::TrustedImmPtr(pointer), GPRInfo::argumentGPR2);
     
    11061102        callOperation((J_DFGOperation_EJP)operation, result, arg1, identifier);
    11071103    }
     1104    void callOperation(J_DFGOperation_EJA operation, GPRReg result, GPRReg arg1, GPRReg arg2)
     1105    {
     1106        callOperation((J_DFGOperation_EJP)operation, result, arg1, arg2);
     1107    }
     1108    // This also handles J_DFGOperation_EP!
    11081109    void callOperation(J_DFGOperation_EJ operation, GPRReg result, GPRReg arg1)
    11091110    {
    1110         ASSERT(isFlushed());
    1111 
    11121111        m_jit.move(arg1, GPRInfo::argumentGPR1);
    11131112        m_jit.move(GPRInfo::callFrameRegister, GPRInfo::argumentGPR0);
     
    11161115        m_jit.move(GPRInfo::returnValueGPR, result);
    11171116    }
    1118     void callOperation(Z_DFGOperation_EJ operation, GPRReg result, GPRReg arg1)
    1119     {
    1120         ASSERT(isFlushed());
    1121 
     1117    void callOperation(C_DFGOperation_E operation, GPRReg result)
     1118    {
     1119        m_jit.move(GPRInfo::callFrameRegister, GPRInfo::argumentGPR0);
     1120
     1121        appendCallWithExceptionCheck(operation);
     1122        m_jit.move(GPRInfo::returnValueGPR, result);
     1123    }
     1124    void callOperation(C_DFGOperation_EC operation, GPRReg result, GPRReg arg1)
     1125    {
    11221126        m_jit.move(arg1, GPRInfo::argumentGPR1);
    11231127        m_jit.move(GPRInfo::callFrameRegister, GPRInfo::argumentGPR0);
     
    11261130        m_jit.move(GPRInfo::returnValueGPR, result);
    11271131    }
     1132    void callOperation(Z_DFGOperation_EJ operation, GPRReg result, GPRReg arg1)
     1133    {
     1134        m_jit.move(arg1, GPRInfo::argumentGPR1);
     1135        m_jit.move(GPRInfo::callFrameRegister, GPRInfo::argumentGPR0);
     1136
     1137        appendCallWithExceptionCheck(operation);
     1138        m_jit.move(GPRInfo::returnValueGPR, result);
     1139    }
    11281140    void callOperation(Z_DFGOperation_EJJ operation, GPRReg result, GPRReg arg1, GPRReg arg2)
    11291141    {
    1130         ASSERT(isFlushed());
    1131 
    11321142        setupStubArguments(arg1, arg2);
    11331143        m_jit.move(GPRInfo::callFrameRegister, GPRInfo::argumentGPR0);
     
    11361146        m_jit.move(GPRInfo::returnValueGPR, result);
    11371147    }
     1148    // This also handles J_DFGOperation_EJP!
    11381149    void callOperation(J_DFGOperation_EJJ operation, GPRReg result, GPRReg arg1, GPRReg arg2)
    11391150    {
    1140         ASSERT(isFlushed());
    1141 
    11421151        setupStubArguments(arg1, arg2);
    11431152        m_jit.move(GPRInfo::callFrameRegister, GPRInfo::argumentGPR0);
     
    11481157    void callOperation(V_DFGOperation_EJJP operation, GPRReg arg1, GPRReg arg2, void* pointer)
    11491158    {
    1150         ASSERT(isFlushed());
    1151 
    11521159        setupStubArguments(arg1, arg2);
    11531160        m_jit.move(JITCompiler::TrustedImmPtr(pointer), GPRInfo::argumentGPR3);
     
    11621169    void callOperation(V_DFGOperation_EJJJ operation, GPRReg arg1, GPRReg arg2, GPRReg arg3)
    11631170    {
    1164         ASSERT(isFlushed());
    1165 
    11661171        setupStubArguments(arg1, arg2, arg3);
    11671172        m_jit.move(GPRInfo::callFrameRegister, GPRInfo::argumentGPR0);
     
    11711176    void callOperation(D_DFGOperation_DD operation, FPRReg result, FPRReg arg1, FPRReg arg2)
    11721177    {
    1173         ASSERT(isFlushed());
    1174 
    11751178        setupTwoStubArgs<FPRInfo::argumentFPR0, FPRInfo::argumentFPR1>(arg1, arg2);
    11761179
     
    12031206    void callOperation(J_DFGOperation_EP operation, GPRReg resultTag, GPRReg resultPayload, void* pointer)
    12041207    {
    1205         ASSERT(isFlushed());
    1206 
    12071208        m_jit.push(JITCompiler::TrustedImm32(reinterpret_cast<int>(pointer)));
    12081209        m_jit.push(GPRInfo::callFrameRegister);
     
    12111212        setupResults(resultTag, resultPayload);
    12121213    }
     1214    void callOperation(J_DFGOperation_EP operation, GPRReg resultTag, GPRReg resultPayload, GPRReg arg1)
     1215    {
     1216        m_jit.push(arg1);
     1217        m_jit.push(GPRInfo::callFrameRegister);
     1218
     1219        appendCallWithExceptionCheck(operation);
     1220        setupResults(resultTag, resultPayload);
     1221    }
    12131222    void callOperation(J_DFGOperation_EI operation, GPRReg resultTag, GPRReg resultPayload, Identifier* identifier)
    12141223    {
    12151224        callOperation((J_DFGOperation_EP)operation, resultTag, resultPayload, identifier);
    12161225    }
     1226    void callOperation(J_DFGOperation_EA operation, GPRReg resultTag, GPRReg resultPayload, GPRReg arg1)
     1227    {
     1228        callOperation((J_DFGOperation_EP)operation, resultTag, resultPayload, arg1);
     1229    }
    12171230    void callOperation(J_DFGOperation_EPS operation, GPRReg resultTag, GPRReg resultPayload, void* pointer, size_t size)
    12181231    {
    1219         ASSERT(isFlushed());
    1220 
    12211232        m_jit.push(JITCompiler::TrustedImm32(size));
    12221233        m_jit.push(JITCompiler::TrustedImm32(reinterpret_cast<int>(pointer)));
     
    12281239    void callOperation(J_DFGOperation_ESS operation, GPRReg resultTag, GPRReg resultPayload, int startConstant, int numConstants)
    12291240    {
    1230         ASSERT(isFlushed());
    1231 
    12321241        m_jit.push(JITCompiler::TrustedImm32(numConstants));
    12331242        m_jit.push(JITCompiler::TrustedImm32(startConstant));
     
    12391248    void callOperation(J_DFGOperation_EJP operation, GPRReg resultTag, GPRReg resultPayload, GPRReg arg1Tag, GPRReg arg1Payload, void* pointer)
    12401249    {
    1241         ASSERT(isFlushed());
    1242 
    12431250        m_jit.push(JITCompiler::TrustedImm32(reinterpret_cast<int>(pointer)));
    12441251        m_jit.push(arg1Tag);
     
    12491256        setupResults(resultTag, resultPayload);
    12501257    }
    1251     void callOperation(J_DFGOperation_EJI operation, GPRReg resultTag, GPRReg resultPayload, GPRReg arg1Tag, GPRReg arg1Payload, Identifier* identifier)
    1252     {
    1253         callOperation((J_DFGOperation_EJP)operation, resultTag, resultPayload, arg1Tag, arg1Payload, identifier);
    1254     }
    1255     void callOperation(J_DFGOperation_EJ operation, GPRReg resultTag, GPRReg resultPayload, GPRReg arg1Tag, GPRReg arg1Payload)
    1256     {
    1257         ASSERT(isFlushed());
    1258 
     1258    void callOperation(J_DFGOperation_EJP operation, GPRReg resultTag, GPRReg resultPayload, GPRReg arg1Tag, GPRReg arg1Payload, GPRReg arg2)
     1259    {
     1260        m_jit.push(arg2);
    12591261        m_jit.push(arg1Tag);
    12601262        m_jit.push(arg1Payload);
     
    12641266        setupResults(resultTag, resultPayload);
    12651267    }
    1266     void callOperation(Z_DFGOperation_EJ operation, GPRReg result, GPRReg arg1Tag, GPRReg arg1Payload)
    1267     {
    1268         ASSERT(isFlushed());
    1269 
     1268    void callOperation(J_DFGOperation_EJI operation, GPRReg resultTag, GPRReg resultPayload, GPRReg arg1Tag, GPRReg arg1Payload, Identifier* identifier)
     1269    {
     1270        callOperation((J_DFGOperation_EJP)operation, resultTag, resultPayload, arg1Tag, arg1Payload, identifier);
     1271    }
     1272    void callOperation(J_DFGOperation_EJA operation, GPRReg resultTag, GPRReg resultPayload, GPRReg arg1Tag, GPRReg arg1Payload, GPRReg arg2)
     1273    {
     1274        callOperation((J_DFGOperation_EJP)operation, resultTag, resultPayload, arg1Tag, arg1Payload, arg2);
     1275    }
     1276    void callOperation(J_DFGOperation_EJ operation, GPRReg resultTag, GPRReg resultPayload, GPRReg arg1Tag, GPRReg arg1Payload)
     1277    {
    12701278        m_jit.push(arg1Tag);
    12711279        m_jit.push(arg1Payload);
     
    12731281
    12741282        appendCallWithExceptionCheck(operation);
     1283        setupResults(resultTag, resultPayload);
     1284    }
     1285    void callOperation(C_DFGOperation_E operation, GPRReg result)
     1286    {
     1287        m_jit.push(GPRInfo::callFrameRegister);
     1288
     1289        appendCallWithExceptionCheck(operation);
    12751290        m_jit.move(GPRInfo::returnValueGPR, result);
    12761291    }
     1292    void callOperation(C_DFGOperation_EC operation, GPRReg result, GPRReg arg1)
     1293    {
     1294        m_jit.push(arg1);
     1295        m_jit.push(GPRInfo::callFrameRegister);
     1296
     1297        appendCallWithExceptionCheck(operation);
     1298        m_jit.move(GPRInfo::returnValueGPR, result);
     1299    }
     1300    void callOperation(Z_DFGOperation_EJ operation, GPRReg result, GPRReg arg1Tag, GPRReg arg1Payload)
     1301    {
     1302        m_jit.push(arg1Tag);
     1303        m_jit.push(arg1Payload);
     1304        m_jit.push(GPRInfo::callFrameRegister);
     1305
     1306        appendCallWithExceptionCheck(operation);
     1307        m_jit.move(GPRInfo::returnValueGPR, result);
     1308    }
    12771309    void callOperation(Z_DFGOperation_EJJ operation, GPRReg result, GPRReg arg1Tag, GPRReg arg1Payload, GPRReg arg2Tag, GPRReg arg2Payload)
    12781310    {
    1279         ASSERT(isFlushed());
    1280 
    12811311        m_jit.push(arg2Tag);
    12821312        m_jit.push(arg2Payload);
     
    12901320    void callOperation(J_DFGOperation_EJJ operation, GPRReg resultTag, GPRReg resultPayload, GPRReg arg1Tag, GPRReg arg1Payload, GPRReg arg2Tag, GPRReg arg2Payload)
    12911321    {
    1292         ASSERT(isFlushed());
    1293 
    12941322        m_jit.push(arg2Tag);
    12951323        m_jit.push(arg2Payload);
     
    13031331    void callOperation(V_DFGOperation_EJJP operation, GPRReg arg1Tag, GPRReg arg1Payload, GPRReg arg2Tag, GPRReg arg2Payload, void* pointer)
    13041332    {
    1305         ASSERT(isFlushed());
    1306 
    13071333        m_jit.push(JITCompiler::TrustedImm32(reinterpret_cast<int>(pointer)));
    13081334        m_jit.push(arg2Tag);
     
    13201346    void callOperation(V_DFGOperation_EJJJ operation, GPRReg arg1Tag, GPRReg arg1Payload, GPRReg arg2Tag, GPRReg arg2Payload, GPRReg arg3Tag, GPRReg arg3Payload)
    13211347    {
    1322         ASSERT(isFlushed());
    1323 
    13241348        m_jit.push(arg3Tag);
    13251349        m_jit.push(arg3Payload);
     
    13351359    void callOperation(D_DFGOperation_DD operation, FPRReg result, FPRReg arg1, FPRReg arg2)
    13361360    {
    1337         ASSERT(isFlushed());
    1338 
    13391361        m_jit.subPtr(TrustedImm32(2 * sizeof(double)), JITCompiler::stackPointerRegister);
    13401362        m_jit.storeDouble(arg2, JITCompiler::Address(JITCompiler::stackPointerRegister, sizeof(double)));
  • trunk/Source/JavaScriptCore/dfg/DFGOperations.cpp

    r96750 r96988  
    136136}
    137137
    138 EncodedJSValue DFG_OPERATION operationCreateThis(ExecState* exec, EncodedJSValue encodedOp)
     138JSCell* DFG_OPERATION operationCreateThis(ExecState* exec, JSCell* prototype)
    139139{
    140140    JSFunction* constructor = asFunction(exec->callee());
     
    148148   
    149149    Structure* structure;
    150     JSValue proto = JSValue::decode(encodedOp);
    151     if (proto.isObject())
    152         structure = asObject(proto)->inheritorID(globalData);
     150    if (prototype->isObject())
     151        structure = asObject(prototype)->inheritorID(globalData);
    153152    else
    154153        structure = constructor->scope()->globalObject->emptyObjectStructure();
    155154   
    156     return JSValue::encode(constructEmptyObject(exec, structure));
    157 }
    158 
    159 EncodedJSValue DFG_OPERATION operationNewObject(ExecState* exec)
    160 {
    161     return JSValue::encode(constructEmptyObject(exec));
     155    return constructEmptyObject(exec, structure);
     156}
     157
     158JSCell* DFG_OPERATION operationNewObject(ExecState* exec)
     159{
     160    return constructEmptyObject(exec);
    162161}
    163162
     
    375374}
    376375
    377 EncodedJSValue DFG_OPERATION operationArrayPush(ExecState* exec, JSArray* array, EncodedJSValue encodedValue)
     376EncodedJSValue DFG_OPERATION operationArrayPush(ExecState* exec, EncodedJSValue encodedValue, JSArray* array)
    378377{
    379378    array->push(exec, JSValue::decode(encodedValue));
  • trunk/Source/JavaScriptCore/dfg/DFGOperations.h

    r96567 r96988  
    5151// These typedefs provide typechecking when generating calls out to helper routines;
    5252// this helps prevent calling a helper routine with the wrong arguments!
     53typedef JSCell* DFG_OPERATION (*C_DFGOperation_E)(ExecState*);
     54typedef JSCell* DFG_OPERATION (*C_DFGOperation_EC)(ExecState*, JSCell*);
     55typedef EncodedJSValue DFG_OPERATION (*J_DFGOperation_EA)(ExecState*, JSArray*);
     56typedef EncodedJSValue DFG_OPERATION (*J_DFGOperation_EJA)(ExecState*, EncodedJSValue, JSArray*);
    5357typedef EncodedJSValue DFG_OPERATION (*J_DFGOperation_EJJ)(ExecState*, EncodedJSValue, EncodedJSValue);
    5458typedef EncodedJSValue DFG_OPERATION (*J_DFGOperation_EJ)(ExecState*, EncodedJSValue);
     
    6872
    6973// These routines are provide callbacks out to C++ implementations of operations too complex to JIT.
     74JSCell* DFG_OPERATION operationNewObject(ExecState*);
     75JSCell* DFG_OPERATION operationCreateThis(ExecState*, JSCell* encodedOp1);
    7076EncodedJSValue DFG_OPERATION operationConvertThis(ExecState*, EncodedJSValue encodedOp1);
    71 EncodedJSValue DFG_OPERATION operationCreateThis(ExecState*, EncodedJSValue encodedOp1);
    72 EncodedJSValue DFG_OPERATION operationNewObject(ExecState*);
    7377EncodedJSValue DFG_OPERATION operationValueAdd(ExecState*, EncodedJSValue encodedOp1, EncodedJSValue encodedOp2);
    7478EncodedJSValue DFG_OPERATION operationValueAddNotNumber(ExecState*, EncodedJSValue encodedOp1, EncodedJSValue encodedOp2);
     
    98102void DFG_OPERATION operationPutByValNonStrict(ExecState*, EncodedJSValue encodedBase, EncodedJSValue encodedProperty, EncodedJSValue encodedValue);
    99103void DFG_OPERATION operationPutByValBeyondArrayBounds(ExecState*, JSArray*, int32_t index, EncodedJSValue encodedValue);
    100 EncodedJSValue DFG_OPERATION operationArrayPush(ExecState*, JSArray*, EncodedJSValue encodedValue);
     104EncodedJSValue DFG_OPERATION operationArrayPush(ExecState*, EncodedJSValue encodedValue, JSArray*);
    101105EncodedJSValue DFG_OPERATION operationArrayPop(ExecState*, JSArray*);
    102106void DFG_OPERATION operationPutByIdStrict(ExecState*, EncodedJSValue encodedValue, EncodedJSValue encodedBase, Identifier*);
  • trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT32_64.cpp

    r96983 r96988  
    529529       
    530530    silentSpillAllRegisters(resultTagGPR, resultPayloadGPR);
    531     m_jit.push(arg1TagGPR);
    532     m_jit.push(arg1PayloadGPR);
    533     m_jit.push(GPRInfo::callFrameRegister);
    534     appendCallWithExceptionCheck(dfgConvertJSValueToBoolean);
    535     m_jit.move(GPRInfo::returnValueGPR, resultPayloadGPR);
     531    callOperation(dfgConvertJSValueToBoolean, resultPayloadGPR, arg1TagGPR, arg1PayloadGPR);
    536532    silentFillAllRegisters(resultTagGPR, resultPayloadGPR);
    537533    JITCompiler::Jump doNot = m_jit.jump();
     
    621617        slowPath.link(&m_jit);
    622618        silentSpillAllRegisters(resultGPR);
    623         m_jit.push(valueTagGPR);
    624         m_jit.push(valuePayloadGPR);
    625         m_jit.push(GPRInfo::callFrameRegister);
    626         appendCallWithExceptionCheck(dfgConvertJSValueToBoolean);
    627         m_jit.move(GPRInfo::returnValueGPR, resultGPR);
     619        callOperation(dfgConvertJSValueToBoolean, resultGPR, valueTagGPR, valuePayloadGPR);
    628620        silentFillAllRegisters(resultGPR);
    629621   
     
    14331425       
    14341426        silentSpillAllRegisters(storageGPR, storageLengthGPR);
    1435         m_jit.push(valueTagGPR);
    1436         m_jit.push(valuePayloadGPR);
    1437         m_jit.push(baseGPR);
    1438         m_jit.push(GPRInfo::callFrameRegister);
    1439         appendCallWithExceptionCheck(operationArrayPush);
    1440         setupResults(storageGPR, storageLengthGPR);
     1427        callOperation(operationArrayPush, storageGPR, storageLengthGPR, valueTagGPR, valuePayloadGPR, baseGPR);
    14411428        silentFillAllRegisters(storageGPR, storageLengthGPR);
    14421429       
     
    14971484       
    14981485        silentSpillAllRegisters(valueTagGPR, valuePayloadGPR);
    1499         m_jit.push(baseGPR);
    1500         m_jit.push(GPRInfo::callFrameRegister);
    1501         appendCallWithExceptionCheck(operationArrayPop);
    1502         setupResults(valueTagGPR, valuePayloadGPR);
     1486        callOperation(operationArrayPop, valueTagGPR, valuePayloadGPR, baseGPR);
    15031487        silentFillAllRegisters(valueTagGPR, valuePayloadGPR);
    15041488       
     
    16301614           
    16311615            silentSpillAllRegisters(resultTagGPR, resultPayloadGPR);
    1632             m_jit.push(op1TagGPR);
    1633             m_jit.push(op1PayloadGPR);
    1634             m_jit.push(GPRInfo::callFrameRegister);
    1635             appendCallWithExceptionCheck(operationToPrimitive);
    1636             setupResults(resultTagGPR, resultPayloadGPR);
     1616            callOperation(operationToPrimitive, resultTagGPR, resultPayloadGPR, op1TagGPR, op1PayloadGPR);
    16371617            silentFillAllRegisters(resultTagGPR, resultPayloadGPR);
    16381618           
     
    17981778       
    17991779        silentSpillAllRegisters(resultGPR);
    1800         m_jit.push(TrustedImm32(JSValue::CellTag));
    1801         m_jit.push(protoGPR);
    1802         m_jit.push(GPRInfo::callFrameRegister);
    1803         appendCallWithExceptionCheck(operationCreateThis);
    1804         m_jit.move(GPRInfo::returnValueGPR, resultGPR);
     1780        callOperation(operationCreateThis, resultGPR, protoGPR);
    18051781        silentFillAllRegisters(resultGPR);
    18061782       
     
    18271803       
    18281804        silentSpillAllRegisters(resultGPR);
    1829         m_jit.push(GPRInfo::callFrameRegister);
    1830         appendCallWithExceptionCheck(operationNewObject);
    1831         m_jit.move(GPRInfo::returnValueGPR, resultGPR);
     1805        callOperation(operationNewObject, resultGPR);
    18321806        silentFillAllRegisters(resultGPR);
    18331807       
  • trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp

    r96983 r96988  
    622622   
    623623    silentSpillAllRegisters(resultGPR);
    624     m_jit.move(arg1GPR, GPRInfo::argumentGPR1);
    625     m_jit.move(GPRInfo::callFrameRegister, GPRInfo::argumentGPR0);
    626     appendCallWithExceptionCheck(dfgConvertJSValueToBoolean);
    627     m_jit.move(GPRInfo::returnValueGPR, resultGPR);
     624    callOperation(dfgConvertJSValueToBoolean, resultGPR, arg1GPR);
    628625    silentFillAllRegisters(resultGPR);
    629626   
     
    729726   
    730727            silentSpillAllRegisters(resultGPR);
    731             m_jit.move(valueGPR, GPRInfo::argumentGPR1);
    732             m_jit.move(GPRInfo::callFrameRegister, GPRInfo::argumentGPR0);
    733             appendCallWithExceptionCheck(dfgConvertJSValueToBoolean);
    734             m_jit.move(GPRInfo::returnValueGPR, resultGPR);
     728            callOperation(dfgConvertJSValueToBoolean, resultGPR, valueGPR);
    735729            silentFillAllRegisters(resultGPR);
    736730   
     
    15431537       
    15441538        silentSpillAllRegisters(storageLengthGPR);
    1545         setupStubArguments(baseGPR, valueGPR);
    1546         m_jit.move(GPRInfo::callFrameRegister, GPRInfo::argumentGPR0);
    1547         appendCallWithExceptionCheck(operationArrayPush);
    1548         m_jit.move(GPRInfo::returnValueGPR, storageLengthGPR);
     1539        callOperation(operationArrayPush, storageLengthGPR, valueGPR, baseGPR);
    15491540        silentFillAllRegisters(storageLengthGPR);
    15501541       
     
    15991590       
    16001591        silentSpillAllRegisters(valueGPR);
    1601         m_jit.move(baseGPR, GPRInfo::argumentGPR1);
    1602         m_jit.move(GPRInfo::callFrameRegister, GPRInfo::argumentGPR0);
    1603         appendCallWithExceptionCheck(operationArrayPop);
    1604         m_jit.move(GPRInfo::returnValueGPR, valueGPR);
     1592        callOperation(operationArrayPop, valueGPR, baseGPR);
    16051593        silentFillAllRegisters(valueGPR);
    16061594       
     
    17161704           
    17171705            silentSpillAllRegisters(resultGPR);
    1718             m_jit.move(op1GPR, GPRInfo::argumentGPR1);
    1719             m_jit.move(GPRInfo::callFrameRegister, GPRInfo::argumentGPR0);
    1720             appendCallWithExceptionCheck(operationToPrimitive);
    1721             m_jit.move(GPRInfo::returnValueGPR, resultGPR);
     1706            callOperation(operationToPrimitive, resultGPR, op1GPR);
    17221707            silentFillAllRegisters(resultGPR);
    17231708           
     
    18711856       
    18721857        silentSpillAllRegisters(resultGPR);
    1873         m_jit.move(protoGPR, GPRInfo::argumentGPR1);
    1874         m_jit.move(GPRInfo::callFrameRegister, GPRInfo::argumentGPR0);
    1875         appendCallWithExceptionCheck(operationCreateThis);
    1876         m_jit.move(GPRInfo::returnValueGPR, resultGPR);
     1858        callOperation(operationCreateThis, resultGPR, protoGPR);
    18771859        silentFillAllRegisters(resultGPR);
    18781860       
     
    18991881       
    19001882        silentSpillAllRegisters(resultGPR);
    1901         m_jit.move(GPRInfo::callFrameRegister, GPRInfo::argumentGPR0);
    1902         appendCallWithExceptionCheck(operationNewObject);
    1903         m_jit.move(GPRInfo::returnValueGPR, resultGPR);
     1883        callOperation(operationNewObject, resultGPR);
    19041884        silentFillAllRegisters(resultGPR);
    19051885       
Note: See TracChangeset for help on using the changeset viewer.