зеркало из https://github.com/mozilla/pjs.git
Bug 553962 - nanojit: finish adding get/set methods for CallInfo::_typesig (TM-specific part). r=gal.
This commit is contained in:
Родитель
50021bd72f
Коммит
92793afeee
|
@ -298,88 +298,118 @@ struct ClosureVarInfo;
|
|||
* the function aliases any loads.
|
||||
*/
|
||||
#define JS_DEFINE_CALLINFO_1(linkage, rt, op, at0, isPure, storeAccSet) \
|
||||
_JS_DEFINE_CALLINFO(linkage, op, _JS_CTYPE_TYPE(rt), (_JS_CTYPE_TYPE(at0)), \
|
||||
(_JS_CTYPE_ARGTYPE(at0) << (1*nanojit::ARGTYPE_SHIFT)) | \
|
||||
_JS_CTYPE_RETTYPE(rt), \
|
||||
_JS_DEFINE_CALLINFO(linkage, op, \
|
||||
_JS_CTYPE_TYPE(rt), \
|
||||
(_JS_CTYPE_TYPE(at0)), \
|
||||
nanojit::CallInfo::typeSig1(_JS_CTYPE_RETTYPE(rt), \
|
||||
_JS_CTYPE_ARGTYPE(at0)), \
|
||||
isPure, storeAccSet)
|
||||
#define JS_DEFINE_CALLINFO_2(linkage, rt, op, at0, at1, isPure, storeAccSet) \
|
||||
_JS_DEFINE_CALLINFO(linkage, op, _JS_CTYPE_TYPE(rt), \
|
||||
(_JS_CTYPE_TYPE(at0), _JS_CTYPE_TYPE(at1)), \
|
||||
(_JS_CTYPE_ARGTYPE(at0) << (2*nanojit::ARGTYPE_SHIFT)) | \
|
||||
(_JS_CTYPE_ARGTYPE(at1) << (1*nanojit::ARGTYPE_SHIFT)) | \
|
||||
_JS_CTYPE_RETTYPE(rt), \
|
||||
_JS_DEFINE_CALLINFO(linkage, op, \
|
||||
_JS_CTYPE_TYPE(rt), \
|
||||
(_JS_CTYPE_TYPE(at0), \
|
||||
_JS_CTYPE_TYPE(at1)), \
|
||||
nanojit::CallInfo::typeSig2(_JS_CTYPE_RETTYPE(rt), \
|
||||
_JS_CTYPE_ARGTYPE(at0), \
|
||||
_JS_CTYPE_ARGTYPE(at1)), \
|
||||
isPure, storeAccSet)
|
||||
#define JS_DEFINE_CALLINFO_3(linkage, rt, op, at0, at1, at2, isPure, storeAccSet) \
|
||||
_JS_DEFINE_CALLINFO(linkage, op, _JS_CTYPE_TYPE(rt), \
|
||||
(_JS_CTYPE_TYPE(at0), _JS_CTYPE_TYPE(at1), _JS_CTYPE_TYPE(at2)), \
|
||||
(_JS_CTYPE_ARGTYPE(at0) << (3*nanojit::ARGTYPE_SHIFT)) | \
|
||||
(_JS_CTYPE_ARGTYPE(at1) << (2*nanojit::ARGTYPE_SHIFT)) | \
|
||||
(_JS_CTYPE_ARGTYPE(at2) << (1*nanojit::ARGTYPE_SHIFT)) | \
|
||||
_JS_CTYPE_RETTYPE(rt), \
|
||||
_JS_DEFINE_CALLINFO(linkage, op, \
|
||||
_JS_CTYPE_TYPE(rt), \
|
||||
(_JS_CTYPE_TYPE(at0), \
|
||||
_JS_CTYPE_TYPE(at1), \
|
||||
_JS_CTYPE_TYPE(at2)), \
|
||||
nanojit::CallInfo::typeSig3(_JS_CTYPE_RETTYPE(rt), \
|
||||
_JS_CTYPE_ARGTYPE(at0), \
|
||||
_JS_CTYPE_ARGTYPE(at1), \
|
||||
_JS_CTYPE_ARGTYPE(at2)), \
|
||||
isPure, storeAccSet)
|
||||
#define JS_DEFINE_CALLINFO_4(linkage, rt, op, at0, at1, at2, at3, isPure, storeAccSet) \
|
||||
_JS_DEFINE_CALLINFO(linkage, op, _JS_CTYPE_TYPE(rt), \
|
||||
(_JS_CTYPE_TYPE(at0), _JS_CTYPE_TYPE(at1), _JS_CTYPE_TYPE(at2), \
|
||||
_JS_DEFINE_CALLINFO(linkage, op, \
|
||||
_JS_CTYPE_TYPE(rt), \
|
||||
(_JS_CTYPE_TYPE(at0), \
|
||||
_JS_CTYPE_TYPE(at1), \
|
||||
_JS_CTYPE_TYPE(at2), \
|
||||
_JS_CTYPE_TYPE(at3)), \
|
||||
(_JS_CTYPE_ARGTYPE(at0) << (4*nanojit::ARGTYPE_SHIFT)) | \
|
||||
(_JS_CTYPE_ARGTYPE(at1) << (3*nanojit::ARGTYPE_SHIFT)) | \
|
||||
(_JS_CTYPE_ARGTYPE(at2) << (2*nanojit::ARGTYPE_SHIFT)) | \
|
||||
(_JS_CTYPE_ARGTYPE(at3) << (1*nanojit::ARGTYPE_SHIFT)) | \
|
||||
_JS_CTYPE_RETTYPE(rt), \
|
||||
nanojit::CallInfo::typeSig4(_JS_CTYPE_RETTYPE(rt), \
|
||||
_JS_CTYPE_ARGTYPE(at0), \
|
||||
_JS_CTYPE_ARGTYPE(at1), \
|
||||
_JS_CTYPE_ARGTYPE(at2), \
|
||||
_JS_CTYPE_ARGTYPE(at3)), \
|
||||
isPure, storeAccSet)
|
||||
#define JS_DEFINE_CALLINFO_5(linkage, rt, op, at0, at1, at2, at3, at4, isPure, storeAccSet) \
|
||||
_JS_DEFINE_CALLINFO(linkage, op, _JS_CTYPE_TYPE(rt), \
|
||||
(_JS_CTYPE_TYPE(at0), _JS_CTYPE_TYPE(at1), _JS_CTYPE_TYPE(at2), \
|
||||
_JS_CTYPE_TYPE(at3), _JS_CTYPE_TYPE(at4)), \
|
||||
(_JS_CTYPE_ARGTYPE(at0) << (5*nanojit::ARGTYPE_SHIFT)) | \
|
||||
(_JS_CTYPE_ARGTYPE(at1) << (4*nanojit::ARGTYPE_SHIFT)) | \
|
||||
(_JS_CTYPE_ARGTYPE(at2) << (3*nanojit::ARGTYPE_SHIFT)) | \
|
||||
(_JS_CTYPE_ARGTYPE(at3) << (2*nanojit::ARGTYPE_SHIFT)) | \
|
||||
(_JS_CTYPE_ARGTYPE(at4) << (1*nanojit::ARGTYPE_SHIFT)) | \
|
||||
_JS_CTYPE_RETTYPE(rt), \
|
||||
_JS_DEFINE_CALLINFO(linkage, op, \
|
||||
_JS_CTYPE_TYPE(rt), \
|
||||
(_JS_CTYPE_TYPE(at0), \
|
||||
_JS_CTYPE_TYPE(at1), \
|
||||
_JS_CTYPE_TYPE(at2), \
|
||||
_JS_CTYPE_TYPE(at3), \
|
||||
_JS_CTYPE_TYPE(at4)), \
|
||||
nanojit::CallInfo::typeSig5(_JS_CTYPE_RETTYPE(rt), \
|
||||
_JS_CTYPE_ARGTYPE(at0), \
|
||||
_JS_CTYPE_ARGTYPE(at1), \
|
||||
_JS_CTYPE_ARGTYPE(at2), \
|
||||
_JS_CTYPE_ARGTYPE(at3), \
|
||||
_JS_CTYPE_ARGTYPE(at4)), \
|
||||
isPure, storeAccSet)
|
||||
#define JS_DEFINE_CALLINFO_6(linkage, rt, op, at0, at1, at2, at3, at4, at5, isPure, storeAccSet) \
|
||||
_JS_DEFINE_CALLINFO(linkage, op, _JS_CTYPE_TYPE(rt), \
|
||||
(_JS_CTYPE_TYPE(at0), _JS_CTYPE_TYPE(at1), _JS_CTYPE_TYPE(at2), \
|
||||
_JS_CTYPE_TYPE(at3), _JS_CTYPE_TYPE(at4), _JS_CTYPE_TYPE(at5)), \
|
||||
(_JS_CTYPE_ARGTYPE(at0) << (6*nanojit::ARGTYPE_SHIFT)) | \
|
||||
(_JS_CTYPE_ARGTYPE(at1) << (5*nanojit::ARGTYPE_SHIFT)) | \
|
||||
(_JS_CTYPE_ARGTYPE(at2) << (4*nanojit::ARGTYPE_SHIFT)) | \
|
||||
(_JS_CTYPE_ARGTYPE(at3) << (3*nanojit::ARGTYPE_SHIFT)) | \
|
||||
(_JS_CTYPE_ARGTYPE(at4) << (2*nanojit::ARGTYPE_SHIFT)) | \
|
||||
(_JS_CTYPE_ARGTYPE(at5) << (1*nanojit::ARGTYPE_SHIFT)) | \
|
||||
_JS_CTYPE_RETTYPE(rt), \
|
||||
_JS_DEFINE_CALLINFO(linkage, op, \
|
||||
_JS_CTYPE_TYPE(rt), \
|
||||
(_JS_CTYPE_TYPE(at0), \
|
||||
_JS_CTYPE_TYPE(at1), \
|
||||
_JS_CTYPE_TYPE(at2), \
|
||||
_JS_CTYPE_TYPE(at3), \
|
||||
_JS_CTYPE_TYPE(at4), \
|
||||
_JS_CTYPE_TYPE(at5)), \
|
||||
nanojit::CallInfo::typeSig6(_JS_CTYPE_RETTYPE(rt), \
|
||||
_JS_CTYPE_ARGTYPE(at0), \
|
||||
_JS_CTYPE_ARGTYPE(at1), \
|
||||
_JS_CTYPE_ARGTYPE(at2), \
|
||||
_JS_CTYPE_ARGTYPE(at3), \
|
||||
_JS_CTYPE_ARGTYPE(at4), \
|
||||
_JS_CTYPE_ARGTYPE(at5)), \
|
||||
isPure, storeAccSet)
|
||||
#define JS_DEFINE_CALLINFO_7(linkage, rt, op, at0, at1, at2, at3, at4, at5, at6, isPure, \
|
||||
storeAccSet) \
|
||||
_JS_DEFINE_CALLINFO(linkage, op, _JS_CTYPE_TYPE(rt), \
|
||||
(_JS_CTYPE_TYPE(at0), _JS_CTYPE_TYPE(at1), _JS_CTYPE_TYPE(at2), \
|
||||
_JS_CTYPE_TYPE(at3), _JS_CTYPE_TYPE(at4), _JS_CTYPE_TYPE(at5), \
|
||||
_JS_DEFINE_CALLINFO(linkage, op, \
|
||||
_JS_CTYPE_TYPE(rt), \
|
||||
(_JS_CTYPE_TYPE(at0), \
|
||||
_JS_CTYPE_TYPE(at1), \
|
||||
_JS_CTYPE_TYPE(at2), \
|
||||
_JS_CTYPE_TYPE(at3), \
|
||||
_JS_CTYPE_TYPE(at4), \
|
||||
_JS_CTYPE_TYPE(at5), \
|
||||
_JS_CTYPE_TYPE(at6)), \
|
||||
(_JS_CTYPE_ARGTYPE(at0) << (7*nanojit::ARGTYPE_SHIFT)) | \
|
||||
(_JS_CTYPE_ARGTYPE(at1) << (6*nanojit::ARGTYPE_SHIFT)) | \
|
||||
(_JS_CTYPE_ARGTYPE(at2) << (5*nanojit::ARGTYPE_SHIFT)) | \
|
||||
(_JS_CTYPE_ARGTYPE(at3) << (4*nanojit::ARGTYPE_SHIFT)) | \
|
||||
(_JS_CTYPE_ARGTYPE(at4) << (3*nanojit::ARGTYPE_SHIFT)) | \
|
||||
(_JS_CTYPE_ARGTYPE(at5) << (2*nanojit::ARGTYPE_SHIFT)) | \
|
||||
(_JS_CTYPE_ARGTYPE(at6) << (1*nanojit::ARGTYPE_SHIFT)) | \
|
||||
_JS_CTYPE_RETTYPE(rt), \
|
||||
nanojit::CallInfo::typeSig7(_JS_CTYPE_RETTYPE(rt), \
|
||||
_JS_CTYPE_ARGTYPE(at0), \
|
||||
_JS_CTYPE_ARGTYPE(at1), \
|
||||
_JS_CTYPE_ARGTYPE(at2), \
|
||||
_JS_CTYPE_ARGTYPE(at3), \
|
||||
_JS_CTYPE_ARGTYPE(at4), \
|
||||
_JS_CTYPE_ARGTYPE(at5), \
|
||||
_JS_CTYPE_ARGTYPE(at6)), \
|
||||
isPure, storeAccSet)
|
||||
#define JS_DEFINE_CALLINFO_8(linkage, rt, op, at0, at1, at2, at3, at4, at5, at6, at7, isPure, \
|
||||
storeAccSet) \
|
||||
_JS_DEFINE_CALLINFO(linkage, op, _JS_CTYPE_TYPE(rt), \
|
||||
(_JS_CTYPE_TYPE(at0), _JS_CTYPE_TYPE(at1), _JS_CTYPE_TYPE(at2), \
|
||||
_JS_CTYPE_TYPE(at3), _JS_CTYPE_TYPE(at4), _JS_CTYPE_TYPE(at5), \
|
||||
_JS_CTYPE_TYPE(at6), _JS_CTYPE_TYPE(at7)), \
|
||||
(_JS_CTYPE_ARGTYPE(at0) << (8*nanojit::ARGTYPE_SHIFT)) | \
|
||||
(_JS_CTYPE_ARGTYPE(at1) << (7*nanojit::ARGTYPE_SHIFT)) | \
|
||||
(_JS_CTYPE_ARGTYPE(at2) << (6*nanojit::ARGTYPE_SHIFT)) | \
|
||||
(_JS_CTYPE_ARGTYPE(at3) << (5*nanojit::ARGTYPE_SHIFT)) | \
|
||||
(_JS_CTYPE_ARGTYPE(at4) << (4*nanojit::ARGTYPE_SHIFT)) | \
|
||||
(_JS_CTYPE_ARGTYPE(at5) << (3*nanojit::ARGTYPE_SHIFT)) | \
|
||||
(_JS_CTYPE_ARGTYPE(at6) << (2*nanojit::ARGTYPE_SHIFT)) | \
|
||||
(_JS_CTYPE_ARGTYPE(at7) << (1*nanojit::ARGTYPE_SHIFT)) | \
|
||||
_JS_CTYPE_RETTYPE(rt), \
|
||||
_JS_DEFINE_CALLINFO(linkage, op, \
|
||||
_JS_CTYPE_TYPE(rt), \
|
||||
(_JS_CTYPE_TYPE(at0), \
|
||||
_JS_CTYPE_TYPE(at1), \
|
||||
_JS_CTYPE_TYPE(at2), \
|
||||
_JS_CTYPE_TYPE(at3), \
|
||||
_JS_CTYPE_TYPE(at4), \
|
||||
_JS_CTYPE_TYPE(at5), \
|
||||
_JS_CTYPE_TYPE(at6), \
|
||||
_JS_CTYPE_TYPE(at7)), \
|
||||
nanojit::CallInfo::typeSig8(_JS_CTYPE_RETTYPE(rt), \
|
||||
_JS_CTYPE_ARGTYPE(at0), \
|
||||
_JS_CTYPE_ARGTYPE(at1), \
|
||||
_JS_CTYPE_ARGTYPE(at2), \
|
||||
_JS_CTYPE_ARGTYPE(at3), \
|
||||
_JS_CTYPE_ARGTYPE(at4), \
|
||||
_JS_CTYPE_ARGTYPE(at5), \
|
||||
_JS_CTYPE_ARGTYPE(at6), \
|
||||
_JS_CTYPE_ARGTYPE(at7)), \
|
||||
isPure, storeAccSet)
|
||||
|
||||
#define JS_DECLARE_CALLINFO(name) extern const nanojit::CallInfo _JS_CALLINFO(name);
|
||||
|
|
|
@ -5038,7 +5038,7 @@ TraceRecorder::emitTreeCall(TreeFragment* inner, VMSideExit* exit)
|
|||
CallInfo* ci = new (traceAlloc()) CallInfo();
|
||||
ci->_address = uintptr_t(inner->code());
|
||||
JS_ASSERT(ci->_address);
|
||||
ci->_typesig = ARGTYPE_P | ARGTYPE_P << ARGTYPE_SHIFT;
|
||||
ci->_typesig = CallInfo::typeSig1(ARGTYPE_P, ARGTYPE_P);
|
||||
ci->_isPure = 0;
|
||||
ci->_storeAccSet = ACC_STORE_ANY;
|
||||
ci->_abi = ABI_FASTCALL;
|
||||
|
@ -10647,11 +10647,7 @@ TraceRecorder::emitNativePropertyOp(JSScope* scope, JSScopeProperty* sprop, LIns
|
|||
|
||||
CallInfo* ci = new (traceAlloc()) CallInfo();
|
||||
ci->_address = uintptr_t(setflag ? sprop->setterOp() : sprop->getterOp());
|
||||
ci->_typesig = ARGTYPE_I << (0*ARGTYPE_SHIFT) |
|
||||
ARGTYPE_P << (1*ARGTYPE_SHIFT) |
|
||||
ARGTYPE_P << (2*ARGTYPE_SHIFT) |
|
||||
ARGTYPE_P << (3*ARGTYPE_SHIFT) |
|
||||
ARGTYPE_P << (4*ARGTYPE_SHIFT);
|
||||
ci->_typesig = CallInfo::typeSig4(ARGTYPE_I, ARGTYPE_P, ARGTYPE_P, ARGTYPE_P, ARGTYPE_P);
|
||||
ci->_isPure = 0;
|
||||
ci->_storeAccSet = ACC_STORE_ANY;
|
||||
ci->_abi = ABI_CDECL;
|
||||
|
@ -11007,10 +11003,7 @@ TraceRecorder::callNative(uintN argc, JSOp mode)
|
|||
args[0] = invokevp_ins;
|
||||
args[1] = lir->insImmI(argc);
|
||||
args[2] = cx_ins;
|
||||
typesig = ARGTYPE_I << (0*ARGTYPE_SHIFT) |
|
||||
ARGTYPE_P << (1*ARGTYPE_SHIFT) |
|
||||
ARGTYPE_I << (2*ARGTYPE_SHIFT) |
|
||||
ARGTYPE_P << (3*ARGTYPE_SHIFT);
|
||||
typesig = CallInfo::typeSig3(ARGTYPE_I, ARGTYPE_P, ARGTYPE_I, ARGTYPE_P);
|
||||
} else {
|
||||
int32_t offset = (vplen - 1) * sizeof(jsval);
|
||||
native_rval_ins = lir->ins2(LIR_addp, invokevp_ins, INS_CONSTWORD(offset));
|
||||
|
@ -11019,12 +11012,8 @@ TraceRecorder::callNative(uintN argc, JSOp mode)
|
|||
args[2] = lir->insImmI(argc);
|
||||
args[3] = this_ins;
|
||||
args[4] = cx_ins;
|
||||
typesig = ARGTYPE_I << (0*ARGTYPE_SHIFT) |
|
||||
ARGTYPE_P << (1*ARGTYPE_SHIFT) |
|
||||
ARGTYPE_P << (2*ARGTYPE_SHIFT) |
|
||||
ARGTYPE_I << (3*ARGTYPE_SHIFT) |
|
||||
ARGTYPE_P << (4*ARGTYPE_SHIFT) |
|
||||
ARGTYPE_P << (5*ARGTYPE_SHIFT);
|
||||
typesig = CallInfo::typeSig5(ARGTYPE_I,
|
||||
ARGTYPE_P, ARGTYPE_P, ARGTYPE_I, ARGTYPE_P, ARGTYPE_P);
|
||||
}
|
||||
|
||||
// Generate CallInfo and a JSSpecializedNative structure on the fly.
|
||||
|
|
Загрузка…
Ссылка в новой задаче