Merge.
authorDavid Anderson <danderson@mozilla.com>
Wed, 13 Aug 2008 17:45:50 -0700
changeset 18152 4d81cfd3f6e4bd20bc76626faffd39ff770c629c
parent 18151 97498b23f3602fba6ae4128551ac15835d5aa5a6 (current diff)
parent 18149 baac751c4bf54243cdeb047afe121381b9a71a88 (diff)
child 18153 8c2a3e462e6c807154095fee051f92205e4df931
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)
milestone1.9.1a2pre
Merge.
js/src/jsbuiltins.cpp
js/src/jstracer.cpp
--- a/js/src/jsbuiltins.cpp
+++ b/js/src/jsbuiltins.cpp
@@ -526,28 +526,30 @@ js_TypeOfBoolean(JSContext* cx, jsint un
     JS_ASSERT(JSVAL_IS_VOID(boxed) || JSVAL_IS_BOOLEAN(boxed));
     JSType type = JS_TypeOfValue(cx, boxed);
     return ATOM_TO_STRING(cx->runtime->atomState.typeAtoms[type]);
 }
 
 jsint FASTCALL
 js_Object_p_hasOwnProperty(JSContext* cx, JSObject* obj, JSString *str)
 {
+    jsid id = ATOM_TO_JSID(STRING_TO_JSVAL(str));
     jsval v;
-    if (!js_HasOwnProperty(cx, obj->map->ops->lookupProperty, obj, ATOM_TO_JSID(str), &v))
+    if (!js_HasOwnProperty(cx, obj->map->ops->lookupProperty, obj, id, &v))
         return JSVAL_TO_BOOLEAN(JSVAL_VOID);
     JS_ASSERT(JSVAL_IS_BOOLEAN(v));
     return JSVAL_TO_BOOLEAN(v);
 }
 
 jsint FASTCALL
 js_Object_p_propertyIsEnumerable(JSContext* cx, JSObject* obj, JSString *str)
 {
+    jsid id = ATOM_TO_JSID(STRING_TO_JSVAL(str));
     jsval v;
-    if (!js_PropertyIsEnumerable(cx, obj, ATOM_TO_JSID(str), &v))
+    if (!js_PropertyIsEnumerable(cx, obj, id, &v))
         return JSVAL_TO_BOOLEAN(JSVAL_VOID);
     JS_ASSERT(JSVAL_IS_BOOLEAN(v));
     return JSVAL_TO_BOOLEAN(v);
 }
 
 jsdouble FASTCALL
 js_BooleanToNumber(JSContext* cx, jsint unboxed)
 {
--- a/js/src/jstracer.cpp
+++ b/js/src/jstracer.cpp
@@ -1376,16 +1376,18 @@ TraceRecorder::emitTreeCall(Fragment* in
     SideExit* exit = lr->exit;
     import(ti, inner_sp, exit->numGlobalSlots, exit->calldepth, 
            exit->typeMap, exit->typeMap + exit->numGlobalSlots);
     /* Restore sp and rp to their original values (we still have them in a register). */
     if (callDepth > 0) {
         lir->insStorei(lirbuf->sp, lirbuf->state, offsetof(InterpState, sp));
         lir->insStorei(lirbuf->rp, lirbuf->state, offsetof(InterpState, rp));
     }
+    /* Store the guard pointer in case we exit on an unexpected guard */
+    lir->insStorei(lir->insImmPtr(lr), lirbuf->state, offsetof(InterpState, nestedExit));
     /* Guard that we come out of the inner tree along the same side exit we came out when
        we called the inner tree at recording time. */
     guard(true, lir->ins2(LIR_eq, ret, lir->insImmPtr(lr)), NESTED_EXIT);
 }
 
 int
 nanojit::StackFilter::getTop(LInsp guard)
 {
--- a/js/src/nanojit/avmplus.h
+++ b/js/src/nanojit/avmplus.h
@@ -284,22 +284,23 @@ operator delete(void* p)
 #define MMGC_MEM_TYPE(x)
 
 typedef int FunctionID;
 
 namespace avmplus
 {
     struct InterpState
     {
-        void* sp;
-        void* rp;
-        void* gp;
-        JSContext *cx;
-        void* eos;
-        void* eor;
+        void* sp; /* native stack pointer, stack[0] is spbase[0] */
+        void* rp; /* call stack pointer */
+        void* gp; /* global frame pointer */
+        JSContext *cx; /* current VM context handle */
+        void* eos; /* first unusable word after the native stack */
+        void* eor; /* first unusable word after the call stack */
+        nanojit::GuardRecord* nestedExit; /* innermost nested guard for NESTED_EXIT exits */
     };
 
     class String
     {
     };
 
     typedef class String AvmString;