Bug 507089 - TM/nanojit: prepare to add get/set methods for CallInfo::_argtypes (TM-specific part). r=jorendorff.
authorNicholas Nethercote <nnethercote@mozilla.com>
Sun, 21 Mar 2010 20:07:46 -0700
changeset 40325 f4e6161afc357b37c8cf3b4af3b9fd85fc590daf
parent 40324 5e8ebf7d4742c3b6af19fd61a4f23e1ebb26261d
child 40326 d52333800c73dbef8b0fefab4c41eeec06f63828
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjorendorff
bugs507089
milestone1.9.3a3pre
Bug 507089 - TM/nanojit: prepare to add get/set methods for CallInfo::_argtypes (TM-specific part). r=jorendorff.
js/src/jsbuiltins.h
js/src/jstracer.cpp
--- a/js/src/jsbuiltins.h
+++ b/js/src/jsbuiltins.h
@@ -111,22 +111,22 @@ struct JSNativeTraceInfo {
 
 /* Macros used by JS_DEFINE_CALLINFOn. */
 #ifdef DEBUG
 #define _JS_CI_NAME(op) ,#op
 #else
 #define _JS_CI_NAME(op)
 #endif
 
-#define _JS_I32_ARGSIZE    nanojit::ARGSIZE_I
-#define _JS_I32_RETSIZE    nanojit::ARGSIZE_I
-#define _JS_F64_ARGSIZE    nanojit::ARGSIZE_F
-#define _JS_F64_RETSIZE    nanojit::ARGSIZE_F
-#define _JS_PTR_ARGSIZE    nanojit::ARGSIZE_P
-#define _JS_PTR_RETSIZE    nanojit::ARGSIZE_P
+#define _JS_I32_ARGTYPE    nanojit::ARGTYPE_I
+#define _JS_I32_RETTYPE    nanojit::ARGTYPE_I
+#define _JS_F64_ARGTYPE    nanojit::ARGTYPE_F
+#define _JS_F64_RETTYPE    nanojit::ARGTYPE_F
+#define _JS_PTR_ARGTYPE    nanojit::ARGTYPE_P
+#define _JS_PTR_RETTYPE    nanojit::ARGTYPE_P
 
 struct ClosureVarInfo;
 
 /*
  * Supported types for builtin functions.
  *
  * Types with -- for the two string fields are not permitted as argument types
  * in JS_DEFINE_TRCINFO.
@@ -228,20 +228,20 @@ struct ClosureVarInfo;
 #define _JS_CTYPE_APNPTR            _JS_CTYPE(ArgsPrivateNative *,    _JS_PTR, --, --, INFALLIBLE)
 #define _JS_CTYPE_CVIPTR            _JS_CTYPE(const ClosureVarInfo *, _JS_PTR, --, --, INFALLIBLE)
 #define _JS_CTYPE_FRAMEINFO         _JS_CTYPE(FrameInfo *,            _JS_PTR, --, --, INFALLIBLE)
 
 #define _JS_EXPAND(tokens)  tokens
 
 #define _JS_CTYPE_TYPE2(t,s,p,a,f)      t
 #define _JS_CTYPE_TYPE(tyname)          _JS_EXPAND(_JS_CTYPE_TYPE2    _JS_CTYPE_##tyname)
-#define _JS_CTYPE_RETSIZE2(t,s,p,a,f)   s##_RETSIZE
-#define _JS_CTYPE_RETSIZE(tyname)       _JS_EXPAND(_JS_CTYPE_RETSIZE2 _JS_CTYPE_##tyname)
-#define _JS_CTYPE_ARGSIZE2(t,s,p,a,f)   s##_ARGSIZE
-#define _JS_CTYPE_ARGSIZE(tyname)       _JS_EXPAND(_JS_CTYPE_ARGSIZE2 _JS_CTYPE_##tyname)
+#define _JS_CTYPE_RETTYPE2(t,s,p,a,f)   s##_RETTYPE
+#define _JS_CTYPE_RETTYPE(tyname)       _JS_EXPAND(_JS_CTYPE_RETTYPE2 _JS_CTYPE_##tyname)
+#define _JS_CTYPE_ARGTYPE2(t,s,p,a,f)   s##_ARGTYPE
+#define _JS_CTYPE_ARGTYPE(tyname)       _JS_EXPAND(_JS_CTYPE_ARGTYPE2 _JS_CTYPE_##tyname)
 #define _JS_CTYPE_PCH2(t,s,p,a,f)       p
 #define _JS_CTYPE_PCH(tyname)           _JS_EXPAND(_JS_CTYPE_PCH2     _JS_CTYPE_##tyname)
 #define _JS_CTYPE_ACH2(t,s,p,a,f)       a
 #define _JS_CTYPE_ACH(tyname)           _JS_EXPAND(_JS_CTYPE_ACH2     _JS_CTYPE_##tyname)
 #define _JS_CTYPE_FLAGS2(t,s,p,a,f)     f
 #define _JS_CTYPE_FLAGS(tyname)         _JS_EXPAND(_JS_CTYPE_FLAGS2   _JS_CTYPE_##tyname)
 
 #define _JS_static_TN(t)  static t
@@ -310,97 +310,97 @@ struct ClosureVarInfo;
  *
  * - The storeAccSet.  This indicates which memory access regions the function
  *   accesses.  It must be ACC_NONE if the function is pure;  use
  *   ACC_STORE_ANY if you're not sure.  Used to determine if each call site of
  *   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_ARGSIZE(at0) << (1*nanojit::ARGSIZE_SHIFT)) |                  \
-                        _JS_CTYPE_RETSIZE(rt),                                                    \
+                        (_JS_CTYPE_ARGTYPE(at0) << (1*nanojit::ARGTYPE_SHIFT)) |                  \
+                        _JS_CTYPE_RETTYPE(rt),                                                    \
                         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_ARGSIZE(at0) << (2*nanojit::ARGSIZE_SHIFT)) |                  \
-                        (_JS_CTYPE_ARGSIZE(at1) << (1*nanojit::ARGSIZE_SHIFT)) |                  \
-                        _JS_CTYPE_RETSIZE(rt),                                                    \
+                        (_JS_CTYPE_ARGTYPE(at0) << (2*nanojit::ARGTYPE_SHIFT)) |                  \
+                        (_JS_CTYPE_ARGTYPE(at1) << (1*nanojit::ARGTYPE_SHIFT)) |                  \
+                        _JS_CTYPE_RETTYPE(rt),                                                    \
                         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_ARGSIZE(at0) << (3*nanojit::ARGSIZE_SHIFT)) |                  \
-                        (_JS_CTYPE_ARGSIZE(at1) << (2*nanojit::ARGSIZE_SHIFT)) |                  \
-                        (_JS_CTYPE_ARGSIZE(at2) << (1*nanojit::ARGSIZE_SHIFT)) |                  \
-                        _JS_CTYPE_RETSIZE(rt),                                                    \
+                        (_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),                                                    \
                         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_CTYPE_TYPE(at3)),                                                    \
-                        (_JS_CTYPE_ARGSIZE(at0) << (4*nanojit::ARGSIZE_SHIFT)) |                  \
-                        (_JS_CTYPE_ARGSIZE(at1) << (3*nanojit::ARGSIZE_SHIFT)) |                  \
-                        (_JS_CTYPE_ARGSIZE(at2) << (2*nanojit::ARGSIZE_SHIFT)) |                  \
-                        (_JS_CTYPE_ARGSIZE(at3) << (1*nanojit::ARGSIZE_SHIFT)) |                  \
-                        _JS_CTYPE_RETSIZE(rt),                                                    \
+                        (_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),                                                    \
                         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_ARGSIZE(at0) << (5*nanojit::ARGSIZE_SHIFT)) |                  \
-                        (_JS_CTYPE_ARGSIZE(at1) << (4*nanojit::ARGSIZE_SHIFT)) |                  \
-                        (_JS_CTYPE_ARGSIZE(at2) << (3*nanojit::ARGSIZE_SHIFT)) |                  \
-                        (_JS_CTYPE_ARGSIZE(at3) << (2*nanojit::ARGSIZE_SHIFT)) |                  \
-                        (_JS_CTYPE_ARGSIZE(at4) << (1*nanojit::ARGSIZE_SHIFT)) |                  \
-                        _JS_CTYPE_RETSIZE(rt),                                                    \
+                        (_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),                                                    \
                         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_ARGSIZE(at0) << (6*nanojit::ARGSIZE_SHIFT)) |                  \
-                        (_JS_CTYPE_ARGSIZE(at1) << (5*nanojit::ARGSIZE_SHIFT)) |                  \
-                        (_JS_CTYPE_ARGSIZE(at2) << (4*nanojit::ARGSIZE_SHIFT)) |                  \
-                        (_JS_CTYPE_ARGSIZE(at3) << (3*nanojit::ARGSIZE_SHIFT)) |                  \
-                        (_JS_CTYPE_ARGSIZE(at4) << (2*nanojit::ARGSIZE_SHIFT)) |                  \
-                        (_JS_CTYPE_ARGSIZE(at5) << (1*nanojit::ARGSIZE_SHIFT)) |                  \
-                        _JS_CTYPE_RETSIZE(rt),                                                    \
+                        (_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),                                                    \
                         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_CTYPE_TYPE(at6)),                                                    \
-                        (_JS_CTYPE_ARGSIZE(at0) << (7*nanojit::ARGSIZE_SHIFT)) |                  \
-                        (_JS_CTYPE_ARGSIZE(at1) << (6*nanojit::ARGSIZE_SHIFT)) |                  \
-                        (_JS_CTYPE_ARGSIZE(at2) << (5*nanojit::ARGSIZE_SHIFT)) |                  \
-                        (_JS_CTYPE_ARGSIZE(at3) << (4*nanojit::ARGSIZE_SHIFT)) |                  \
-                        (_JS_CTYPE_ARGSIZE(at4) << (3*nanojit::ARGSIZE_SHIFT)) |                  \
-                        (_JS_CTYPE_ARGSIZE(at5) << (2*nanojit::ARGSIZE_SHIFT)) |                  \
-                        (_JS_CTYPE_ARGSIZE(at6) << (1*nanojit::ARGSIZE_SHIFT)) |                  \
-                        _JS_CTYPE_RETSIZE(rt),                                                    \
+                        (_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),                                                    \
                         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_ARGSIZE(at0) << (8*nanojit::ARGSIZE_SHIFT)) |                  \
-                        (_JS_CTYPE_ARGSIZE(at1) << (7*nanojit::ARGSIZE_SHIFT)) |                  \
-                        (_JS_CTYPE_ARGSIZE(at2) << (6*nanojit::ARGSIZE_SHIFT)) |                  \
-                        (_JS_CTYPE_ARGSIZE(at3) << (5*nanojit::ARGSIZE_SHIFT)) |                  \
-                        (_JS_CTYPE_ARGSIZE(at4) << (4*nanojit::ARGSIZE_SHIFT)) |                  \
-                        (_JS_CTYPE_ARGSIZE(at5) << (3*nanojit::ARGSIZE_SHIFT)) |                  \
-                        (_JS_CTYPE_ARGSIZE(at6) << (2*nanojit::ARGSIZE_SHIFT)) |                  \
-                        (_JS_CTYPE_ARGSIZE(at7) << (1*nanojit::ARGSIZE_SHIFT)) |                  \
-                        _JS_CTYPE_RETSIZE(rt),                                                    \
+                        (_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),                                                    \
                         isPure, storeAccSet)
 
 #define JS_DECLARE_CALLINFO(name)  extern const nanojit::CallInfo _JS_CALLINFO(name);
 
 #define _JS_TN_INIT_HELPER_n(n, args)  _JS_TN_INIT_HELPER_##n args
 
 #define _JS_TN_INIT_HELPER_1(linkage, rt, op, at0, isPure, storeAccSet)                           \
     &_JS_CALLINFO(op),                                                                            \
--- a/js/src/jstracer.cpp
+++ b/js/src/jstracer.cpp
@@ -4970,17 +4970,17 @@ JS_REQUIRES_STACK void
 TraceRecorder::emitTreeCall(TreeFragment* inner, VMSideExit* exit)
 {
     /* Invoke the inner tree. */
     LIns* args[] = { lirbuf->state }; /* reverse order */
     /* Construct a call info structure for the target tree. */
     CallInfo* ci = new (traceAlloc()) CallInfo();
     ci->_address = uintptr_t(inner->code());
     JS_ASSERT(ci->_address);
-    ci->_argtypes = ARGSIZE_P | ARGSIZE_P << ARGSIZE_SHIFT;
+    ci->_typesig = ARGTYPE_P | ARGTYPE_P << ARGTYPE_SHIFT;
     ci->_isPure = 0;
     ci->_storeAccSet = ACC_STORE_ANY;
     ci->_abi = ABI_FASTCALL;
 #ifdef DEBUG
     ci->_name = "fragment";
 #endif
     LIns* rec = lir->insCall(ci, args);
     LIns* lr = lir->insLoad(LIR_ldp, rec, offsetof(GuardRecord, exit));
@@ -10500,21 +10500,21 @@ TraceRecorder::emitNativePropertyOp(JSSc
     LIns* vp_ins = lir->insAlloc(sizeof(jsval));
     lir->insStorei(vp_ins, lirbuf->state, offsetof(InterpState, nativeVp));
     lir->insStorei(INS_CONST(1), lirbuf->state, offsetof(InterpState, nativeVpLen));
     if (setflag)
         lir->insStorei(boxed_ins, vp_ins, 0);
 
     CallInfo* ci = new (traceAlloc()) CallInfo();
     ci->_address = uintptr_t(setflag ? sprop->setterOp() : sprop->getterOp());
-    ci->_argtypes = ARGSIZE_I << (0*ARGSIZE_SHIFT) |
-                    ARGSIZE_P << (1*ARGSIZE_SHIFT) |
-                    ARGSIZE_P << (2*ARGSIZE_SHIFT) |
-                    ARGSIZE_P << (3*ARGSIZE_SHIFT) |
-                    ARGSIZE_P << (4*ARGSIZE_SHIFT);
+    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->_isPure = 0;
     ci->_storeAccSet = ACC_STORE_ANY;
     ci->_abi = ABI_CDECL;
 #ifdef DEBUG
     ci->_name = "JSPropertyOp";
 #endif
     LIns* args[] = { vp_ins, INS_CONSTVAL(SPROP_USERID(sprop)), obj_ins, cx_ins };
     LIns* ok_ins = lir->insCall(ci, args);
@@ -10855,54 +10855,54 @@ TraceRecorder::callNative(uintN argc, JS
             lir->insStorei(undef_ins, invokevp_ins, n * sizeof(jsval));
 
             if (outOfMemory())
                 RETURN_STOP("out of memory in extra slots");
         }
     }
 
     // Set up arguments for the JSNative or JSFastNative.
-    uint32 types;
+    uint32 typesig;
     if (fun->flags & JSFUN_FAST_NATIVE) {
         if (mode == JSOP_NEW)
             RETURN_STOP("untraceable fast native constructor");
         native_rval_ins = invokevp_ins;
         args[0] = invokevp_ins;
         args[1] = lir->insImm(argc);
         args[2] = cx_ins;
-        types = ARGSIZE_I << (0*ARGSIZE_SHIFT) |
-                ARGSIZE_P << (1*ARGSIZE_SHIFT) |
-                ARGSIZE_I << (2*ARGSIZE_SHIFT) |
-                ARGSIZE_P << (3*ARGSIZE_SHIFT);
+        typesig = ARGTYPE_I << (0*ARGTYPE_SHIFT) |
+                  ARGTYPE_P << (1*ARGTYPE_SHIFT) |
+                  ARGTYPE_I << (2*ARGTYPE_SHIFT) |
+                  ARGTYPE_P << (3*ARGTYPE_SHIFT);
     } else {
         int32_t offset = (vplen - 1) * sizeof(jsval);
         native_rval_ins = lir->ins2(LIR_piadd, invokevp_ins, INS_CONSTWORD(offset));
         args[0] = native_rval_ins;
         args[1] = lir->ins2(LIR_piadd, invokevp_ins, INS_CONSTWORD(2 * sizeof(jsval)));
         args[2] = lir->insImm(argc);
         args[3] = this_ins;
         args[4] = cx_ins;
-        types = ARGSIZE_I << (0*ARGSIZE_SHIFT) |
-                ARGSIZE_P << (1*ARGSIZE_SHIFT) |
-                ARGSIZE_P << (2*ARGSIZE_SHIFT) |
-                ARGSIZE_I << (3*ARGSIZE_SHIFT) |
-                ARGSIZE_P << (4*ARGSIZE_SHIFT) |
-                ARGSIZE_P << (5*ARGSIZE_SHIFT);
+        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);
     }
 
     // Generate CallInfo and a JSSpecializedNative structure on the fly.
     // Do not use JSTN_UNBOX_AFTER for mode JSOP_NEW because
     // record_NativeCallComplete unboxes the result specially.
 
     CallInfo* ci = new (traceAlloc()) CallInfo();
     ci->_address = uintptr_t(fun->u.n.native);
     ci->_isPure = 0;
     ci->_storeAccSet = ACC_STORE_ANY;
     ci->_abi = ABI_CDECL;
-    ci->_argtypes = types;
+    ci->_typesig = typesig;
 #ifdef DEBUG
     ci->_name = JS_GetFunctionName(fun);
  #endif
 
     // Generate a JSSpecializedNative structure on the fly.
     generatedSpecializedNative.builtin = ci;
     generatedSpecializedNative.flags = FAIL_STATUS | ((mode == JSOP_NEW)
                                                         ? JSTN_CONSTRUCTOR
@@ -12697,17 +12697,17 @@ TraceRecorder::record_NativeCallComplete
         JS_ASSERT(&v == &cx->fp->regs->sp[-1] && get(&v) == v_ins);
         set(&v, unbox_jsval(v, v_ins, snapshot(BRANCH_EXIT)));
     } else if (JSTN_ERRTYPE(pendingSpecializedNative) == FAIL_NEG) {
         /* Already added i2f in functionCall. */
         JS_ASSERT(JSVAL_IS_NUMBER(v));
     } else {
         /* Convert the result to double if the builtin returns int32. */
         if (JSVAL_IS_NUMBER(v) &&
-            (pendingSpecializedNative->builtin->_argtypes & ARGSIZE_MASK_ANY) == ARGSIZE_I) {
+            pendingSpecializedNative->builtin->returnType() == ARGTYPE_I) {
             set(&v, lir->ins1(LIR_i2f, v_ins));
         }
     }
 
     // We'll null pendingSpecializedNative in monitorRecording, on the next op
     // cycle.  There must be a next op since the stack is non-empty.
     return ARECORD_CONTINUE;
 }