Bug 1447578 part 1 - Remove unused parameters from MacroAssembler constructor. r=luke
authorJan de Mooij <jdemooij@mozilla.com>
Wed, 21 Mar 2018 16:55:55 +0100
changeset 1460142 769fed48d30f053011e89ffa89b4e386cf78bc77
parent 1460113 243246b2f4406f0b2f118758220db5c7fdd215df
child 1460143 3d56f55622c6844c162aa5b65d98745eebf09530
push id260095
push userecoal95@gmail.com
push dateWed, 21 Mar 2018 17:01:50 +0000
treeherdertry@0c24a9ae2a68 [default view] [failures only]
reviewersluke
bugs1447578
milestone61.0a1
Bug 1447578 part 1 - Remove unused parameters from MacroAssembler constructor. r=luke
js/src/jit/MacroAssembler.cpp
js/src/jit/MacroAssembler.h
--- a/js/src/jit/MacroAssembler.cpp
+++ b/js/src/jit/MacroAssembler.cpp
@@ -2798,18 +2798,17 @@ MacroAssembler::alignJitStackBasedOnNArg
         assertStackAlignment(JitStackAlignment, sizeof(Value));
     } else {
         andToStackPtr(Imm32(~(JitStackAlignment - 1)));
     }
 }
 
 // ===============================================================
 
-MacroAssembler::MacroAssembler(JSContext* cx, IonScript* ion,
-                               JSScript* script, jsbytecode* pc)
+MacroAssembler::MacroAssembler(JSContext* cx)
   : framePushed_(0),
 #ifdef DEBUG
     inCall_(false),
 #endif
     emitProfilingInstrumentation_(false)
 {
     constructRoot(cx);
     jitContext_.emplace(cx, (js::jit::TempAllocator*)nullptr);
@@ -2817,21 +2816,16 @@ MacroAssembler::MacroAssembler(JSContext
     moveResolver_.setAllocator(*jitContext_->temp);
 #if defined(JS_CODEGEN_ARM)
     initWithAllocator();
     m_buffer.id = GetJitContext()->getNextAssemblerId();
 #elif defined(JS_CODEGEN_ARM64)
     initWithAllocator();
     armbuffer_.id = GetJitContext()->getNextAssemblerId();
 #endif
-    if (ion) {
-        setFramePushed(ion->frameSize());
-        if (pc && cx->runtime()->geckoProfiler().enabled())
-            enableProfilingInstrumentation();
-    }
 }
 
 bool
 MacroAssembler::icBuildOOLFakeExitFrame(void* fakeReturnAddr, AutoSaveLiveRegisters& save)
 {
     return buildOOLFakeExitFrame(fakeReturnAddr);
 }
 
--- a/js/src/jit/MacroAssembler.h
+++ b/js/src/jit/MacroAssembler.h
@@ -361,18 +361,17 @@ class MacroAssembler : public MacroAssem
 #elif defined(JS_CODEGEN_ARM64)
         initWithAllocator();
         armbuffer_.id = jcx->getNextAssemblerId();
 #endif
     }
 
     // This constructor should only be used when there is no JitContext active
     // (for example, Trampoline-$(ARCH).cpp and IonCaches.cpp).
-    explicit MacroAssembler(JSContext* cx, IonScript* ion = nullptr,
-                            JSScript* script = nullptr, jsbytecode* pc = nullptr);
+    explicit MacroAssembler(JSContext* cx);
 
     // wasm compilation handles its own JitContext-pushing
     struct WasmToken {};
     explicit MacroAssembler(WasmToken, TempAllocator& alloc)
       : framePushed_(0),
 #ifdef DEBUG
         inCall_(false),
 #endif