Changeset 157313 in webkit


Ignore:
Timestamp:
Oct 11, 2013 12:03:39 PM (11 years ago)
Author:
mark.lam@apple.com
Message:

Transition op_new_* JITStubs to JIT operations.
https://bugs.webkit.org/show_bug.cgi?id=122460.

Reviewed by Michael Saboff.

Also:

  • Removed the redundant operationNewFunctionExpression(). It is identical to operationNewFunctionNoCheck().
  • Sorted JIT operation signature keys in the comment in JITOperations.h.
  • Removed the unused returnValue2Register definition for X86_64.
  • dfg/DFGOperations.cpp:
  • dfg/DFGOperations.h:
  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileNewFunctionExpression):

  • jit/CCallHelpers.h:

(JSC::CCallHelpers::setupArgumentsWithExecState):

  • jit/JIT.h:
  • jit/JITInlines.h:

(JSC::JIT::callOperation):

  • jit/JITOpcodes.cpp:

(JSC::JIT::emitSlow_op_new_object):
(JSC::JIT::emit_op_new_func):
(JSC::JIT::emit_op_new_func_exp):
(JSC::JIT::emit_op_new_array):
(JSC::JIT::emit_op_new_array_with_size):
(JSC::JIT::emit_op_new_array_buffer):

  • jit/JITOpcodes32_64.cpp:

(JSC::JIT::emitSlow_op_new_object):

  • jit/JITOperations.cpp:
  • jit/JITOperations.h:
  • jit/JITStubs.cpp:
  • jit/JITStubs.h:
  • jit/JSInterfaceJIT.h:
Location:
trunk/Source/JavaScriptCore
Files:
14 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r157307 r157313  
     12013-10-11  Mark Lam  <mark.lam@apple.com>
     2
     3        Transition op_new_* JITStubs to JIT operations.
     4        https://bugs.webkit.org/show_bug.cgi?id=122460.
     5
     6        Reviewed by Michael Saboff.
     7
     8        Also:
     9        - Removed the redundant operationNewFunctionExpression().  It is identical to
     10          operationNewFunctionNoCheck().
     11        - Sorted JIT operation signature keys in the comment in JITOperations.h.
     12        - Removed the unused returnValue2Register definition for X86_64.
     13
     14        * dfg/DFGOperations.cpp:
     15        * dfg/DFGOperations.h:
     16        * dfg/DFGSpeculativeJIT.cpp:
     17        (JSC::DFG::SpeculativeJIT::compileNewFunctionExpression):
     18        * jit/CCallHelpers.h:
     19        (JSC::CCallHelpers::setupArgumentsWithExecState):
     20        * jit/JIT.h:
     21        * jit/JITInlines.h:
     22        (JSC::JIT::callOperation):
     23        * jit/JITOpcodes.cpp:
     24        (JSC::JIT::emitSlow_op_new_object):
     25        (JSC::JIT::emit_op_new_func):
     26        (JSC::JIT::emit_op_new_func_exp):
     27        (JSC::JIT::emit_op_new_array):
     28        (JSC::JIT::emit_op_new_array_with_size):
     29        (JSC::JIT::emit_op_new_array_buffer):
     30        * jit/JITOpcodes32_64.cpp:
     31        (JSC::JIT::emitSlow_op_new_object):
     32        * jit/JITOperations.cpp:
     33        * jit/JITOperations.h:
     34        * jit/JITStubs.cpp:
     35        * jit/JITStubs.h:
     36        * jit/JSInterfaceJIT.h:
     37
    1382013-10-11  Oliver Hunt  <oliver@apple.com>
    239
  • trunk/Source/JavaScriptCore/dfg/DFGOperations.cpp

    r157266 r157313  
    221221}
    222222
    223 JSCell* JIT_OPERATION operationNewObject(ExecState* exec, Structure* structure)
    224 {
    225     VM* vm = &exec->vm();
    226     NativeCallFrameTracer tracer(vm, exec);
    227    
    228     return constructEmptyObject(exec, structure);
    229 }
    230 
    231223EncodedJSValue JIT_OPERATION operationValueAdd(ExecState* exec, EncodedJSValue encodedOp1, EncodedJSValue encodedOp2)
    232224{
     
    789781    NativeCallFrameTracer tracer(&vm, exec);
    790782    return JSFunction::create(vm, static_cast<FunctionExecutable*>(functionExecutable), exec->scope());
    791 }
    792 
    793 EncodedJSValue JIT_OPERATION operationNewFunction(ExecState* exec, JSCell* functionExecutable)
    794 {
    795     ASSERT(functionExecutable->inherits(FunctionExecutable::info()));
    796     VM& vm = exec->vm();
    797     NativeCallFrameTracer tracer(&vm, exec);
    798     return JSValue::encode(JSFunction::create(vm, static_cast<FunctionExecutable*>(functionExecutable), exec->scope()));
    799 }
    800 
    801 JSCell* JIT_OPERATION operationNewFunctionExpression(ExecState* exec, JSCell* functionExecutableAsCell)
    802 {
    803     ASSERT(functionExecutableAsCell->inherits(FunctionExecutable::info()));
    804 
    805     VM& vm = exec->vm();
    806     NativeCallFrameTracer tracer(&vm, exec);
    807 
    808     FunctionExecutable* functionExecutable =
    809         static_cast<FunctionExecutable*>(functionExecutableAsCell);
    810     return JSFunction::create(vm, functionExecutable, exec->scope());
    811783}
    812784
  • trunk/Source/JavaScriptCore/dfg/DFGOperations.h

    r157266 r157313  
    4242
    4343// These routines are provide callbacks out to C++ implementations of operations too complex to JIT.
    44 JSCell* JIT_OPERATION operationNewObject(ExecState*, Structure*) WTF_INTERNAL;
    4544JSCell* JIT_OPERATION operationCreateThis(ExecState*, JSObject* constructor, int32_t inlineCapacity) WTF_INTERNAL;
    4645EncodedJSValue JIT_OPERATION operationToThis(ExecState*, EncodedJSValue encodedOp1) WTF_INTERNAL;
     
    101100EncodedJSValue JIT_OPERATION operationGetArgumentByVal(ExecState*, int32_t, int32_t) WTF_INTERNAL;
    102101JSCell* JIT_OPERATION operationNewFunctionNoCheck(ExecState*, JSCell*) WTF_INTERNAL;
    103 EncodedJSValue JIT_OPERATION operationNewFunction(ExecState*, JSCell*) WTF_INTERNAL;
    104 JSCell* JIT_OPERATION operationNewFunctionExpression(ExecState*, JSCell*) WTF_INTERNAL;
    105102double JIT_OPERATION operationFModOnInts(int32_t, int32_t) WTF_INTERNAL;
    106103size_t JIT_OPERATION operationIsObject(ExecState*, EncodedJSValue) WTF_INTERNAL;
  • trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp

    r157043 r157313  
    43904390    flushRegisters();
    43914391    callOperation(
    4392         operationNewFunctionExpression,
     4392        operationNewFunctionNoCheck,
    43934393        resultGPR,
    43944394        m_jit.codeBlock()->functionExpr(node->functionExprIndex()));
  • trunk/Source/JavaScriptCore/jit/CCallHelpers.h

    r156559 r157313  
    193193    }
    194194
     195    ALWAYS_INLINE void setupArgumentsWithExecState(TrustedImmPtr arg1, TrustedImm32 arg2, TrustedImm32 arg3)
     196    {
     197        resetCallArguments();
     198        addCallArgument(GPRInfo::callFrameRegister);
     199        addCallArgument(arg1);
     200        addCallArgument(arg2);
     201        addCallArgument(arg3);
     202    }
     203
    195204    ALWAYS_INLINE void setupArgumentsWithExecState(GPRReg arg1, GPRReg arg2, GPRReg arg3)
    196205    {
     
    230239
    231240    ALWAYS_INLINE void setupArgumentsWithExecState(TrustedImmPtr arg1, GPRReg arg2, GPRReg arg3)
     241    {
     242        resetCallArguments();
     243        addCallArgument(GPRInfo::callFrameRegister);
     244        addCallArgument(arg1);
     245        addCallArgument(arg2);
     246        addCallArgument(arg3);
     247    }
     248
     249    ALWAYS_INLINE void setupArgumentsWithExecState(TrustedImmPtr arg1, GPRReg arg2, TrustedImm32 arg3)
     250    {
     251        resetCallArguments();
     252        addCallArgument(GPRInfo::callFrameRegister);
     253        addCallArgument(arg1);
     254        addCallArgument(arg2);
     255        addCallArgument(arg3);
     256    }
     257
     258    ALWAYS_INLINE void setupArgumentsWithExecState(TrustedImmPtr arg1, TrustedImmPtr arg2, TrustedImm32 arg3)
    232259    {
    233260        resetCallArguments();
     
    824851    }
    825852
     853    ALWAYS_INLINE void setupArgumentsWithExecState(TrustedImmPtr arg1, TrustedImm32 arg2, TrustedImm32 arg3)
     854    {
     855        move(arg1, GPRInfo::argumentGPR1);
     856        move(arg2, GPRInfo::argumentGPR2);
     857        move(arg3, GPRInfo::argumentGPR3);
     858        move(GPRInfo::callFrameRegister, GPRInfo::argumentGPR0);
     859    }
     860
    826861    ALWAYS_INLINE void setupArgumentsWithExecState(GPRReg arg1, GPRReg arg2, GPRReg arg3)
    827862    {
     
    910945        setupTwoStubArgsGPR<GPRInfo::argumentGPR2, GPRInfo::argumentGPR3>(arg2, arg3);
    911946        move(arg1, GPRInfo::argumentGPR1);
     947        move(GPRInfo::callFrameRegister, GPRInfo::argumentGPR0);
     948    }
     949
     950    ALWAYS_INLINE void setupArgumentsWithExecState(TrustedImmPtr arg1, GPRReg arg2, TrustedImm32 arg3)
     951    {
     952        move(arg1, GPRInfo::argumentGPR1);
     953        move(arg2, GPRInfo::argumentGPR2);
     954        move(arg3, GPRInfo::argumentGPR3);
     955        move(GPRInfo::callFrameRegister, GPRInfo::argumentGPR0);
     956    }
     957
     958    ALWAYS_INLINE void setupArgumentsWithExecState(TrustedImmPtr arg1, TrustedImmPtr arg2, TrustedImm32 arg3)
     959    {
     960        move(arg1, GPRInfo::argumentGPR1);
     961        move(arg2, GPRInfo::argumentGPR2);
     962        move(arg3, GPRInfo::argumentGPR3);
    912963        move(GPRInfo::callFrameRegister, GPRInfo::argumentGPR0);
    913964    }
  • trunk/Source/JavaScriptCore/jit/JIT.h

    r157266 r157313  
    5252namespace JSC {
    5353
     54    class ArrayAllocationProfile;
    5455    class CodeBlock;
    5556    class FunctionExecutable;
     
    867868        MacroAssembler::Call appendCallWithCallFrameRollbackOnException(const FunctionPtr&);
    868869        MacroAssembler::Call appendCallWithExceptionCheckSetJSValueResult(const FunctionPtr&, int);
     870        MacroAssembler::Call callOperation(C_JITOperation_ESt, Structure*);
    869871        MacroAssembler::Call callOperation(J_JITOperation_E, int);
     872#if USE(JSVALUE64)
     873        MacroAssembler::Call callOperation(J_JITOperation_EAapJ, int, ArrayAllocationProfile*, GPRReg);
     874#else
     875        MacroAssembler::Call callOperation(J_JITOperation_EAapJ, int, ArrayAllocationProfile*, GPRReg, GPRReg);
     876#endif
     877        MacroAssembler::Call callOperation(J_JITOperation_EAapJcpZ, int, ArrayAllocationProfile*, GPRReg, int32_t);
     878        MacroAssembler::Call callOperation(J_JITOperation_EAapJcpZ, int, ArrayAllocationProfile*, const JSValue*, int32_t);
     879        MacroAssembler::Call callOperation(J_JITOperation_EC, int, JSCell*);
    870880        MacroAssembler::Call callOperation(J_JITOperation_EP, int, void*);
    871881        MacroAssembler::Call callOperation(S_JITOperation_ECC, RegisterID, RegisterID);
  • trunk/Source/JavaScriptCore/jit/JITInlines.h

    r157266 r157313  
    232232}
    233233
     234ALWAYS_INLINE MacroAssembler::Call JIT::callOperation(C_JITOperation_ESt operation, Structure* structure)
     235{
     236    setupArgumentsWithExecState(TrustedImmPtr(structure));
     237    return appendCallWithExceptionCheck(operation);
     238}
     239
    234240ALWAYS_INLINE MacroAssembler::Call JIT::callOperation(J_JITOperation_E operation, int dst)
    235241{
    236242    setupArgumentsExecState();
     243    return appendCallWithExceptionCheckSetJSValueResult(operation, dst);
     244}
     245
     246ALWAYS_INLINE MacroAssembler::Call JIT::callOperation(J_JITOperation_EAapJcpZ operation, int dst, ArrayAllocationProfile* arg1, GPRReg arg2, int32_t arg3)
     247{
     248    setupArgumentsWithExecState(TrustedImmPtr(arg1), arg2, TrustedImm32(arg3));
     249    return appendCallWithExceptionCheckSetJSValueResult(operation, dst);
     250}
     251
     252ALWAYS_INLINE MacroAssembler::Call JIT::callOperation(J_JITOperation_EAapJcpZ operation, int dst, ArrayAllocationProfile* arg1, const JSValue* arg2, int32_t arg3)
     253{
     254    setupArgumentsWithExecState(TrustedImmPtr(arg1), TrustedImmPtr(arg2), TrustedImm32(arg3));
     255    return appendCallWithExceptionCheckSetJSValueResult(operation, dst);
     256}
     257
     258ALWAYS_INLINE MacroAssembler::Call JIT::callOperation(J_JITOperation_EC operation, int dst, JSCell* cell)
     259{
     260    setupArgumentsWithExecState(TrustedImmPtr(cell));
    237261    return appendCallWithExceptionCheckSetJSValueResult(operation, dst);
    238262}
     
    304328#endif
    305329
     330ALWAYS_INLINE MacroAssembler::Call JIT::callOperation(J_JITOperation_EAapJ operation, int dst, ArrayAllocationProfile* arg1, GPRReg arg2Tag, GPRReg arg2Payload)
     331{
     332    setupArgumentsWithExecState(TrustedImmPtr(arg1), EABI_32BIT_DUMMY_ARG arg2Payload, arg2Tag);
     333    return appendCallWithExceptionCheckSetJSValueResult(operation, dst);
     334}
     335
    306336ALWAYS_INLINE MacroAssembler::Call JIT::callOperation(S_JITOperation_EJ operation, RegisterID argTag, RegisterID argPayload)
    307337{
     
    318348#undef EABI_32BIT_DUMMY_ARG
    319349#undef SH4_32BIT_DUMMY_ARG
     350
     351#else // USE(JSVALUE32_64)
     352
     353ALWAYS_INLINE MacroAssembler::Call JIT::callOperation(J_JITOperation_EAapJ operation, int dst, ArrayAllocationProfile* arg1, GPRReg arg2)
     354{
     355    setupArgumentsWithExecState(TrustedImmPtr(arg1), arg2);
     356    return appendCallWithExceptionCheckSetJSValueResult(operation, dst);
     357}
    320358
    321359#endif // USE(JSVALUE32_64)
  • trunk/Source/JavaScriptCore/jit/JITOpcodes.cpp

    r157266 r157313  
    114114{
    115115    linkSlowCase(iter);
    116     JITStubCall stubCall(this, cti_op_new_object);
    117     stubCall.addArgument(TrustedImmPtr(currentInstruction[3].u.objectAllocationProfile->structure()));
    118     stubCall.call(currentInstruction[1].u.operand);
     116    int dst = currentInstruction[1].u.operand;
     117    Structure* structure = currentInstruction[3].u.objectAllocationProfile->structure();
     118    callOperation(operationNewObject, structure);
     119    emitStoreCell(dst, returnValueRegister);
    119120}
    120121
     
    12141215    }
    12151216
    1216     JITStubCall stubCall(this, cti_op_new_func);
    1217     stubCall.addArgument(TrustedImmPtr(m_codeBlock->functionDecl(currentInstruction[2].u.operand)));
    1218     stubCall.call(dst);
     1217    FunctionExecutable* funcExec = m_codeBlock->functionDecl(currentInstruction[2].u.operand);
     1218    callOperation(operationNewFunction, dst, funcExec);
    12191219
    12201220    if (currentInstruction[3].u.operand) {
     
    12301230void JIT::emit_op_new_func_exp(Instruction* currentInstruction)
    12311231{
    1232     JITStubCall stubCall(this, cti_op_new_func_exp);
    1233     stubCall.addArgument(TrustedImmPtr(m_codeBlock->functionExpr(currentInstruction[2].u.operand)));
    1234     stubCall.call(currentInstruction[1].u.operand);
     1232    int dst = currentInstruction[1].u.operand;
     1233    FunctionExecutable* funcExpr = m_codeBlock->functionExpr(currentInstruction[2].u.operand);
     1234    callOperation(operationNewFunction, dst, funcExpr);
    12351235}
    12361236
    12371237void JIT::emit_op_new_array(Instruction* currentInstruction)
    12381238{
    1239     JITStubCall stubCall(this, cti_op_new_array);
    1240     stubCall.addArgument(TrustedImm32(currentInstruction[2].u.operand));
    1241     stubCall.addArgument(TrustedImm32(currentInstruction[3].u.operand));
    1242     stubCall.addArgument(TrustedImmPtr(currentInstruction[4].u.arrayAllocationProfile));
    1243     stubCall.call(currentInstruction[1].u.operand);
     1239    int dst = currentInstruction[1].u.operand;
     1240    int valuesIndex = currentInstruction[2].u.operand;
     1241    int size = currentInstruction[3].u.operand;
     1242    addPtr(TrustedImm32(valuesIndex * sizeof(Register)), callFrameRegister, regT0);
     1243    callOperation(operationNewArrayWithProfile, dst,
     1244        currentInstruction[4].u.arrayAllocationProfile, regT0, size);
    12441245}
    12451246
    12461247void JIT::emit_op_new_array_with_size(Instruction* currentInstruction)
    12471248{
    1248     JITStubCall stubCall(this, cti_op_new_array_with_size);
     1249    int dst = currentInstruction[1].u.operand;
     1250    int sizeIndex = currentInstruction[2].u.operand;
    12491251#if USE(JSVALUE64)
    1250     stubCall.addArgument(currentInstruction[2].u.operand, regT2);
     1252    emitGetVirtualRegister(sizeIndex, regT0);
     1253    callOperation(operationNewArrayWithSizeAndProfile, dst,
     1254        currentInstruction[3].u.arrayAllocationProfile, regT0);
    12511255#else
    1252     stubCall.addArgument(currentInstruction[2].u.operand);
     1256    emitLoad(sizeIndex, regT1, regT0);
     1257    callOperation(operationNewArrayWithSizeAndProfile, dst,
     1258        currentInstruction[3].u.arrayAllocationProfile, regT1, regT0);
    12531259#endif
    1254     stubCall.addArgument(TrustedImmPtr(currentInstruction[3].u.arrayAllocationProfile));
    1255     stubCall.call(currentInstruction[1].u.operand);
    12561260}
    12571261
    12581262void JIT::emit_op_new_array_buffer(Instruction* currentInstruction)
    12591263{
    1260     JITStubCall stubCall(this, cti_op_new_array_buffer);
    1261     stubCall.addArgument(TrustedImm32(currentInstruction[2].u.operand));
    1262     stubCall.addArgument(TrustedImm32(currentInstruction[3].u.operand));
    1263     stubCall.addArgument(TrustedImmPtr(currentInstruction[4].u.arrayAllocationProfile));
    1264     stubCall.call(currentInstruction[1].u.operand);
     1264    int dst = currentInstruction[1].u.operand;
     1265    int valuesIndex = currentInstruction[2].u.operand;
     1266    int size = currentInstruction[3].u.operand;
     1267    const JSValue* values = codeBlock()->constantBuffer(valuesIndex);
     1268    callOperation(operationNewArrayBufferWithProfile, dst, currentInstruction[4].u.arrayAllocationProfile, values, size);
    12651269}
    12661270
  • trunk/Source/JavaScriptCore/jit/JITOpcodes32_64.cpp

    r157266 r157313  
    228228{
    229229    linkSlowCase(iter);
    230     JITStubCall stubCall(this, cti_op_new_object);
    231     stubCall.addArgument(TrustedImmPtr(currentInstruction[3].u.objectAllocationProfile->structure()));
    232     stubCall.call(currentInstruction[1].u.operand);
     230    int dst = currentInstruction[1].u.operand;
     231    Structure* structure = currentInstruction[3].u.objectAllocationProfile->structure();
     232    callOperation(operationNewObject, structure);
     233    emitStoreCell(dst, returnValueRegister);
    233234}
    234235
  • trunk/Source/JavaScriptCore/jit/JITOperations.cpp

    r157266 r157313  
    2828#include "JITOperations.h"
    2929
     30#include "ArrayConstructor.h"
    3031#include "CommonSlowPaths.h"
    3132#include "Error.h"
     
    3435#include "JITOperationWrappers.h"
    3536#include "JSGlobalObjectFunctions.h"
     37#include "ObjectConstructor.h"
    3638#include "Operations.h"
    3739#include "Repatch.h"
     
    744746   
    745747
     748EncodedJSValue JIT_OPERATION operationNewArrayWithProfile(ExecState* exec, ArrayAllocationProfile* profile, const JSValue* values, int size)
     749{
     750    VM* vm = &exec->vm();
     751    NativeCallFrameTracer tracer(vm, exec);
     752    return JSValue::encode(constructArrayNegativeIndexed(exec, profile, values, size));
     753}
     754
     755EncodedJSValue JIT_OPERATION operationNewArrayBufferWithProfile(ExecState* exec, ArrayAllocationProfile* profile, const JSValue* values, int size)
     756{
     757    VM* vm = &exec->vm();
     758    NativeCallFrameTracer tracer(vm, exec);
     759    return JSValue::encode(constructArray(exec, profile, values, size));
     760}
     761
     762EncodedJSValue JIT_OPERATION operationNewArrayWithSizeAndProfile(ExecState* exec, ArrayAllocationProfile* profile, EncodedJSValue size)
     763{
     764    VM* vm = &exec->vm();
     765    NativeCallFrameTracer tracer(vm, exec);
     766    JSValue sizeValue = JSValue::decode(size);
     767    return JSValue::encode(constructArrayWithSizeQuirk(exec, profile, exec->lexicalGlobalObject(), sizeValue));
     768}
     769
     770EncodedJSValue JIT_OPERATION operationNewFunction(ExecState* exec, JSCell* functionExecutable)
     771{
     772    ASSERT(functionExecutable->inherits(FunctionExecutable::info()));
     773    VM& vm = exec->vm();
     774    NativeCallFrameTracer tracer(&vm, exec);
     775    return JSValue::encode(JSFunction::create(vm, static_cast<FunctionExecutable*>(functionExecutable), exec->scope()));
     776}
     777
     778JSCell* JIT_OPERATION operationNewObject(ExecState* exec, Structure* structure)
     779{
     780    VM* vm = &exec->vm();
     781    NativeCallFrameTracer tracer(vm, exec);
     782   
     783    return constructEmptyObject(exec, structure);
     784}
     785
    746786EncodedJSValue JIT_OPERATION operationNewRegexp(ExecState* exec, void* regexpPtr)
    747787{
  • trunk/Source/JavaScriptCore/jit/JITOperations.h

    r157266 r157313  
    4747/*
    4848    Key:
    49     V: void
    50     J: JSValue
    51     P: pointer (void*)
     49    A: JSArray*
     50    Aap: ArrayAllocationProfile*
    5251    C: JSCell*
    5352    Cb: CodeBlock*
    54     A: JSArray*
     53    D: double
     54    E: ExecState*
     55    I: StringImpl*
     56    Icf: InlineCalLFrame*
     57    J: EncodedJSValue
     58    Jcp: const JSValue*
     59    Jss: JSString*
     60    O: JSObject*
     61    P: pointer (void*)
    5562    R: Register
    5663    S: size_t
     64    St: Structure*
     65    V: void
     66    W: WatchpointSet*
    5767    Z: int32_t
    58     D: double
    59     I: StringImpl*
    6068*/
    6169typedef EncodedJSValue JIT_OPERATION (*J_JITOperation_E)(ExecState*);
     
    7583typedef EncodedJSValue JIT_OPERATION (*J_JITOperation_EJP)(ExecState*, EncodedJSValue, void*);
    7684typedef EncodedJSValue JIT_OPERATION (*J_JITOperation_EP)(ExecState*, void*);
     85typedef EncodedJSValue JIT_OPERATION (*J_JITOperation_EAapJ)(ExecState*, ArrayAllocationProfile*, EncodedJSValue);
     86typedef EncodedJSValue JIT_OPERATION (*J_JITOperation_EAapJcpZ)(ExecState*, ArrayAllocationProfile*, const JSValue*, int32_t);
    7787typedef EncodedJSValue JIT_OPERATION (*J_JITOperation_EPP)(ExecState*, void*, void*);
    7888typedef EncodedJSValue JIT_OPERATION (*J_JITOperation_EPS)(ExecState*, void*, size_t);
     
    220230#endif
    221231size_t JIT_OPERATION operationHasProperty(ExecState*, JSObject*, JSString*) WTF_INTERNAL;
     232EncodedJSValue JIT_OPERATION operationNewArrayWithProfile(ExecState*, ArrayAllocationProfile*, const JSValue* values, int32_t size) WTF_INTERNAL;
     233EncodedJSValue JIT_OPERATION operationNewArrayBufferWithProfile(ExecState*, ArrayAllocationProfile*, const JSValue* values, int32_t size) WTF_INTERNAL;
     234EncodedJSValue JIT_OPERATION operationNewArrayWithSizeAndProfile(ExecState*, ArrayAllocationProfile*, EncodedJSValue size) WTF_INTERNAL;
     235EncodedJSValue JIT_OPERATION operationNewFunction(ExecState*, JSCell*) WTF_INTERNAL;
     236JSCell* JIT_OPERATION operationNewObject(ExecState*, Structure*) WTF_INTERNAL;
    222237EncodedJSValue JIT_OPERATION operationNewRegexp(ExecState*, void*) WTF_INTERNAL;
    223238
  • trunk/Source/JavaScriptCore/jit/JITStubs.cpp

    r157266 r157313  
    437437}
    438438
    439 DEFINE_STUB_FUNCTION(JSObject*, op_new_object)
    440 {
    441     STUB_INIT_STACK_FRAME(stackFrame);
    442 
    443     return constructEmptyObject(stackFrame.callFrame, stackFrame.args[0].structure());
    444 }
    445 
    446439DEFINE_STUB_FUNCTION(void, op_put_by_id_generic)
    447440{
     
    11401133}
    11411134
    1142 DEFINE_STUB_FUNCTION(JSObject*, op_new_func)
    1143 {
    1144     STUB_INIT_STACK_FRAME(stackFrame);
    1145    
    1146     ASSERT(stackFrame.callFrame->codeBlock()->codeType() != FunctionCode || !stackFrame.callFrame->codeBlock()->needsFullScopeChain() || stackFrame.callFrame->uncheckedR(stackFrame.callFrame->codeBlock()->activationRegister().offset()).jsValue());
    1147     return JSFunction::create(stackFrame.callFrame->vm(), stackFrame.args[0].function(), stackFrame.callFrame->scope());
    1148 }
    1149 
    11501135DEFINE_STUB_FUNCTION(JSObject*, op_push_activation)
    11511136{
     
    12011186    if (LegacyProfiler* profiler = stackFrame.vm->enabledProfiler())
    12021187        profiler->didExecute(stackFrame.callFrame, stackFrame.args[0].jsValue());
    1203 }
    1204 
    1205 DEFINE_STUB_FUNCTION(JSObject*, op_new_array)
    1206 {
    1207     STUB_INIT_STACK_FRAME(stackFrame);
    1208 
    1209     return constructArrayNegativeIndexed(stackFrame.callFrame, stackFrame.args[2].arrayAllocationProfile(), reinterpret_cast<JSValue*>(&stackFrame.callFrame->registers()[stackFrame.args[0].int32()]), stackFrame.args[1].int32());
    1210 }
    1211 
    1212 DEFINE_STUB_FUNCTION(JSObject*, op_new_array_with_size)
    1213 {
    1214     STUB_INIT_STACK_FRAME(stackFrame);
    1215    
    1216     return constructArrayWithSizeQuirk(stackFrame.callFrame, stackFrame.args[1].arrayAllocationProfile(), stackFrame.callFrame->lexicalGlobalObject(), stackFrame.args[0].jsValue());
    1217 }
    1218 
    1219 DEFINE_STUB_FUNCTION(JSObject*, op_new_array_buffer)
    1220 {
    1221     STUB_INIT_STACK_FRAME(stackFrame);
    1222    
    1223     return constructArray(stackFrame.callFrame, stackFrame.args[2].arrayAllocationProfile(), stackFrame.callFrame->codeBlock()->constantBuffer(stackFrame.args[0].int32()), stackFrame.args[1].int32());
    12241188}
    12251189
     
    14451409}
    14461410
    1447 DEFINE_STUB_FUNCTION(JSObject*, op_new_func_exp)
    1448 {
    1449     STUB_INIT_STACK_FRAME(stackFrame);
    1450     CallFrame* callFrame = stackFrame.callFrame;
    1451 
    1452     FunctionExecutable* function = stackFrame.args[0].function();
    1453     JSFunction* func = JSFunction::create(callFrame->vm(), function, callFrame->scope());
    1454     ASSERT(callFrame->codeBlock()->codeType() != FunctionCode || !callFrame->codeBlock()->needsFullScopeChain() || callFrame->uncheckedR(callFrame->codeBlock()->activationRegister().offset()).jsValue());
    1455 
    1456     return func;
    1457 }
    1458 
    14591411DEFINE_STUB_FUNCTION(void*, op_throw)
    14601412{
  • trunk/Source/JavaScriptCore/jit/JITStubs.h

    r157266 r157313  
    349349EncodedJSValue JIT_STUB cti_op_instanceof(STUB_ARGS_DECLARATION) WTF_INTERNAL;
    350350EncodedJSValue JIT_STUB cti_to_object(STUB_ARGS_DECLARATION) WTF_INTERNAL;
    351 JSObject* JIT_STUB cti_op_new_array(STUB_ARGS_DECLARATION) WTF_INTERNAL;
    352 JSObject* JIT_STUB cti_op_new_array_with_size(STUB_ARGS_DECLARATION) WTF_INTERNAL;
    353 JSObject* JIT_STUB cti_op_new_array_buffer(STUB_ARGS_DECLARATION) WTF_INTERNAL;
    354 JSObject* JIT_STUB cti_op_new_func(STUB_ARGS_DECLARATION) WTF_INTERNAL;
    355 JSObject* JIT_STUB cti_op_new_func_exp(STUB_ARGS_DECLARATION) WTF_INTERNAL;
    356 JSObject* JIT_STUB cti_op_new_object(STUB_ARGS_DECLARATION) WTF_INTERNAL;
    357351JSObject* JIT_STUB cti_op_push_activation(STUB_ARGS_DECLARATION) WTF_INTERNAL;
    358352void JIT_STUB cti_op_push_name_scope(STUB_ARGS_DECLARATION) WTF_INTERNAL;
  • trunk/Source/JavaScriptCore/jit/JSInterfaceJIT.h

    r156934 r157313  
    6363#if CPU(X86_64)
    6464        static const RegisterID returnValueRegister = X86Registers::eax;
    65         static const RegisterID returnValue2Register = X86Registers::edx;
    6665        static const RegisterID cachedResultRegister = X86Registers::eax;
    6766#if !OS(WINDOWS)
Note: See TracChangeset for help on using the changeset viewer.