Style (and substance for vim users: left brace opening in column 1 enables [[ navigation).
authorBrendan Eich <brendan@mozilla.org>
Wed, 28 May 2008 19:07:16 -0700
changeset 17180 c75cf4011be75d3db32d4db7ed7096cc21f91f80
parent 17179 1c495025f185a9e1e3beb14f064b88af12e20e68
child 17181 4036ebe64345becdac54ca4c084f01a8cb5f4f85
push idunknown
push userunknown
push dateunknown
milestone1.9.1a1pre
Style (and substance for vim users: left brace opening in column 1 enables [[ navigation).
js/src/jsinterp.cpp
--- a/js/src/jsinterp.cpp
+++ b/js/src/jsinterp.cpp
@@ -2283,132 +2283,176 @@ js_DumpOpMeters()
     }
     fclose(fp);
 }
 
 #endif /* JS_OPSMETER */
 
 #else /* !defined js_invoke_c__ */
 
-static inline void prim_push_stack(JSFrameRegs& regs, jsval& v) {
+static inline void
+prim_push_stack(JSFrameRegs& regs, jsval& v)
+{
     *regs.sp++ = v;
 }
 
-static inline void prim_pop_stack(JSFrameRegs& regs, jsval& v) {
+static inline void
+prim_pop_stack(JSFrameRegs& regs, jsval& v)
+{
     v = *--regs.sp;
 }
 
-static inline void prim_store_stack(JSFrameRegs& regs, int n, jsval& v) {
+static inline void
+prim_store_stack(JSFrameRegs& regs, int n, jsval& v)
+{
     regs.sp[n] = v;
 }
 
-static inline void prim_fetch_stack(JSFrameRegs& regs, int n, jsval& v) {
+static inline void
+prim_fetch_stack(JSFrameRegs& regs, int n, jsval& v)
+{
     v = regs.sp[n];
 }
 
-static inline void prim_adjust_stack(JSFrameRegs& regs, int n) {
+static inline void
+prim_adjust_stack(JSFrameRegs& regs, int n)
+{
     regs.sp += n;
 }
 
 #define PUSH_STACK(v)    prim_push_stack(regs, (v))
 #define POP_STACK(v)     prim_pop_stack(regs, (v))
 #define STORE_STACK(n,v) prim_store_stack(regs, (n), (v))
 #define FETCH_STACK(n,v) prim_fetch_stack(regs, (n), (v))
 #define ADJUST_STACK(n)  prim_adjust_stack(regs, (n))
 
-static inline void prim_generate_constant(jsval c, jsval& v) {
+static inline void
+prim_generate_constant(jsval c, jsval& v)
+{
     v = c;
 }
 
-static inline void prim_boolean_to_jsval(JSBool& b, jsval& v) {
+static inline void
+prim_boolean_to_jsval(JSBool& b, jsval& v)
+{
     v = BOOLEAN_TO_JSVAL(b);
 }
 
-static inline void prim_string_to_jsval(JSString*& str, jsval& v) {
+static inline void
+prim_string_to_jsval(JSString*& str, jsval& v)
+{
     v = STRING_TO_JSVAL(str);
 }
 
-static inline void prim_object_to_jsval(JSObject*& obj, jsval& v) {
+static inline void
+prim_object_to_jsval(JSObject*& obj, jsval& v)
+{
     v = OBJECT_TO_JSVAL(obj);
 }
 
-static inline void prim_id_to_jsval(jsid& id, jsval& v) {
+static inline void
+prim_id_to_jsval(jsid& id, jsval& v)
+{
     v = ID_TO_VALUE(id);
 }
 
-static inline void push_stack_constant(JSFrameRegs& regs, jsval c) {
+static inline void
+push_stack_constant(JSFrameRegs& regs, jsval c)
+{
     jsval v;
     prim_generate_constant(c, v);
     prim_push_stack(regs, v);
 }
 
-static inline void push_stack_boolean(JSFrameRegs& regs, JSBool& b) {
+static inline void
+push_stack_boolean(JSFrameRegs& regs, JSBool& b)
+{
     jsval v;
     prim_boolean_to_jsval(b, v);
     prim_push_stack(regs, v);
 }
 
-static inline void push_stack_object(JSFrameRegs& regs, JSObject*& obj) {
+static inline void
+push_stack_object(JSFrameRegs& regs, JSObject*& obj)
+{
     jsval v;
     prim_object_to_jsval(obj, v);
     prim_push_stack(regs, v);
 }
 
-static inline void push_stack_id(JSFrameRegs& regs, jsid& id) {
+static inline void
+push_stack_id(JSFrameRegs& regs, jsid& id)
+{
     jsval v;
     prim_id_to_jsval(id, v);
     prim_push_stack(regs, v);
 }
 
-static inline void store_stack_constant(JSFrameRegs& regs, int n, jsval c) {
+static inline void
+store_stack_constant(JSFrameRegs& regs, int n, jsval c)
+{
     jsval v;
     prim_generate_constant(c, v);
     prim_store_stack(regs, n, v);
 }
 
-static inline void store_stack_boolean(JSFrameRegs& regs, int n, JSBool& b) {
+static inline void
+store_stack_boolean(JSFrameRegs& regs, int n, JSBool& b)
+{
     jsval v;
     prim_boolean_to_jsval(b, v);
     prim_store_stack(regs, n, v);
 }
 
-static inline void store_stack_string(JSFrameRegs& regs, int n, JSString*& str) {
+static inline void
+store_stack_string(JSFrameRegs& regs, int n, JSString*& str)
+{
     jsval v;
     prim_string_to_jsval(str, v);
     prim_store_stack(regs, n, v);
 }
 
-static inline void store_stack_object(JSFrameRegs& regs, int n, JSObject*& obj) {
+static inline void
+store_stack_object(JSFrameRegs& regs, int n, JSObject*& obj)
+{
     jsval v;
     prim_object_to_jsval(obj, v);
     prim_store_stack(regs, n, v);
 }
 
 #define PUSH_STACK_CONSTANT(c)     push_stack_constant(regs, (c))
 #define PUSH_STACK_BOOLEAN(b)      push_stack_boolean(regs, (b))
 #define PUSH_STACK_OBJECT(obj)     push_stack_object(regs, (obj))
 #define PUSH_STACK_ID(id)          push_stack_id(regs, (id))
 #define STORE_STACK_CONSTANT(n, c) store_stack_constant(regs, (n), (c))
 #define STORE_STACK_BOOLEAN(n, b)  store_stack_boolean(regs, (n), (b))
 #define STORE_STACK_STRING(n, str) store_stack_string(regs, (n), (str))
 #define STORE_STACK_OBJECT(n, obj) store_stack_object(regs, (n), (obj))
 
-static inline bool guard_jsdouble_is_int_and_int_fits_in_jsval(jsdouble& d, jsint& i) {
+static inline bool
+guard_jsdouble_is_int_and_int_fits_in_jsval(jsdouble& d, jsint& i)
+{
     return JSDOUBLE_IS_INT(d, i) && INT_FITS_IN_JSVAL(i);
 }
 
-static inline void prim_int_to_jsval(jsint& i, jsval& v) {
+static inline void
+prim_int_to_jsval(jsint& i, jsval& v)
+{
     v = INT_TO_JSVAL(i);
 }
 
-static inline bool call_NewDoubleInRootedValue(JSContext* cx, jsdouble& d, jsval* vp) {
+static inline bool
+call_NewDoubleInRootedValue(JSContext* cx, jsdouble& d, jsval* vp)
+{
     return js_NewDoubleInRootedValue(cx, d, vp);
 }
 
-static inline bool store_number(JSContext* cx, JSFrameRegs& regs, int n, jsdouble& d) {
+static inline bool
+store_number(JSContext* cx, JSFrameRegs& regs, int n, jsdouble& d)
+{
     jsint i;
     if (guard_jsdouble_is_int_and_int_fits_in_jsval(d, i))
         prim_int_to_jsval(i, regs.sp[n]);
     else if (!call_NewDoubleInRootedValue(cx, d, &regs.sp[n]))
         return JS_FALSE;
     return JS_TRUE;
 }
 
@@ -2417,49 +2461,61 @@ static inline bool store_number(JSContex
  * to a jsint that fits in a jsval, otherwise GC-alloc space for it and push a
  * reference.
  */
 
 #define STORE_NUMBER(cx, n, d)                                                \
     if (!store_number(cx, regs, n, d))                                        \
         goto error;
 
-static inline bool guard_int_fits_in_jsval(jsint& i) {
+static inline bool
+guard_int_fits_in_jsval(jsint& i)
+{
     return INT_FITS_IN_JSVAL(i);
 }
 
-static inline void prim_int_to_double(jsint& i, jsdouble& d) {
+static inline void
+prim_int_to_double(jsint& i, jsdouble& d)
+{
     d = (jsdouble) i;
 }
 
-static inline bool store_int(JSContext* cx, JSFrameRegs& regs, int n, jsint& i) {
+static inline bool
+store_int(JSContext* cx, JSFrameRegs& regs, int n, jsint& i)
+{
     if (guard_int_fits_in_jsval(i)) {
         prim_int_to_jsval(i, regs.sp[n]);
     } else {
         jsdouble d;
         prim_int_to_double(i, d);
         if (!call_NewDoubleInRootedValue(cx, d, &regs.sp[n]))
             return JS_FALSE;
     }
     return JS_TRUE;
 }
 
 #define STORE_INT(cx, n, i)                                                   \
     if (!store_int(cx, regs, n, i))                                           \
         goto error;
 
-static inline bool guard_uint_fits_in_jsval(uint32& u) {
+static inline bool
+guard_uint_fits_in_jsval(uint32& u)
+{
     return u <= JSVAL_INT_MAX;
 }
 
-static inline void prim_uint_to_jsval(uint32& u, jsval& v) {
+static inline void
+prim_uint_to_jsval(uint32& u, jsval& v)
+{
     v = INT_TO_JSVAL(u);
 }
 
-static inline void prim_uint_to_double(uint32& u, jsdouble& d) {
+static inline void
+prim_uint_to_double(uint32& u, jsdouble& d)
+{
     d = (jsdouble) u;
 }
 
 static bool store_uint(JSContext* cx, JSFrameRegs& regs, int n, uint32& u) {
     if (guard_uint_fits_in_jsval(u)) {
         prim_uint_to_jsval(u, regs.sp[n]);
     } else {
         jsdouble d;
@@ -2469,45 +2525,59 @@ static bool store_uint(JSContext* cx, JS
     }
     return JS_TRUE;
 }
 
 #define STORE_UINT(cx, n, u)                                                  \
     if (!store_uint(cx, regs, n, u))                                          \
         goto error;
 
-static inline bool guard_jsval_is_int(jsval& v) {
+static inline bool
+guard_jsval_is_int(jsval& v)
+{
     return JSVAL_IS_INT(v);
 }
 
-static inline void prim_jsval_to_int(jsval& v, jsint& i) {
+static inline void
+prim_jsval_to_int(jsval& v, jsint& i)
+{
     i = JSVAL_TO_INT(v);
 }
 
-static inline bool guard_jsval_is_double(jsval& v) {
+static inline bool
+guard_jsval_is_double(jsval& v)
+{
     return JSVAL_IS_DOUBLE(v);
 }
 
-static inline void prim_jsval_to_double(jsval& v, jsdouble& d) {
+static inline void
+prim_jsval_to_double(jsval& v, jsdouble& d)
+{
     d = *JSVAL_TO_DOUBLE(v);
 }
 
-static inline void call_ValueToNumber(JSContext* cx, jsval* vp, jsdouble& d) {
+static inline void
+call_ValueToNumber(JSContext* cx, jsval* vp, jsdouble& d)
+{
     d = js_ValueToNumber(cx, vp);
 }
 
-static inline bool guard_jsval_is_null(jsval& v) {
+static inline bool
+guard_jsval_is_null(jsval& v)
+{
     return JSVAL_IS_NULL(v);
 }
 
 /*
  * Optimized conversion function that test for the desired type in v before
  * homing sp and calling a conversion function.
  */
-static inline bool value_to_number(JSContext* cx, JSFrameRegs& regs, int n, jsval& v, jsdouble& d) {
+static inline bool
+value_to_number(JSContext* cx, JSFrameRegs& regs, int n, jsval& v, jsdouble& d)
+{
     JS_ASSERT(v == regs.sp[n]);
     if (guard_jsval_is_int(v)) {
         int i;
         prim_jsval_to_int(v, i);
         prim_int_to_double(i, d);
     } else if (guard_jsval_is_double(v)) {
         prim_jsval_to_double(v, d);
     } else {
@@ -2518,32 +2588,38 @@ static inline bool value_to_number(JSCon
     }
     return JS_TRUE;
 }
 
 #define VALUE_TO_NUMBER(cx, n, v, d)                                          \
     if (!value_to_number(cx, regs, n, v, d))                                  \
         goto error;
 
-static inline bool fetch_number(JSContext* cx, JSFrameRegs& regs, int n, jsdouble& d) {
+static inline bool
+fetch_number(JSContext* cx, JSFrameRegs& regs, int n, jsdouble& d)
+{
     jsval v;
 
     prim_fetch_stack(regs, n, v);
     return value_to_number(cx, regs, n, v, d);
 }
 
 #define FETCH_NUMBER(cx, n, d)                                                \
     if (!fetch_number(cx, regs, n, d))                                        \
         goto error;
 
-static inline void call_ValueToECMAInt32(JSContext* cx, jsval* vp, jsint& i) {
+static inline void
+call_ValueToECMAInt32(JSContext* cx, jsval* vp, jsint& i)
+{
     i = js_ValueToECMAInt32(cx, vp);
 }
 
-static inline bool fetch_int(JSContext* cx, JSFrameRegs& regs, int n, jsint& i) {
+static inline bool
+fetch_int(JSContext* cx, JSFrameRegs& regs, int n, jsint& i)
+{
     jsval v;
     
     prim_fetch_stack(regs, n, v);
     if (guard_jsval_is_int(v)) {
         prim_jsval_to_int(v, i);
     } else {
         call_ValueToECMAInt32(cx, &regs.sp[n], i);
         if (!guard_jsval_is_null(regs.sp[n]))
@@ -2551,25 +2627,31 @@ static inline bool fetch_int(JSContext* 
     }
     return JS_TRUE;
 }
 
 #define FETCH_INT(cx, n, i)                                                   \
     if (!fetch_int(cx, regs, n, i))                                           \
         goto error;
 
-static inline void prim_int_to_uint(jsint& i, uint32& u) {
+static inline void
+prim_int_to_uint(jsint& i, uint32& u)
+{
     u = (uint32) i;
 }
 
-static inline void call_ValueToECMAUint32(JSContext* cx, jsval* vp, uint32& u) {
+static inline void
+call_ValueToECMAUint32(JSContext* cx, jsval* vp, uint32& u)
+{
     u = js_ValueToECMAUint32(cx, vp);
 }
 
-static inline bool fetch_uint(JSContext* cx, JSFrameRegs& regs, int n, uint32& u) {
+static inline bool
+fetch_uint(JSContext* cx, JSFrameRegs& regs, int n, uint32& u)
+{
     jsval v;
     
     prim_fetch_stack(regs, n, v);
     if (guard_jsval_is_int(v)) {
         int i;
         prim_jsval_to_int(v, i);
         prim_int_to_uint(i, u);
     } else {
@@ -2579,68 +2661,85 @@ static inline bool fetch_uint(JSContext*
     }
     return JS_TRUE;
 }
 
 #define FETCH_UINT(cx, n, ui)                                                 \
     if (!fetch_uint(cx, regs, n, ui))                                         \
         goto error;
 
-static inline void prim_generate_boolean_constant(JSBool c, JSBool& b) {
+static inline void
+prim_generate_boolean_constant(JSBool c, JSBool& b)
+{
     b = c;
 }
 
-static inline bool guard_jsval_is_boolean(jsval& v) {
+static inline bool
+guard_jsval_is_boolean(jsval& v)
+{
     return JSVAL_IS_BOOLEAN(v);
 }
 
-static inline void prim_jsval_to_boolean(jsval& v, JSBool& b) {
+static inline void
+prim_jsval_to_boolean(jsval& v, JSBool& b)
+{
     b = JSVAL_TO_BOOLEAN(v);
 }
 
-static inline bool call_ValueToBoolean(jsval& v, JSBool& b) {
+static inline bool
+call_ValueToBoolean(jsval& v, JSBool& b)
+{
     b = js_ValueToBoolean(v);
 }
 
-static inline void pop_boolean(JSContext* cx, JSFrameRegs& regs, jsval& v, JSBool& b) {
+static inline void
+pop_boolean(JSContext* cx, JSFrameRegs& regs, jsval& v, JSBool& b)
+{
     prim_fetch_stack(regs, -1, v);
     if (guard_jsval_is_null(v)) {
         prim_generate_boolean_constant(JS_FALSE, b);
     } else if (guard_jsval_is_boolean(v)) {
         prim_jsval_to_boolean(v, b);
     } else {
         call_ValueToBoolean(v, b);
     }
     prim_adjust_stack(regs, -1);
 }
 
 #define POP_BOOLEAN(cx, v, b)                                                 \
     pop_boolean(cx, regs, v, b);                                              \
 
-static inline bool guard_jsval_is_primitive(jsval& v) {
+static inline bool
+guard_jsval_is_primitive(jsval& v)
+{
     return JSVAL_IS_PRIMITIVE(v);
 }
 
-static inline void prim_jsval_to_object(jsval& v, JSObject*& obj) {
+static inline void
+prim_jsval_to_object(jsval& v, JSObject*& obj)
+{
     obj = JSVAL_TO_OBJECT(v);
 }
 
-static inline void call_jsValueToNonNullObject(JSContext* cx, jsval& v, JSObject*& obj) {
+static inline bool
+guard_obj_is_null(JSObject*& obj)
+{
+    return !obj;
+}
+
+static inline void
+call_ValueToNonNullObject(JSContext* cx, jsval& v, JSObject*& obj)
+{
     obj = js_ValueToNonNullObject(cx, v);
 }
 
-static inline bool guard_obj_is_null(JSObject*& obj) {
-    return !obj;
-}
-
-static inline void call_ValueToNonNullObject(JSContext* cx, jsval& v, JSObject*& obj) {
-    obj = js_ValueToNonNullObject(cx, v);
-}
-
-static inline bool value_to_object(JSContext* cx, JSFrameRegs& regs, int n, jsval& v, JSObject*& obj) {
+static inline bool
+value_to_object(JSContext* cx, JSFrameRegs& regs, int n, jsval& v,
+                JSObject*& obj)
+{
     if (!guard_jsval_is_primitive(v)) {
         prim_jsval_to_object(v, obj);
     } else {
         call_ValueToNonNullObject(cx, v, obj);
         if (guard_obj_is_null(obj))
             return JS_FALSE;
         jsval x;
         prim_object_to_jsval(obj, x);
@@ -2648,57 +2747,72 @@ static inline bool value_to_object(JSCon
     }
     return JS_TRUE;
 }
 
 #define VALUE_TO_OBJECT(cx, n, v, obj)                                        \
     if (!value_to_object(cx, regs, n, v, obj))                                \
         goto error;
 
-static inline bool fetch_object(JSContext* cx, JSFrameRegs& regs, int n, jsval& v, JSObject*& obj) {
+static inline bool
+fetch_object(JSContext* cx, JSFrameRegs& regs, int n, jsval& v, JSObject*& obj)
+{
     prim_fetch_stack(regs, n, v);
     return value_to_object(cx, regs, n, v, obj);
 }
 
 #define FETCH_OBJECT(cx, n, v, obj)                                           \
     if (!fetch_object(cx, regs, n, v, obj))                                   \
         goto error;
 
-static inline bool call_obj_default_value(JSContext* cx, JSObject*& obj, JSType hint, jsval* vp) {
+static inline bool
+call_obj_default_value(JSContext* cx, JSObject*& obj, JSType hint, jsval* vp)
+{
     return OBJ_DEFAULT_VALUE(cx, obj, hint, vp);
 }
 
-static inline bool default_value(JSContext* cx, JSFrameRegs& regs, int n, JSType hint, jsval& v) {
+static inline bool
+default_value(JSContext* cx, JSFrameRegs& regs, int n, JSType hint, jsval& v)
+{
     JS_ASSERT(!JSVAL_IS_PRIMITIVE(v));
     JS_ASSERT(v == regs.sp[n]);
     JSObject* obj;
     prim_jsval_to_object(v, obj);
     if (!call_obj_default_value(cx, obj, hint, &regs.sp[n])) 
         return JS_FALSE;
     prim_fetch_stack(regs, n, v);
     return JS_TRUE;
 }
 
 #define DEFAULT_VALUE(cx, n, hint, v)                                         \
     if (!default_value(cx, regs, n, hint, v))                                 \
         goto error;
 
-static inline void prim_dadd(jsdouble& a, jsdouble& b, jsdouble& r) {
+static inline void
+prim_dadd(jsdouble& a, jsdouble& b, jsdouble& r)
+{
     r = a + b;
 }
 
-static inline void prim_dsub(jsdouble& a, jsdouble& b, jsdouble& r) {
+static inline void
+prim_dsub(jsdouble& a, jsdouble& b, jsdouble& r)
+{
     r = a - b;
 }
 
-static inline void prim_dmul(jsdouble& a, jsdouble& b, jsdouble& r) {
+static inline void
+prim_dmul(jsdouble& a, jsdouble& b, jsdouble& r)
+{
     r = a * b;
 }
 
-static inline void prim_ddiv(JSContext* cx, JSRuntime* rt, JSFrameRegs& regs, int n, jsdouble& a, jsdouble& b) {
+static inline void
+prim_ddiv(JSContext* cx, JSRuntime* rt, JSFrameRegs& regs, int n, jsdouble& a,
+          jsdouble& b)
+{
     if (b == 0) {
         jsval* vp = &regs.sp[n];
 #ifdef XP_WIN
         /* XXX MSVC miscompiles such that (NaN == 0) */
         if (JSDOUBLE_IS_NaN(b))
             *vp = DOUBLE_TO_JSVAL(rt->jsNaN);
         else
 #endif
@@ -2709,125 +2823,172 @@ static inline void prim_ddiv(JSContext* 
         else
             *vp = DOUBLE_TO_JSVAL(rt->jsPositiveInfinity);
     } else {
         jsdouble r = a / b;
         store_number(cx, regs, n, r);
     }
 }
 
-static inline void prim_dmod(JSContext* cx, JSRuntime* rt, JSFrameRegs& regs, int n, jsdouble& a, jsdouble& b) {
+static inline void
+prim_dmod(JSContext* cx, JSRuntime* rt, JSFrameRegs& regs, int n, jsdouble& a,
+          jsdouble& b)
+{
     if (b == 0) {
-       store_stack_constant(regs, -1, DOUBLE_TO_JSVAL(rt->jsNaN));
+        store_stack_constant(regs, -1, DOUBLE_TO_JSVAL(rt->jsNaN));
     } else {
-      jsdouble r;
+        jsdouble r;
 #ifdef XP_WIN
-      /* Workaround MS fmod bug where 42 % (1/0) => NaN, not 42. */
-      if (!(JSDOUBLE_IS_FINITE(a) && JSDOUBLE_IS_INFINITE(b)))
-          r = a;
-      else 
+        /* Workaround MS fmod bug where 42 % (1/0) => NaN, not 42. */
+        if (!(JSDOUBLE_IS_FINITE(a) && JSDOUBLE_IS_INFINITE(b)))
+            r = a;
+        else 
 #endif
-        r = fmod(a, b);
-      store_number(cx, regs, n, r);
+            r = fmod(a, b);
+        store_number(cx, regs, n, r);
     }
 }
 
-static inline void prim_ior(jsint& a, jsint& b, jsint& r) {
+static inline void
+prim_ior(jsint& a, jsint& b, jsint& r)
+{
     r = a | b;
 }
 
-static inline void prim_ixor(jsint& a, jsint& b, jsint& r) {
+static inline void
+prim_ixor(jsint& a, jsint& b, jsint& r)
+{
     r = a ^ b;
 }
 
-static inline void prim_iand(jsint& a, jsint& b, jsint& r) {
+static inline void
+prim_iand(jsint& a, jsint& b, jsint& r)
+{
     r = a & b;
 }
 
-static inline void prim_ilsh(jsint& a, jsint& b, jsint& r) {
+static inline void
+prim_ilsh(jsint& a, jsint& b, jsint& r)
+{
     r = a << (b & 31);
 }
 
-static inline void prim_irsh(jsint& a, jsint& b, jsint& r) {
+static inline void
+prim_irsh(jsint& a, jsint& b, jsint& r)
+{
     r = a >> (b & 31);
 }
 
-static inline void prim_ursh(uint32& a, jsint& b, uint32& r) {
+static inline void
+prim_ursh(uint32& a, jsint& b, uint32& r)
+{
     r = a >> (b & 31);
 }
 
-static inline bool guard_boolean_is_true(JSBool& cond) {
+static inline bool
+guard_boolean_is_true(JSBool& cond)
+{
     return cond;
 }
 
-static inline void prim_icmp_lt(jsint& a, jsint& b, JSBool& r) {
+static inline void
+prim_icmp_lt(jsint& a, jsint& b, JSBool& r)
+{
     r = a < b;
 }
 
-static inline void prim_icmp_le(jsint& a, jsint& b, JSBool& r) {
+static inline void
+prim_icmp_le(jsint& a, jsint& b, JSBool& r)
+{
     r = a <= b;
 }
 
-static inline void prim_icmp_gt(jsint& a, jsint& b, JSBool& r) {
+static inline void
+prim_icmp_gt(jsint& a, jsint& b, JSBool& r)
+{
     r = a > b;
 }
 
-static inline void prim_icmp_ge(jsint& a, jsint& b, JSBool& r) {
+static inline void
+prim_icmp_ge(jsint& a, jsint& b, JSBool& r)
+{
     r = a >= b;
 }
 
-static inline void prim_dcmp_lt(bool ifnan, jsdouble& a, jsdouble& b, JSBool& r) {
+static inline void
+prim_dcmp_lt(bool ifnan, jsdouble& a, jsdouble& b, JSBool& r)
+{
     r = JSDOUBLE_COMPARE(a, <, b, ifnan);
 }
 
-static inline void prim_dcmp_le(bool ifnan, jsdouble& a, jsdouble& b, JSBool& r) {
+static inline void
+prim_dcmp_le(bool ifnan, jsdouble& a, jsdouble& b, JSBool& r)
+{
     r = JSDOUBLE_COMPARE(a, <=, b, ifnan);
 }
 
-static inline void prim_dcmp_gt(bool ifnan, jsdouble& a, jsdouble& b, JSBool& r) {
+static inline void
+prim_dcmp_gt(bool ifnan, jsdouble& a, jsdouble& b, JSBool& r)
+{
     r = JSDOUBLE_COMPARE(a, >, b, ifnan);
 }
 
-static inline void prim_dcmp_ge(bool ifnan, jsdouble& a, jsdouble& b, JSBool& r) {
+static inline void
+prim_dcmp_ge(bool ifnan, jsdouble& a, jsdouble& b, JSBool& r)
+{
     r = JSDOUBLE_COMPARE(a, >=, b, ifnan);
 }
 
-static inline void prim_generate_int_constant(jsint c, jsint& v) {
+static inline void
+prim_generate_int_constant(jsint c, jsint& v)
+{
     v = c;
 }
 
-static inline void prim_jsval_to_string(jsval& v, JSString*& s) {
+static inline void
+prim_jsval_to_string(jsval& v, JSString*& s)
+{
     s = JSVAL_TO_STRING(v);
 }
 
-static inline void call_CompareStrings(JSString*& a, JSString*& b, jsint& r) {
+static inline void
+call_CompareStrings(JSString*& a, JSString*& b, jsint& r)
+{
     r = js_CompareStrings(a, b);
 }
 
-static inline bool guard_both_jsvals_are_int(jsval& a, jsval& b) {
+static inline bool
+guard_both_jsvals_are_int(jsval& a, jsval& b)
+{
     return (a & b) & JSVAL_INT;
 }
 
-static inline bool guard_both_jsvals_are_string(jsval& a, jsval& b) {
+static inline bool
+guard_both_jsvals_are_string(jsval& a, jsval& b)
+{
     return JSVAL_IS_STRING(a) && JSVAL_IS_STRING(b);
 }
 
 /*
  * The monitor observers backward branches and triggers the trace recorder. This
  * is the only part of the tracing system that is always enabled and thus incurs 
  * a mild runtime overhead even when not tracing.
  */
-static inline void monitor_branch(JSContext* cx, JSFrameRegs& regs, int offset) {
+static inline void
+monitor_branch(JSContext* cx, JSFrameRegs& regs, int offset)
+{
 }
 
 /*
  * Unsupported opcodes trigger a trace stop condition and cause the trace
  * recorder to abandon the current trace.
  */
-static inline void trace_stop(const char* op) {
+static inline void
+trace_stop(const char* op)
+{
 }
 
 /*
  * Quickly test if v is an int from the [-2**29, 2**29) range, that is, when
  * the lowest bit of v is 1 and the bits 30 and 31 are both either 0 or 1. For
  * such v we can do increment or decrement via adding or subtracting two
  * without checking that the result overflows JSVAL_INT_MIN or JSVAL_INT_MAX.
  */