Changeset 175512 in webkit


Ignore:
Timestamp:
Nov 3, 2014 8:59:19 PM (9 years ago)
Author:
commit-queue@webkit.org
Message:

Unreviewed, rolling out r175509.
https://bugs.webkit.org/show_bug.cgi?id=138349

broke some builds (Requested by msaboff on #webkit).

Reverted changeset:

"Update scope related slow path code to use scope register
added to opcodes"
https://bugs.webkit.org/show_bug.cgi?id=138254
http://trac.webkit.org/changeset/175509

Location:
trunk/Source/JavaScriptCore
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r175509 r175512  
     12014-11-03  Commit Queue  <commit-queue@webkit.org>
     2
     3        Unreviewed, rolling out r175509.
     4        https://bugs.webkit.org/show_bug.cgi?id=138349
     5
     6        broke some builds (Requested by msaboff on #webkit).
     7
     8        Reverted changeset:
     9
     10        "Update scope related slow path code to use scope register
     11        added to opcodes"
     12        https://bugs.webkit.org/show_bug.cgi?id=138254
     13        http://trac.webkit.org/changeset/175509
     14
    1152014-11-03  Michael Saboff  <msaboff@apple.com>
    216
  • trunk/Source/JavaScriptCore/assembler/MacroAssemblerCodeRef.h

    r175509 r175512  
    133133    }
    134134
    135     template<typename returnType, typename argType1, typename argType2, typename argType3, typename argType4, typename argType5, typename argType6>
    136     FunctionPtr(returnType(*value)(argType1, argType2, argType3, argType4, argType5, argType6))
    137         : m_value((void*)value)
    138     {
    139         ASSERT_VALID_CODE_POINTER(m_value);
    140     }
    141135// MSVC doesn't seem to treat functions with different calling conventions as
    142136// different types; these methods already defined for fastcall, below.
  • trunk/Source/JavaScriptCore/jit/CCallHelpers.h

    r175509 r175512  
    290290    }
    291291
    292     ALWAYS_INLINE void setupArgumentsWithExecState(TrustedImm32 arg1, GPRReg arg2, GPRReg arg3)
    293     {
    294         resetCallArguments();
    295         addCallArgument(GPRInfo::callFrameRegister);
    296         addCallArgument(arg1);
    297         addCallArgument(arg2);
    298         addCallArgument(arg3);
    299     }
    300 
    301292    ALWAYS_INLINE void setupArgumentsWithExecState(TrustedImmPtr arg1, GPRReg arg2, GPRReg arg3)
    302293    {
     
    395386
    396387    ALWAYS_INLINE void setupArgumentsWithExecState(GPRReg arg1, TrustedImmPtr arg2, TrustedImm32 arg3, GPRReg arg4, GPRReg arg5)
    397     {
    398         resetCallArguments();
    399         addCallArgument(GPRInfo::callFrameRegister);
    400         addCallArgument(arg1);
    401         addCallArgument(arg2);
    402         addCallArgument(arg3);
    403         addCallArgument(arg4);
    404         addCallArgument(arg5);
    405     }
    406 
    407     ALWAYS_INLINE void setupArgumentsWithExecState(TrustedImm32 arg1, TrustedImmPtr arg2, GPRReg arg3, GPRReg arg4, TrustedImm32 arg5)
    408388    {
    409389        resetCallArguments();
     
    14021382    }
    14031383
    1404     ALWAYS_INLINE void setupArgumentsWithExecState(TrustedImm32 arg1, TrustedImmPtr arg2, GPRReg arg3, TrustedImm32 arg4, TrustedImm32 arg5)
    1405     {
    1406         poke(arg5, POKE_ARGUMENT_OFFSET + 1);
    1407         poke(arg4, POKE_ARGUMENT_OFFSET);
    1408         setupArgumentsWithExecState(arg1, arg2, arg3);
    1409     }
    1410 
    14111384    ALWAYS_INLINE void setupArgumentsWithExecState(TrustedImmPtr arg1, GPRReg arg2, GPRReg arg3, TrustedImm32 arg4, TrustedImm32 arg5)
    14121385    {
     
    15411514
    15421515    ALWAYS_INLINE void setupArgumentsWithExecState(TrustedImm32 arg1, TrustedImm32 arg2, TrustedImm32 arg3, GPRReg arg4, GPRReg arg5)
    1543     {
    1544         poke(arg5, POKE_ARGUMENT_OFFSET + 1);
    1545         poke(arg4, POKE_ARGUMENT_OFFSET);
    1546         setupArgumentsWithExecState(arg1, arg2, arg3);
    1547     }
    1548 
    1549     ALWAYS_INLINE void setupArgumentsWithExecState(TrustedImmPtr arg1, TrustedImmPtr arg2, GPRReg arg3, TrustedImm32 arg4, TrustedImm32 arg5)
    15501516    {
    15511517        poke(arg5, POKE_ARGUMENT_OFFSET + 1);
     
    17101676        move(arg3, GPRInfo::argumentGPR3);
    17111677        move(arg4, GPRInfo::argumentGPR4);
    1712         move(GPRInfo::callFrameRegister, GPRInfo::argumentGPR0);
    1713     }
    1714 
    1715     ALWAYS_INLINE void setupArgumentsWithExecState(TrustedImm32 arg1, TrustedImmPtr arg2, GPRReg arg3, TrustedImm32 arg4, TrustedImm32 arg5)
    1716     {
    1717         move(arg3, GPRInfo::argumentGPR3);
    1718         move(arg1, GPRInfo::argumentGPR1);
    1719         move(arg2, GPRInfo::argumentGPR2);
    1720         move(arg4, GPRInfo::argumentGPR4);
    1721         move(arg5, GPRInfo::argumentGPR5);
    17221678        move(GPRInfo::callFrameRegister, GPRInfo::argumentGPR0);
    17231679    }
  • trunk/Source/JavaScriptCore/jit/JIT.h

    r175509 r175512  
    717717        MacroAssembler::Call callOperation(V_JITOperation_ECICC, RegisterID, const Identifier*, RegisterID, RegisterID);
    718718        MacroAssembler::Call callOperation(J_JITOperation_EE, RegisterID);
    719 #if USE(JSVALUE64)
    720         MacroAssembler::Call callOperation(V_JITOperation_EZIdJZZ, int, const Identifier*, RegisterID, int32_t, int32_t);
    721 #else
    722         MacroAssembler::Call callOperation(V_JITOperation_EZIdJZ, int, const Identifier*, RegisterID, int32_t);
    723 #endif
     719        MacroAssembler::Call callOperation(V_JITOperation_EIdJZZ, const Identifier*, RegisterID, int32_t, int32_t);
    724720        MacroAssembler::Call callOperation(V_JITOperation_EJ, RegisterID);
    725721#if USE(JSVALUE64)
     
    740736        MacroAssembler::Call callOperation(V_JITOperation_EPc, Instruction*);
    741737        MacroAssembler::Call callOperation(V_JITOperation_EZ, int32_t);
    742         MacroAssembler::Call callOperation(V_JITOperation_EZJ, int, GPRReg);
    743738        MacroAssembler::Call callOperationWithCallFrameRollbackOnException(J_JITOperation_E);
    744739        MacroAssembler::Call callOperationWithCallFrameRollbackOnException(V_JITOperation_ECb, CodeBlock*);
     
    754749        MacroAssembler::Call callOperation(S_JITOperation_EJ, RegisterID, RegisterID);
    755750        MacroAssembler::Call callOperation(S_JITOperation_EJJ, RegisterID, RegisterID, RegisterID, RegisterID);
    756         MacroAssembler::Call callOperation(V_JITOperation_EZIdJZ, int, const Identifier*, RegisterID, RegisterID, int32_t);
     751        MacroAssembler::Call callOperation(V_JITOperation_EIdJZZ, const Identifier*, RegisterID, RegisterID, int32_t, int32_t);
    757752        MacroAssembler::Call callOperation(V_JITOperation_EJ, RegisterID, RegisterID);
    758753        MacroAssembler::Call callOperation(V_JITOperation_EJJJ, RegisterID, RegisterID, RegisterID, RegisterID, RegisterID, RegisterID);
    759754        MacroAssembler::Call callOperation(V_JITOperation_EJZ, RegisterID, RegisterID, int32_t);
    760755        MacroAssembler::Call callOperation(V_JITOperation_EJZJ, RegisterID, RegisterID, int32_t, RegisterID, RegisterID);
    761         MacroAssembler::Call callOperation(V_JITOperation_EZJ, int32_t, RegisterID, RegisterID);
    762756#endif
    763757
  • trunk/Source/JavaScriptCore/jit/JITInlines.h

    r175509 r175512  
    381381}
    382382
    383 ALWAYS_INLINE MacroAssembler::Call JIT::callOperation(V_JITOperation_EZJ operation, int dst, GPRReg arg)
    384 {
    385     setupArgumentsWithExecState(TrustedImm32(dst), arg);
    386     return appendCallWithExceptionCheck(operation);
    387 }
    388 
    389383ALWAYS_INLINE MacroAssembler::Call JIT::callOperation(JIT::WithProfileTag, J_JITOperation_ESsiJI operation, int dst, StructureStubInfo* stubInfo, GPRReg arg1, StringImpl* uid)
    390384{
     
    448442}
    449443
    450 ALWAYS_INLINE MacroAssembler::Call JIT::callOperation(V_JITOperation_EZIdJZZ operation, int op1, const Identifier* identOp2, RegisterID regOp3, int32_t op4, int32_t op5)
    451 {
    452     setupArgumentsWithExecState(TrustedImm32(op1), TrustedImmPtr(identOp2), regOp3, TrustedImm32(op4), TrustedImm32(op5));
     444ALWAYS_INLINE MacroAssembler::Call JIT::callOperation(V_JITOperation_EIdJZZ operation, const Identifier* identOp1, RegisterID regOp2, int32_t op3, int32_t op4)
     445{
     446    setupArgumentsWithExecState(TrustedImmPtr(identOp1), regOp2, TrustedImm32(op3), TrustedImm32(op4));
    453447    return appendCallWithExceptionCheck(operation);
    454448}
     
    582576}
    583577
    584 ALWAYS_INLINE MacroAssembler::Call JIT::callOperation(V_JITOperation_EZIdJZ operation, int32_t op1, const Identifier* identOp2, RegisterID regOp3Tag, RegisterID regOp3Payload, int32_t op4)
    585 {
    586     setupArgumentsWithExecState(TrustedImm32(op1), TrustedImmPtr(identOp2), regOp3Payload, regOp3Tag, TrustedImm32(op4));
     578ALWAYS_INLINE MacroAssembler::Call JIT::callOperation(V_JITOperation_EIdJZZ operation, const Identifier* identOp1, RegisterID regOp2Tag, RegisterID regOp2Payload, int32_t op3, int32_t op4)
     579{
     580    setupArgumentsWithExecState(TrustedImmPtr(identOp1), regOp2Payload, regOp2Tag, TrustedImm32(op3), TrustedImm32(op4));
    587581    return appendCallWithExceptionCheck(operation);
    588582}
     
    597591{
    598592    setupArgumentsWithExecState(EABI_32BIT_DUMMY_ARG regOp1Payload, regOp1Tag, SH4_32BIT_DUMMY_ARG regOp2Payload, regOp2Tag, regOp3Payload, regOp3Tag);
    599     return appendCallWithExceptionCheck(operation);
    600 }
    601 
    602 ALWAYS_INLINE MacroAssembler::Call JIT::callOperation(V_JITOperation_EZJ operation, int dst, RegisterID regOp1Tag, RegisterID regOp1Payload)
    603 {
    604     setupArgumentsWithExecState(TrustedImm32(dst), regOp1Payload, regOp1Tag);
    605593    return appendCallWithExceptionCheck(operation);
    606594}
  • trunk/Source/JavaScriptCore/jit/JITOpcodes.cpp

    r175509 r175512  
    445445void JIT::emit_op_push_with_scope(Instruction* currentInstruction)
    446446{
    447     int dst = currentInstruction[1].u.operand;
    448447    emitGetVirtualRegister(currentInstruction[2].u.operand, regT0);
    449     callOperation(operationPushWithScope, dst, regT0);
    450 }
    451 
    452 void JIT::emit_op_pop_scope(Instruction* currentInstruction)
    453 {
    454     int scope = currentInstruction[1].u.operand;
    455 
    456     callOperation(operationPopScope, scope);
     448    callOperation(operationPushWithScope, regT0);
     449}
     450
     451void JIT::emit_op_pop_scope(Instruction*)
     452{
     453    callOperation(operationPopScope);
    457454}
    458455
     
    510507void JIT::emit_op_push_name_scope(Instruction* currentInstruction)
    511508{
    512     int dst = currentInstruction[1].u.operand;
    513509    emitGetVirtualRegister(currentInstruction[3].u.operand, regT0);
    514     callOperation(operationPushNameScope, dst, &m_codeBlock->identifier(currentInstruction[2].u.operand), regT0, currentInstruction[4].u.operand, currentInstruction[5].u.operand);
     510    callOperation(operationPushNameScope, &m_codeBlock->identifier(currentInstruction[2].u.operand), regT0, currentInstruction[4].u.operand, currentInstruction[5].u.operand);
    515511}
    516512
  • trunk/Source/JavaScriptCore/jit/JITOpcodes32_64.cpp

    r175509 r175512  
    3838#include "JSEnvironmentRecord.h"
    3939#include "JSFunction.h"
    40 #include "JSNameScope.h"
    4140#include "JSPropertyNameEnumerator.h"
    4241#include "LinkBuffer.h"
     
    754753void JIT::emit_op_push_with_scope(Instruction* currentInstruction)
    755754{
    756     int dst = currentInstruction[1].u.operand;
    757755    emitLoad(currentInstruction[2].u.operand, regT1, regT0);
    758     callOperation(operationPushWithScope, dst, regT1, regT0);
    759 }
    760 
    761 void JIT::emit_op_pop_scope(Instruction* currentInstruction)
    762 {
    763     int scope = currentInstruction[1].u.operand;
    764     callOperation(operationPopScope, scope);
     756    callOperation(operationPushWithScope, regT1, regT0);
     757}
     758
     759void JIT::emit_op_pop_scope(Instruction*)
     760{
     761    callOperation(operationPopScope);
    765762}
    766763
     
    790787void JIT::emit_op_push_name_scope(Instruction* currentInstruction)
    791788{
    792     int dst = currentInstruction[1].u.operand;
    793789    emitLoad(currentInstruction[3].u.operand, regT1, regT0);
    794     if (currentInstruction[5].u.operand == JSNameScope::CatchScope) {
    795         callOperation(operationPushCatchScope, dst, &m_codeBlock->identifier(currentInstruction[2].u.operand), regT1, regT0, currentInstruction[4].u.operand);
    796         return;
    797     }
    798 
    799     RELEASE_ASSERT(currentInstruction[5].u.operand == JSNameScope::FunctionNameScope);
    800     callOperation(operationPushFunctionNameScope, dst, &m_codeBlock->identifier(currentInstruction[2].u.operand), regT1, regT0, currentInstruction[4].u.operand);
     790    callOperation(operationPushNameScope, &m_codeBlock->identifier(currentInstruction[2].u.operand), regT1, regT0, currentInstruction[4].u.operand, currentInstruction[5].u.operand);
    801791}
    802792
  • trunk/Source/JavaScriptCore/jit/JITOperations.cpp

    r175509 r175512  
    13091309#endif
    13101310
    1311 void JIT_OPERATION operationPushNameScope(ExecState* exec, int32_t dst, Identifier* identifier, EncodedJSValue encodedValue, int32_t attibutes, int32_t type)
     1311void JIT_OPERATION operationPushNameScope(ExecState* exec, Identifier* identifier, EncodedJSValue encodedValue, int32_t attibutes, int32_t type)
    13121312{
    13131313    VM& vm = exec->vm();
     
    13171317    JSNameScope* scope = JSNameScope::create(exec, *identifier, JSValue::decode(encodedValue), attibutes, scopeType);
    13181318
    1319     exec->uncheckedR(dst) = scope;
    1320 }
    1321 
    1322 #if USE(JSVALUE32_64)
    1323 void JIT_OPERATION operationPushCatchScope(ExecState* exec, int32_t dst, Identifier* identifier, EncodedJSValue encodedValue, int32_t attibutes)
    1324 {
    1325     operationPushNameScope(exec, dst, identifier, encodedValue, attibutes, JSNameScope::CatchScope);
    1326 }
    1327 
    1328 void JIT_OPERATION operationPushFunctionNameScope(ExecState* exec, int32_t dst, Identifier* identifier, EncodedJSValue encodedValue, int32_t attibutes)
    1329 {
    1330     operationPushNameScope(exec, dst, identifier, encodedValue, attibutes, JSNameScope::FunctionNameScope);
    1331 }
    1332 #endif
    1333 
    1334 void JIT_OPERATION operationPushWithScope(ExecState* exec, int32_t dst, EncodedJSValue encodedValue)
     1319    exec->setScope(scope);
     1320}
     1321
     1322void JIT_OPERATION operationPushWithScope(ExecState* exec, EncodedJSValue encodedValue)
    13351323{
    13361324    VM& vm = exec->vm();
     
    13411329        return;
    13421330
    1343     exec->uncheckedR(dst) = JSWithScope::create(exec, o);
    1344 }
    1345 
    1346 void JIT_OPERATION operationPopScope(ExecState* exec, int32_t scopeReg)
    1347 {
    1348     VM& vm = exec->vm();
    1349     NativeCallFrameTracer tracer(&vm, exec);
    1350 
    1351     JSScope* scope = exec->uncheckedR(scopeReg).Register::scope();
    1352     exec->uncheckedR(scopeReg) = scope->next();
     1331    exec->setScope(JSWithScope::create(exec, o));
     1332}
     1333
     1334void JIT_OPERATION operationPopScope(ExecState* exec)
     1335{
     1336    VM& vm = exec->vm();
     1337    NativeCallFrameTracer tracer(&vm, exec);
     1338
     1339    exec->setScope(exec->scope()->next());
    13531340}
    13541341
  • trunk/Source/JavaScriptCore/jit/JITOperations.h

    r175509 r175512  
    165165typedef void JIT_OPERATION (*V_JITOperation_ECZ)(ExecState*, JSCell*, int32_t);
    166166typedef void JIT_OPERATION (*V_JITOperation_ECC)(ExecState*, JSCell*, JSCell*);
    167 #if USE(JSVALUE64)
    168 typedef void JIT_OPERATION (*V_JITOperation_EZIdJZZ)(ExecState*, int, Identifier*, EncodedJSValue, int32_t, int32_t);
    169 #else
    170 typedef void JIT_OPERATION (*V_JITOperation_EZIdJZ)(ExecState*, int, Identifier*, EncodedJSValue, int32_t);
    171 #endif
     167typedef void JIT_OPERATION (*V_JITOperation_EIdJZZ)(ExecState*, Identifier*, EncodedJSValue, int32_t, int32_t);
    172168typedef void JIT_OPERATION (*V_JITOperation_EJ)(ExecState*, EncodedJSValue);
    173169typedef void JIT_OPERATION (*V_JITOperation_EJCI)(ExecState*, EncodedJSValue, JSCell*, StringImpl*);
     
    184180typedef void JIT_OPERATION (*V_JITOperation_EVwsJ)(ExecState*, VariableWatchpointSet*, EncodedJSValue);
    185181typedef void JIT_OPERATION (*V_JITOperation_EZ)(ExecState*, int32_t);
    186 typedef void JIT_OPERATION (*V_JITOperation_EZJ)(ExecState*, int32_t, EncodedJSValue);
    187182typedef void JIT_OPERATION (*V_JITOperation_EVm)(ExecState*, VM*);
    188183typedef void JIT_OPERATION (*V_JITOperation_J)(EncodedJSValue);
     
    282277#else
    283278void JIT_OPERATION operationPutGetterSetter(ExecState*, JSCell*, Identifier*, JSCell*, JSCell*) WTF_INTERNAL;
    284 void JIT_OPERATION operationPushCatchScope(ExecState*, int32_t, Identifier*, EncodedJSValue, int32_t) WTF_INTERNAL;
    285 void JIT_OPERATION operationPushFunctionNameScope(ExecState*, int32_t, Identifier*, EncodedJSValue, int32_t) WTF_INTERNAL;
    286279#endif
    287 void JIT_OPERATION operationPushNameScope(ExecState*, int32_t, Identifier*, EncodedJSValue, int32_t, int32_t) WTF_INTERNAL;
    288 void JIT_OPERATION operationPushWithScope(ExecState*, int32_t, EncodedJSValue) WTF_INTERNAL;
    289 void JIT_OPERATION operationPopScope(ExecState*, int32_t) WTF_INTERNAL;
     280void JIT_OPERATION operationPushNameScope(ExecState*, Identifier*, EncodedJSValue, int32_t, int32_t) WTF_INTERNAL;
     281void JIT_OPERATION operationPushWithScope(ExecState*, EncodedJSValue) WTF_INTERNAL;
     282void JIT_OPERATION operationPopScope(ExecState*) WTF_INTERNAL;
    290283void JIT_OPERATION operationProfileDidCall(ExecState*, EncodedJSValue) WTF_INTERNAL;
    291284void JIT_OPERATION operationProfileWillCall(ExecState*, EncodedJSValue) WTF_INTERNAL;
  • trunk/Source/JavaScriptCore/llint/LLIntSlowPaths.cpp

    r175509 r175512  
    12741274    LLINT_CHECK_EXCEPTION();
    12751275
    1276     exec->uncheckedR(pc[1].u.operand) = JSWithScope::create(exec, o);
     1276    exec->setScope(JSWithScope::create(exec, o));
    12771277   
    12781278    LLINT_END();
     
    12821282{
    12831283    LLINT_BEGIN();
    1284     int scopeReg = pc[1].u.operand;
    1285     JSScope* scope = exec->uncheckedR(scopeReg).Register::scope();
    1286     exec->uncheckedR(scopeReg) = scope->next();
     1284    exec->setScope(exec->scope()->next());
    12871285    LLINT_END();
    12881286}
     
    12941292    JSNameScope::Type type = static_cast<JSNameScope::Type>(pc[5].u.operand);
    12951293    JSNameScope* scope = JSNameScope::create(exec, codeBlock->identifier(pc[2].u.operand), LLINT_OP(3).jsValue(), pc[4].u.operand, type);
    1296     exec->uncheckedR(pc[1].u.operand) = scope;
     1294    exec->setScope(scope);
    12971295    LLINT_END();
    12981296}
Note: See TracChangeset for help on using the changeset viewer.