Bug 1109375 - Make ICGetProp_Generic clonable for debug mode OSR. (r=jandem)
authorShu-yu Guo <shu@rfrn.org>
Mon, 15 Dec 2014 18:21:08 -0800
changeset 219862 f10fd10b7e27ffc969aa327fbd4839b72746552d
parent 219861 049230caef34282c6307300d0cb41d100fed71c1
child 219863 90da6425dc9d80605ba4688fcd217d0b064e9086
push id10419
push usercbook@mozilla.com
push dateTue, 16 Dec 2014 12:45:27 +0000
treeherderfx-team@ec87657146eb [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjandem
bugs1109375
milestone37.0a1
Bug 1109375 - Make ICGetProp_Generic clonable for debug mode OSR. (r=jandem)
js/src/jit/BaselineDebugModeOSR.cpp
js/src/jit/BaselineIC.cpp
js/src/jit/BaselineIC.h
--- a/js/src/jit/BaselineDebugModeOSR.cpp
+++ b/js/src/jit/BaselineDebugModeOSR.cpp
@@ -680,16 +680,17 @@ RecompileBaselineScriptForDebugMode(JSCo
     _(GetElem_NativePrototypeCallNative)        \
     _(GetElem_NativePrototypeCallScripted)      \
     _(GetProp_CallScripted)                     \
     _(GetProp_CallNative)                       \
     _(GetProp_CallNativePrototype)              \
     _(GetProp_CallDOMProxyNative)               \
     _(GetProp_CallDOMProxyWithGenerationNative) \
     _(GetProp_DOMProxyShadowed)                 \
+    _(GetProp_Generic)                          \
     _(SetProp_CallScripted)                     \
     _(SetProp_CallNative)
 
 #if JS_HAS_NO_SUCH_METHOD
 #define PATCHABLE_NSM_ICSTUB_KIND_LIST(_)       \
     _(GetElem_Dense)                            \
     _(GetElem_Arguments)                        \
     _(GetProp_NativePrototype)                  \
--- a/js/src/jit/BaselineIC.cpp
+++ b/js/src/jit/BaselineIC.cpp
@@ -7843,16 +7843,23 @@ ICGetProp_ArgumentsCallee::Compiler::gen
 
     EmitEnterTypeMonitorIC(masm);
 
     masm.bind(&failure);
     EmitStubGuardFailure(masm);
     return true;
 }
 
+/* static */ ICGetProp_Generic *
+ICGetProp_Generic::Clone(JSContext *cx, ICStubSpace *space, ICStub *firstMonitorStub,
+                         ICGetProp_Generic &other)
+{
+    return New(space, other.jitCode(), firstMonitorStub);
+}
+
 static bool
 DoGetPropGeneric(JSContext *cx, BaselineFrame *frame, ICGetProp_Generic *stub, MutableHandleValue val, MutableHandleValue res)
 {
     jsbytecode *pc = stub->getChainFallback()->icEntry()->pc(frame->script());
     JSOp op = JSOp(*pc);
     RootedPropertyName name(cx, frame->script()->getName(pc));
     return ComputeGetPropResult(cx, frame, op, name, val, res);
 }
--- a/js/src/jit/BaselineIC.h
+++ b/js/src/jit/BaselineIC.h
@@ -4191,16 +4191,19 @@ class ICGetProp_Generic : public ICMonit
   public:
     static inline ICGetProp_Generic *New(ICStubSpace *space, JitCode *code, ICStub *firstMonitorStub)
     {
         if(!code)
             return nullptr;
         return space->allocate<ICGetProp_Generic>(code, firstMonitorStub);
     }
 
+    static ICGetProp_Generic *Clone(JSContext *cx, ICStubSpace *space, ICStub *firstMonitorStub,
+                                    ICGetProp_Generic &other);
+
     class Compiler : public ICStubCompiler {
       protected:
         bool generateStubCode(MacroAssembler &masm);
         ICStub *firstMonitorStub_;
       public:
         explicit Compiler(JSContext *cx, ICStub *firstMonitorStub)
           : ICStubCompiler(cx, ICStub::GetProp_Generic),
             firstMonitorStub_(firstMonitorStub)