Ignore:
Timestamp:
May 9, 2009, 1:24:49 AM (16 years ago)
Author:
[email protected]
Message:

2009-05-09 Geoffrey Garen <[email protected]>

Reviewed by Gavin Barraclough.

Changed all our JIT stubs so that they return a maximum of 1 JS value or
two non-JS pointers, and do all other value returning through out
parameters, in preparation for 64bit JS values on a 32bit system.

Stubs that used to return two JSValues now return one JSValue and take
and out parameter specifying where in the register array the second
value should go.


SunSpider reports no change.

  • jit/JIT.cpp: (JSC::JIT::privateCompileMainPass):
  • jit/JITArithmetic.cpp: (JSC::JIT::compileFastArithSlow_op_post_inc): (JSC::JIT::compileFastArithSlow_op_post_dec):
  • jit/JITStubs.cpp: (JSC::JITStubs::cti_op_call_arityCheck): (JSC::JITStubs::cti_op_resolve_func): (JSC::JITStubs::cti_op_post_inc): (JSC::JITStubs::cti_op_resolve_with_base): (JSC::JITStubs::cti_op_post_dec):
  • jit/JITStubs.h: (JSC::):
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/jit/JITStubs.cpp

    r43409 r43431  
    10261026            stackFrame.callFrame = oldCallFrame;
    10271027            throwStackOverflowError(oldCallFrame, stackFrame.globalData, stackFrame.args[1].returnAddress(), STUB_RETURN_ADDRESS);
    1028             RETURN_PAIR(0, 0);
     1028            RETURN_POINTER_PAIR(0, 0);
    10291029        }
    10301030
     
    10371037    }
    10381038
    1039     RETURN_PAIR(newCodeBlock, callFrame);
     1039    RETURN_POINTER_PAIR(newCodeBlock, callFrame);
    10401040}
    10411041
     
    13851385}
    13861386
    1387 VoidPtrPair JITStubs::cti_op_resolve_func(STUB_ARGS_DECLARATION)
     1387EncodedJSValue JITStubs::cti_op_resolve_func(STUB_ARGS_DECLARATION)
    13881388{
    13891389    STUB_INIT_STACK_FRAME(stackFrame);
     
    14161416            CHECK_FOR_EXCEPTION_AT_END();
    14171417
    1418             RETURN_PAIR(thisObj, JSValue::encode(result));
     1418            callFrame->registers()[stackFrame.args[1].int32()] = JSValue(thisObj);
     1419            return JSValue::encode(result);
    14191420        }
    14201421        ++iter;
     
    14251426    stackFrame.globalData->exception = createUndefinedVariableError(callFrame, ident, vPCIndex, codeBlock);
    14261427    VM_THROW_EXCEPTION_AT_END();
    1427     RETURN_PAIR(0, 0);
     1428    return JSValue::encode(JSValue());
    14281429}
    14291430
     
    18171818}
    18181819
    1819 VoidPtrPair JITStubs::cti_op_post_inc(STUB_ARGS_DECLARATION)
     1820EncodedJSValue JITStubs::cti_op_post_inc(STUB_ARGS_DECLARATION)
    18201821{
    18211822    STUB_INIT_STACK_FRAME(stackFrame);
     
    18281829    CHECK_FOR_EXCEPTION_AT_END();
    18291830
    1830     RETURN_PAIR(JSValue::encode(number), JSValue::encode(jsNumber(stackFrame.globalData, number.uncheckedGetNumber() + 1)));
     1831    callFrame->registers()[stackFrame.args[1].int32()] = jsNumber(stackFrame.globalData, number.uncheckedGetNumber() + 1);
     1832    return JSValue::encode(number);
    18311833}
    18321834
     
    19201922}
    19211923
    1922 VoidPtrPair JITStubs::cti_op_resolve_with_base(STUB_ARGS_DECLARATION)
     1924EncodedJSValue JITStubs::cti_op_resolve_with_base(STUB_ARGS_DECLARATION)
    19231925{
    19241926    STUB_INIT_STACK_FRAME(stackFrame);
     
    19431945            CHECK_FOR_EXCEPTION_AT_END();
    19441946
    1945             RETURN_PAIR(base, JSValue::encode(result));
     1947            callFrame->registers()[stackFrame.args[1].int32()] = JSValue(base);
     1948            return JSValue::encode(result);
    19461949        }
    19471950        ++iter;
     
    19521955    stackFrame.globalData->exception = createUndefinedVariableError(callFrame, ident, vPCIndex, codeBlock);
    19531956    VM_THROW_EXCEPTION_AT_END();
    1954     RETURN_PAIR(0, 0);
     1957    return JSValue::encode(JSValue());
    19551958}
    19561959
     
    20012004}
    20022005
    2003 VoidPtrPair JITStubs::cti_op_post_dec(STUB_ARGS_DECLARATION)
     2006EncodedJSValue JITStubs::cti_op_post_dec(STUB_ARGS_DECLARATION)
    20042007{
    20052008    STUB_INIT_STACK_FRAME(stackFrame);
     
    20122015    CHECK_FOR_EXCEPTION_AT_END();
    20132016
    2014     RETURN_PAIR(JSValue::encode(number), JSValue::encode(jsNumber(stackFrame.globalData, number.uncheckedGetNumber() - 1)));
     2017    callFrame->registers()[stackFrame.args[1].int32()] = jsNumber(stackFrame.globalData, number.uncheckedGetNumber() - 1);
     2018    return JSValue::encode(number);
    20152019}
    20162020
Note: See TracChangeset for help on using the changeset viewer.