Bug 1494590 - Flatten BaselineCompiler class hierarchy. r=tcampbell
authorJan de Mooij <jdemooij@mozilla.com>
Sat, 29 Sep 2018 12:40:50 +0000
changeset 494616 95c3fa4ad4d45a11e08c6136e0ec5008ff19ec1f
parent 494615 c96874a02a34f471af532c70c6da531c5e429046
child 494617 77cf6aa75d7ebe8c871cd1fe5736d47b92e999e5
push id9984
push userffxbld-merge
push dateMon, 15 Oct 2018 21:07:35 +0000
treeherdermozilla-beta@183d27ea8570 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstcampbell
bugs1494590
milestone64.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1494590 - Flatten BaselineCompiler class hierarchy. r=tcampbell Differential Revision: https://phabricator.services.mozilla.com/D7056
js/src/jit/BaselineCompiler.cpp
js/src/jit/BaselineCompiler.h
js/src/jit/arm/BaselineCompiler-arm.cpp
js/src/jit/arm/BaselineCompiler-arm.h
js/src/jit/arm64/BaselineCompiler-arm64.h
js/src/jit/mips-shared/BaselineCompiler-mips-shared.cpp
js/src/jit/mips-shared/BaselineCompiler-mips-shared.h
js/src/jit/mips32/BaselineCompiler-mips32.cpp
js/src/jit/mips32/BaselineCompiler-mips32.h
js/src/jit/mips64/BaselineCompiler-mips64.cpp
js/src/jit/mips64/BaselineCompiler-mips64.h
js/src/jit/none/BaselineCompiler-none.h
js/src/jit/shared/BaselineCompiler-shared.cpp
js/src/jit/shared/BaselineCompiler-shared.h
js/src/jit/x64/BaselineCompiler-x64.cpp
js/src/jit/x64/BaselineCompiler-x64.h
js/src/jit/x86-shared/BaselineCompiler-x86-shared.cpp
js/src/jit/x86-shared/BaselineCompiler-x86-shared.h
js/src/jit/x86/BaselineCompiler-x86.cpp
js/src/jit/x86/BaselineCompiler-x86.h
js/src/moz.build
--- a/js/src/jit/BaselineCompiler.cpp
+++ b/js/src/jit/BaselineCompiler.cpp
@@ -37,20 +37,43 @@
 #include "vm/TypeInference-inl.h"
 
 using namespace js;
 using namespace js::jit;
 
 using mozilla::AssertedCast;
 
 BaselineCompiler::BaselineCompiler(JSContext* cx, TempAllocator& alloc, JSScript* script)
-  : BaselineCompilerSpecific(cx, alloc, script),
+  : cx(cx),
+    script(script),
+    pc(script->code()),
+    ionCompileable_(jit::IsIonEnabled(cx) && CanIonCompileScript(cx, script)),
+    compileDebugInstrumentation_(script->isDebuggee()),
+    alloc_(alloc),
+    analysis_(alloc, script),
+    frame(script, masm),
+    stubSpace_(),
+    icEntries_(),
+    pcMappingEntries_(),
+    icLoadLabels_(),
+    pushedBeforeCall_(0),
+#ifdef DEBUG
+    inCall_(false),
+#endif
+    profilerPushToggleOffset_(),
+    profilerEnterFrameToggleOffset_(),
+    profilerExitFrameToggleOffset_(),
+    traceLoggerToggleOffsets_(cx),
+    traceLoggerScriptTextIdOffset_(),
     yieldAndAwaitOffsets_(cx),
     modifiesArguments_(false)
 {
+#ifdef JS_CODEGEN_NONE
+    MOZ_CRASH();
+#endif
 }
 
 bool
 BaselineCompiler::init()
 {
     if (!analysis_.init(alloc_, cx->caches().gsnCache)) {
         return false;
     }
@@ -556,16 +579,119 @@ BaselineCompiler::emitIC(ICStub* stub, I
     entry->setReturnOffset(CodeOffset(masm.currentOffset()));
     if (!addICLoadLabel(patchOffset)) {
         return false;
     }
 
     return true;
 }
 
+void
+BaselineCompiler::prepareVMCall()
+{
+    pushedBeforeCall_ = masm.framePushed();
+#ifdef DEBUG
+    inCall_ = true;
+#endif
+
+    // Ensure everything is synced.
+    frame.syncStack(0);
+
+    // Save the frame pointer.
+    masm.Push(BaselineFrameReg);
+}
+
+bool
+BaselineCompiler::callVM(const VMFunction& fun, CallVMPhase phase)
+{
+    TrampolinePtr code = cx->runtime()->jitRuntime()->getVMWrapper(fun);
+
+#ifdef DEBUG
+    // Assert prepareVMCall() has been called.
+    MOZ_ASSERT(inCall_);
+    inCall_ = false;
+
+    // Assert the frame does not have an override pc when we're executing JIT code.
+    {
+        Label ok;
+        masm.branchTest32(Assembler::Zero, frame.addressOfFlags(),
+                          Imm32(BaselineFrame::HAS_OVERRIDE_PC), &ok);
+        masm.assumeUnreachable("BaselineFrame shouldn't override pc when executing JIT code");
+        masm.bind(&ok);
+    }
+#endif
+
+    // Compute argument size. Note that this include the size of the frame pointer
+    // pushed by prepareVMCall.
+    uint32_t argSize = fun.explicitStackSlots() * sizeof(void*) + sizeof(void*);
+
+    // Assert all arguments were pushed.
+    MOZ_ASSERT(masm.framePushed() - pushedBeforeCall_ == argSize);
+
+    Address frameSizeAddress(BaselineFrameReg, BaselineFrame::reverseOffsetOfFrameSize());
+    uint32_t frameVals = frame.nlocals() + frame.stackDepth();
+    uint32_t frameBaseSize = BaselineFrame::FramePointerOffset + BaselineFrame::Size();
+    uint32_t frameFullSize = frameBaseSize + (frameVals * sizeof(Value));
+    if (phase == POST_INITIALIZE) {
+        masm.store32(Imm32(frameFullSize), frameSizeAddress);
+        uint32_t descriptor = MakeFrameDescriptor(frameFullSize + argSize, FrameType::BaselineJS,
+                                                  ExitFrameLayout::Size());
+        masm.push(Imm32(descriptor));
+
+    } else if (phase == PRE_INITIALIZE) {
+        masm.store32(Imm32(frameBaseSize), frameSizeAddress);
+        uint32_t descriptor = MakeFrameDescriptor(frameBaseSize + argSize, FrameType::BaselineJS,
+                                                  ExitFrameLayout::Size());
+        masm.push(Imm32(descriptor));
+
+    } else {
+        MOZ_ASSERT(phase == CHECK_OVER_RECURSED);
+        Label afterWrite;
+        Label writePostInitialize;
+
+        // If OVER_RECURSED is set, then frame locals haven't been pushed yet.
+        masm.branchTest32(Assembler::Zero,
+                          frame.addressOfFlags(),
+                          Imm32(BaselineFrame::OVER_RECURSED),
+                          &writePostInitialize);
+
+        masm.move32(Imm32(frameBaseSize), ICTailCallReg);
+        masm.jump(&afterWrite);
+
+        masm.bind(&writePostInitialize);
+        masm.move32(Imm32(frameFullSize), ICTailCallReg);
+
+        masm.bind(&afterWrite);
+        masm.store32(ICTailCallReg, frameSizeAddress);
+        masm.add32(Imm32(argSize), ICTailCallReg);
+        masm.makeFrameDescriptor(ICTailCallReg, FrameType::BaselineJS, ExitFrameLayout::Size());
+        masm.push(ICTailCallReg);
+    }
+    MOZ_ASSERT(fun.expectTailCall == NonTailCall);
+    // Perform the call.
+    masm.call(code);
+    uint32_t callOffset = masm.currentOffset();
+    masm.pop(BaselineFrameReg);
+
+#ifdef DEBUG
+    // Assert the frame does not have an override pc when we're executing JIT code.
+    {
+        Label ok;
+        masm.branchTest32(Assembler::Zero, frame.addressOfFlags(),
+                          Imm32(BaselineFrame::HAS_OVERRIDE_PC), &ok);
+        masm.assumeUnreachable("BaselineFrame shouldn't override pc after VM call");
+        masm.bind(&ok);
+    }
+#endif
+
+    // Add a fake ICEntry (without stubs), so that the return offset to
+    // pc mapping works.
+    return appendICEntry(ICEntry::Kind_CallVM, callOffset);
+}
+
 typedef bool (*CheckOverRecursedWithExtraFn)(JSContext*, BaselineFrame*, uint32_t, uint32_t);
 static const VMFunction CheckOverRecursedWithExtraInfo =
     FunctionInfo<CheckOverRecursedWithExtraFn>(CheckOverRecursedWithExtra,
                                                "CheckOverRecursedWithExtra");
 
 bool
 BaselineCompiler::emitStackCheck(bool earlyCheck)
 {
--- a/js/src/jit/BaselineCompiler.h
+++ b/js/src/jit/BaselineCompiler.h
@@ -2,34 +2,21 @@
  * vim: set ts=8 sts=4 et sw=4 tw=99:
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef jit_BaselineCompiler_h
 #define jit_BaselineCompiler_h
 
+#include "jit/BaselineFrameInfo.h"
+#include "jit/BaselineIC.h"
+#include "jit/BytecodeAnalysis.h"
 #include "jit/FixedList.h"
-#if defined(JS_CODEGEN_X86)
-# include "jit/x86/BaselineCompiler-x86.h"
-#elif defined(JS_CODEGEN_X64)
-# include "jit/x64/BaselineCompiler-x64.h"
-#elif defined(JS_CODEGEN_ARM)
-# include "jit/arm/BaselineCompiler-arm.h"
-#elif defined(JS_CODEGEN_ARM64)
-# include "jit/arm64/BaselineCompiler-arm64.h"
-#elif defined(JS_CODEGEN_MIPS32)
-# include "jit/mips32/BaselineCompiler-mips32.h"
-#elif defined(JS_CODEGEN_MIPS64)
-# include "jit/mips64/BaselineCompiler-mips64.h"
-#elif defined(JS_CODEGEN_NONE)
-# include "jit/none/BaselineCompiler-none.h"
-#else
-# error "Unknown architecture!"
-#endif
+#include "jit/MacroAssembler.h"
 
 namespace js {
 namespace jit {
 
 #define OPCODE_LIST(_)         \
     _(JSOP_NOP)                \
     _(JSOP_NOP_DESTRUCTURING)  \
     _(JSOP_LABEL)              \
@@ -255,21 +242,71 @@ namespace jit {
     _(JSOP_INITHOMEOBJECT)     \
     _(JSOP_BUILTINPROTO)       \
     _(JSOP_OBJWITHPROTO)       \
     _(JSOP_FUNWITHPROTO)       \
     _(JSOP_CLASSCONSTRUCTOR)   \
     _(JSOP_DERIVEDCONSTRUCTOR) \
     _(JSOP_IMPORTMETA)
 
-class BaselineCompiler : public BaselineCompilerSpecific
+class BaselineCompiler final
 {
-    FixedList<Label>            labels_;
-    NonAssertingLabel           return_;
-    NonAssertingLabel           postBarrierSlot_;
+    JSContext* cx;
+    JSScript* script;
+    jsbytecode* pc;
+    StackMacroAssembler masm;
+    bool ionCompileable_;
+    bool compileDebugInstrumentation_;
+
+    TempAllocator& alloc_;
+    BytecodeAnalysis analysis_;
+    FrameInfo frame;
+
+    FallbackICStubSpace stubSpace_;
+    js::Vector<ICEntry, 16, SystemAllocPolicy> icEntries_;
+
+    // Stores the native code offset for a bytecode pc.
+    struct PCMappingEntry
+    {
+        uint32_t pcOffset;
+        uint32_t nativeOffset;
+        PCMappingSlotInfo slotInfo;
+
+        // If set, insert a PCMappingIndexEntry before encoding the
+        // current entry.
+        bool addIndexEntry;
+    };
+
+    js::Vector<PCMappingEntry, 16, SystemAllocPolicy> pcMappingEntries_;
+
+    // Labels for the 'movWithPatch' for loading IC entry pointers in
+    // the generated IC-calling code in the main jitcode.  These need
+    // to be patched with the actual icEntry offsets after the BaselineScript
+    // has been allocated.
+    struct ICLoadLabel {
+        size_t icEntry;
+        CodeOffset label;
+    };
+    js::Vector<ICLoadLabel, 16, SystemAllocPolicy> icLoadLabels_;
+
+    uint32_t pushedBeforeCall_;
+#ifdef DEBUG
+    bool inCall_;
+#endif
+
+    CodeOffset profilerPushToggleOffset_;
+    CodeOffset profilerEnterFrameToggleOffset_;
+    CodeOffset profilerExitFrameToggleOffset_;
+
+    Vector<CodeOffset> traceLoggerToggleOffsets_;
+    CodeOffset traceLoggerScriptTextIdOffset_;
+
+    FixedList<Label> labels_;
+    NonAssertingLabel return_;
+    NonAssertingLabel postBarrierSlot_;
 
     // Native code offset right before the scope chain is initialized.
     CodeOffset prologueOffset_;
 
     // Native code offset right before the frame is popped and the method
     // returned from.
     CodeOffset epilogueOffset_;
 
@@ -296,17 +333,112 @@ class BaselineCompiler : public Baseline
     }
 
   public:
     BaselineCompiler(JSContext* cx, TempAllocator& alloc, JSScript* script);
     MOZ_MUST_USE bool init();
 
     MethodStatus compile();
 
+    void setCompileDebugInstrumentation() {
+        compileDebugInstrumentation_ = true;
+    }
+
   private:
+    ICEntry* allocateICEntry(ICStub* stub, ICEntry::Kind kind) {
+        if (!stub) {
+            return nullptr;
+        }
+
+        // Create the entry and add it to the vector.
+        if (!icEntries_.append(ICEntry(script->pcToOffset(pc), kind))) {
+            ReportOutOfMemory(cx);
+            return nullptr;
+        }
+        ICEntry& vecEntry = icEntries_.back();
+
+        // Set the first stub for the IC entry to the fallback stub
+        vecEntry.setFirstStub(stub);
+
+        // Return pointer to the IC entry
+        return &vecEntry;
+    }
+
+    // Append an ICEntry without a stub.
+    bool appendICEntry(ICEntry::Kind kind, uint32_t returnOffset) {
+        ICEntry entry(script->pcToOffset(pc), kind);
+        entry.setReturnOffset(CodeOffset(returnOffset));
+        if (!icEntries_.append(entry)) {
+            ReportOutOfMemory(cx);
+            return false;
+        }
+        return true;
+    }
+
+    bool addICLoadLabel(CodeOffset label) {
+        MOZ_ASSERT(!icEntries_.empty());
+        ICLoadLabel loadLabel;
+        loadLabel.label = label;
+        loadLabel.icEntry = icEntries_.length() - 1;
+        if (!icLoadLabels_.append(loadLabel)) {
+            ReportOutOfMemory(cx);
+            return false;
+        }
+        return true;
+    }
+
+    JSFunction* function() const {
+        // Not delazifying here is ok as the function is guaranteed to have
+        // been delazified before compilation started.
+        return script->functionNonDelazifying();
+    }
+
+    ModuleObject* module() const {
+        return script->module();
+    }
+
+    PCMappingSlotInfo getStackTopSlotInfo() {
+        MOZ_ASSERT(frame.numUnsyncedSlots() <= 2);
+        switch (frame.numUnsyncedSlots()) {
+          case 0:
+            return PCMappingSlotInfo::MakeSlotInfo();
+          case 1:
+            return PCMappingSlotInfo::MakeSlotInfo(PCMappingSlotInfo::ToSlotLocation(frame.peek(-1)));
+          case 2:
+          default:
+            return PCMappingSlotInfo::MakeSlotInfo(PCMappingSlotInfo::ToSlotLocation(frame.peek(-1)),
+                                                   PCMappingSlotInfo::ToSlotLocation(frame.peek(-2)));
+        }
+    }
+
+    template <typename T>
+    void pushArg(const T& t) {
+        masm.Push(t);
+    }
+    void prepareVMCall();
+
+    enum CallVMPhase {
+        POST_INITIALIZE,
+        PRE_INITIALIZE,
+        CHECK_OVER_RECURSED
+    };
+    bool callVM(const VMFunction& fun, CallVMPhase phase=POST_INITIALIZE);
+
+    bool callVMNonOp(const VMFunction& fun, CallVMPhase phase=POST_INITIALIZE) {
+        if (!callVM(fun, phase)) {
+            return false;
+        }
+        icEntries_.back().setFakeKind(ICEntry::Kind_NonOpCallVM);
+        return true;
+    }
+
+    BytecodeAnalysis& analysis() {
+        return analysis_;
+    }
+
     MethodStatus emitBody();
 
     MOZ_MUST_USE bool emitCheckThis(ValueOperand val, bool reinit=false);
     void emitLoadReturnValue(ValueOperand val);
 
     void emitInitializeLocals();
     MOZ_MUST_USE bool emitPrologue();
     MOZ_MUST_USE bool emitEpilogue();
deleted file mode 100644
--- a/js/src/jit/arm/BaselineCompiler-arm.cpp
+++ /dev/null
@@ -1,15 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
- * vim: set ts=8 sts=4 et sw=4 tw=99:
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include "jit/arm/BaselineCompiler-arm.h"
-
-using namespace js;
-using namespace js::jit;
-
-BaselineCompilerARM::BaselineCompilerARM(JSContext* cx, TempAllocator& alloc, JSScript* script)
-  : BaselineCompilerShared(cx, alloc, script)
-{
-}
deleted file mode 100644
--- a/js/src/jit/arm/BaselineCompiler-arm.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
- * vim: set ts=8 sts=4 et sw=4 tw=99:
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#ifndef jit_arm_BaselineCompiler_arm_h
-#define jit_arm_BaselineCompiler_arm_h
-
-#include "jit/shared/BaselineCompiler-shared.h"
-
-namespace js {
-namespace jit {
-
-class BaselineCompilerARM : public BaselineCompilerShared
-{
-  protected:
-    BaselineCompilerARM(JSContext* cx, TempAllocator& alloc, JSScript* script);
-};
-
-typedef BaselineCompilerARM BaselineCompilerSpecific;
-
-} // namespace jit
-} // namespace js
-
-#endif /* jit_arm_BaselineCompiler_arm_h */
deleted file mode 100644
--- a/js/src/jit/arm64/BaselineCompiler-arm64.h
+++ /dev/null
@@ -1,28 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
- * vim: set ts=8 sts=4 et sw=4 tw=99:
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#ifndef jit_arm64_BaselineCompiler_arm64_h
-#define jit_arm64_BaselineCompiler_arm64_h
-
-#include "jit/shared/BaselineCompiler-shared.h"
-
-namespace js {
-namespace jit {
-
-class BaselineCompilerARM64 : public BaselineCompilerShared
-{
-  protected:
-    BaselineCompilerARM64(JSContext* cx, TempAllocator& alloc, JSScript* script)
-      : BaselineCompilerShared(cx, alloc, script)
-    { }
-};
-
-typedef BaselineCompilerARM64 BaselineCompilerSpecific;
-
-} // namespace jit
-} // namespace js
-
-#endif /* jit_arm64_BaselineCompiler_arm64_h */
deleted file mode 100644
--- a/js/src/jit/mips-shared/BaselineCompiler-mips-shared.cpp
+++ /dev/null
@@ -1,16 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
- * vim: set ts=8 sts=4 et sw=4 tw=99:
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include "jit/mips-shared/BaselineCompiler-mips-shared.h"
-
-using namespace js;
-using namespace js::jit;
-
-BaselineCompilerMIPSShared::BaselineCompilerMIPSShared(JSContext* cx, TempAllocator& alloc,
-                                                       JSScript* script)
-  : BaselineCompilerShared(cx, alloc, script)
-{
-}
deleted file mode 100644
--- a/js/src/jit/mips-shared/BaselineCompiler-mips-shared.h
+++ /dev/null
@@ -1,24 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
- * vim: set ts=8 sts=4 et sw=4 tw=99:
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#ifndef jit_mips_shared_BaselineCompiler_mips_shared_h
-#define jit_mips_shared_BaselineCompiler_mips_shared_h
-
-#include "jit/shared/BaselineCompiler-shared.h"
-
-namespace js {
-namespace jit {
-
-class BaselineCompilerMIPSShared : public BaselineCompilerShared
-{
-  protected:
-    BaselineCompilerMIPSShared(JSContext* cx, TempAllocator& alloc, JSScript* script);
-};
-
-} // namespace jit
-} // namespace js
-
-#endif /* jit_mips_shared_BaselineCompiler_mips_shared_h */
deleted file mode 100644
--- a/js/src/jit/mips32/BaselineCompiler-mips32.cpp
+++ /dev/null
@@ -1,16 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
- * vim: set ts=8 sts=4 et sw=4 tw=99:
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include "jit/mips32/BaselineCompiler-mips32.h"
-
-using namespace js;
-using namespace js::jit;
-
-BaselineCompilerMIPS::BaselineCompilerMIPS(JSContext* cx, TempAllocator& alloc,
-                                           JSScript* script)
-  : BaselineCompilerMIPSShared(cx, alloc, script)
-{
-}
deleted file mode 100644
--- a/js/src/jit/mips32/BaselineCompiler-mips32.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
- * vim: set ts=8 sts=4 et sw=4 tw=99:
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#ifndef jit_mips32_BaselineCompiler_mips32_h
-#define jit_mips32_BaselineCompiler_mips32_h
-
-#include "jit/mips-shared/BaselineCompiler-mips-shared.h"
-
-namespace js {
-namespace jit {
-
-class BaselineCompilerMIPS : public BaselineCompilerMIPSShared
-{
-  protected:
-    BaselineCompilerMIPS(JSContext* cx, TempAllocator& alloc, JSScript* script);
-};
-
-typedef BaselineCompilerMIPS BaselineCompilerSpecific;
-
-} // namespace jit
-} // namespace js
-
-#endif /* jit_mips32_BaselineCompiler_mips32_h */
deleted file mode 100644
--- a/js/src/jit/mips64/BaselineCompiler-mips64.cpp
+++ /dev/null
@@ -1,16 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
- * vim: set ts=8 sts=4 et sw=4 tw=99:
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include "jit/mips64/BaselineCompiler-mips64.h"
-
-using namespace js;
-using namespace js::jit;
-
-BaselineCompilerMIPS64::BaselineCompilerMIPS64(JSContext* cx, TempAllocator& alloc,
-                                               JSScript* script)
-  : BaselineCompilerMIPSShared(cx, alloc, script)
-{
-}
deleted file mode 100644
--- a/js/src/jit/mips64/BaselineCompiler-mips64.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
- * vim: set ts=8 sts=4 et sw=4 tw=99:
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#ifndef jit_mips64_BaselineCompiler_mips64_h
-#define jit_mips64_BaselineCompiler_mips64_h
-
-#include "jit/mips-shared/BaselineCompiler-mips-shared.h"
-
-namespace js {
-namespace jit {
-
-class BaselineCompilerMIPS64 : public BaselineCompilerMIPSShared
-{
-  protected:
-    BaselineCompilerMIPS64(JSContext* cx, TempAllocator& alloc, JSScript* script);
-};
-
-typedef BaselineCompilerMIPS64 BaselineCompilerSpecific;
-
-} // namespace jit
-} // namespace js
-
-#endif /* jit_mips64_BaselineCompiler_mips64_h */
deleted file mode 100644
--- a/js/src/jit/none/BaselineCompiler-none.h
+++ /dev/null
@@ -1,30 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
- * vim: set ts=8 sts=4 et sw=4 tw=99:
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#ifndef jit_none_BaselineCompiler_none_h
-#define jit_none_BaselineCompiler_none_h
-
-#include "jit/shared/BaselineCompiler-shared.h"
-
-namespace js {
-namespace jit {
-
-class BaselineCompilerNone : public BaselineCompilerShared
-{
-  protected:
-    BaselineCompilerNone(JSContext* cx, TempAllocator& alloc, JSScript* script)
-      : BaselineCompilerShared(cx, alloc, script)
-    {
-        MOZ_CRASH();
-    }
-};
-
-typedef BaselineCompilerNone BaselineCompilerSpecific;
-
-} // namespace jit
-} // namespace js
-
-#endif /* jit_none_BaselineCompiler_none_h */
deleted file mode 100644
--- a/js/src/jit/shared/BaselineCompiler-shared.cpp
+++ /dev/null
@@ -1,143 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
- * vim: set ts=8 sts=4 et sw=4 tw=99:
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include "jit/shared/BaselineCompiler-shared.h"
-
-#include "jit/BaselineIC.h"
-#include "jit/VMFunctions.h"
-
-#include "jit/MacroAssembler-inl.h"
-#include "vm/JSScript-inl.h"
-
-using namespace js;
-using namespace js::jit;
-
-BaselineCompilerShared::BaselineCompilerShared(JSContext* cx, TempAllocator& alloc, JSScript* script)
-  : cx(cx),
-    script(script),
-    pc(script->code()),
-    ionCompileable_(jit::IsIonEnabled(cx) && CanIonCompileScript(cx, script)),
-    compileDebugInstrumentation_(script->isDebuggee()),
-    alloc_(alloc),
-    analysis_(alloc, script),
-    frame(script, masm),
-    stubSpace_(),
-    icEntries_(),
-    pcMappingEntries_(),
-    icLoadLabels_(),
-    pushedBeforeCall_(0),
-#ifdef DEBUG
-    inCall_(false),
-#endif
-    profilerPushToggleOffset_(),
-    profilerEnterFrameToggleOffset_(),
-    profilerExitFrameToggleOffset_(),
-    traceLoggerToggleOffsets_(cx),
-    traceLoggerScriptTextIdOffset_()
-{ }
-
-void
-BaselineCompilerShared::prepareVMCall()
-{
-    pushedBeforeCall_ = masm.framePushed();
-#ifdef DEBUG
-    inCall_ = true;
-#endif
-
-    // Ensure everything is synced.
-    frame.syncStack(0);
-
-    // Save the frame pointer.
-    masm.Push(BaselineFrameReg);
-}
-
-bool
-BaselineCompilerShared::callVM(const VMFunction& fun, CallVMPhase phase)
-{
-    TrampolinePtr code = cx->runtime()->jitRuntime()->getVMWrapper(fun);
-
-#ifdef DEBUG
-    // Assert prepareVMCall() has been called.
-    MOZ_ASSERT(inCall_);
-    inCall_ = false;
-
-    // Assert the frame does not have an override pc when we're executing JIT code.
-    {
-        Label ok;
-        masm.branchTest32(Assembler::Zero, frame.addressOfFlags(),
-                          Imm32(BaselineFrame::HAS_OVERRIDE_PC), &ok);
-        masm.assumeUnreachable("BaselineFrame shouldn't override pc when executing JIT code");
-        masm.bind(&ok);
-    }
-#endif
-
-    // Compute argument size. Note that this include the size of the frame pointer
-    // pushed by prepareVMCall.
-    uint32_t argSize = fun.explicitStackSlots() * sizeof(void*) + sizeof(void*);
-
-    // Assert all arguments were pushed.
-    MOZ_ASSERT(masm.framePushed() - pushedBeforeCall_ == argSize);
-
-    Address frameSizeAddress(BaselineFrameReg, BaselineFrame::reverseOffsetOfFrameSize());
-    uint32_t frameVals = frame.nlocals() + frame.stackDepth();
-    uint32_t frameBaseSize = BaselineFrame::FramePointerOffset + BaselineFrame::Size();
-    uint32_t frameFullSize = frameBaseSize + (frameVals * sizeof(Value));
-    if (phase == POST_INITIALIZE) {
-        masm.store32(Imm32(frameFullSize), frameSizeAddress);
-        uint32_t descriptor = MakeFrameDescriptor(frameFullSize + argSize, FrameType::BaselineJS,
-                                                  ExitFrameLayout::Size());
-        masm.push(Imm32(descriptor));
-
-    } else if (phase == PRE_INITIALIZE) {
-        masm.store32(Imm32(frameBaseSize), frameSizeAddress);
-        uint32_t descriptor = MakeFrameDescriptor(frameBaseSize + argSize, FrameType::BaselineJS,
-                                                  ExitFrameLayout::Size());
-        masm.push(Imm32(descriptor));
-
-    } else {
-        MOZ_ASSERT(phase == CHECK_OVER_RECURSED);
-        Label afterWrite;
-        Label writePostInitialize;
-
-        // If OVER_RECURSED is set, then frame locals haven't been pushed yet.
-        masm.branchTest32(Assembler::Zero,
-                          frame.addressOfFlags(),
-                          Imm32(BaselineFrame::OVER_RECURSED),
-                          &writePostInitialize);
-
-        masm.move32(Imm32(frameBaseSize), ICTailCallReg);
-        masm.jump(&afterWrite);
-
-        masm.bind(&writePostInitialize);
-        masm.move32(Imm32(frameFullSize), ICTailCallReg);
-
-        masm.bind(&afterWrite);
-        masm.store32(ICTailCallReg, frameSizeAddress);
-        masm.add32(Imm32(argSize), ICTailCallReg);
-        masm.makeFrameDescriptor(ICTailCallReg, FrameType::BaselineJS, ExitFrameLayout::Size());
-        masm.push(ICTailCallReg);
-    }
-    MOZ_ASSERT(fun.expectTailCall == NonTailCall);
-    // Perform the call.
-    masm.call(code);
-    uint32_t callOffset = masm.currentOffset();
-    masm.pop(BaselineFrameReg);
-
-#ifdef DEBUG
-    // Assert the frame does not have an override pc when we're executing JIT code.
-    {
-        Label ok;
-        masm.branchTest32(Assembler::Zero, frame.addressOfFlags(),
-                          Imm32(BaselineFrame::HAS_OVERRIDE_PC), &ok);
-        masm.assumeUnreachable("BaselineFrame shouldn't override pc after VM call");
-        masm.bind(&ok);
-    }
-#endif
-
-    // Add a fake ICEntry (without stubs), so that the return offset to
-    // pc mapping works.
-    return appendICEntry(ICEntry::Kind_CallVM, callOffset);
-}
deleted file mode 100644
--- a/js/src/jit/shared/BaselineCompiler-shared.h
+++ /dev/null
@@ -1,173 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
- * vim: set ts=8 sts=4 et sw=4 tw=99:
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#ifndef jit_shared_BaselineCompiler_shared_h
-#define jit_shared_BaselineCompiler_shared_h
-
-#include "jit/BaselineFrameInfo.h"
-#include "jit/BaselineIC.h"
-#include "jit/BytecodeAnalysis.h"
-#include "jit/MacroAssembler.h"
-
-namespace js {
-namespace jit {
-
-class BaselineCompilerShared
-{
-  protected:
-    JSContext* cx;
-    JSScript* script;
-    jsbytecode* pc;
-    StackMacroAssembler masm;
-    bool ionCompileable_;
-    bool compileDebugInstrumentation_;
-
-    TempAllocator& alloc_;
-    BytecodeAnalysis analysis_;
-    FrameInfo frame;
-
-    FallbackICStubSpace stubSpace_;
-    js::Vector<ICEntry, 16, SystemAllocPolicy> icEntries_;
-
-    // Stores the native code offset for a bytecode pc.
-    struct PCMappingEntry
-    {
-        uint32_t pcOffset;
-        uint32_t nativeOffset;
-        PCMappingSlotInfo slotInfo;
-
-        // If set, insert a PCMappingIndexEntry before encoding the
-        // current entry.
-        bool addIndexEntry;
-    };
-
-    js::Vector<PCMappingEntry, 16, SystemAllocPolicy> pcMappingEntries_;
-
-    // Labels for the 'movWithPatch' for loading IC entry pointers in
-    // the generated IC-calling code in the main jitcode.  These need
-    // to be patched with the actual icEntry offsets after the BaselineScript
-    // has been allocated.
-    struct ICLoadLabel {
-        size_t icEntry;
-        CodeOffset label;
-    };
-    js::Vector<ICLoadLabel, 16, SystemAllocPolicy> icLoadLabels_;
-
-    uint32_t pushedBeforeCall_;
-#ifdef DEBUG
-    bool inCall_;
-#endif
-
-    CodeOffset profilerPushToggleOffset_;
-    CodeOffset profilerEnterFrameToggleOffset_;
-    CodeOffset profilerExitFrameToggleOffset_;
-
-    Vector<CodeOffset> traceLoggerToggleOffsets_;
-    CodeOffset traceLoggerScriptTextIdOffset_;
-
-    BaselineCompilerShared(JSContext* cx, TempAllocator& alloc, JSScript* script);
-
-    ICEntry* allocateICEntry(ICStub* stub, ICEntry::Kind kind) {
-        if (!stub) {
-            return nullptr;
-        }
-
-        // Create the entry and add it to the vector.
-        if (!icEntries_.append(ICEntry(script->pcToOffset(pc), kind))) {
-            ReportOutOfMemory(cx);
-            return nullptr;
-        }
-        ICEntry& vecEntry = icEntries_.back();
-
-        // Set the first stub for the IC entry to the fallback stub
-        vecEntry.setFirstStub(stub);
-
-        // Return pointer to the IC entry
-        return &vecEntry;
-    }
-
-    // Append an ICEntry without a stub.
-    bool appendICEntry(ICEntry::Kind kind, uint32_t returnOffset) {
-        ICEntry entry(script->pcToOffset(pc), kind);
-        entry.setReturnOffset(CodeOffset(returnOffset));
-        if (!icEntries_.append(entry)) {
-            ReportOutOfMemory(cx);
-            return false;
-        }
-        return true;
-    }
-
-    bool addICLoadLabel(CodeOffset label) {
-        MOZ_ASSERT(!icEntries_.empty());
-        ICLoadLabel loadLabel;
-        loadLabel.label = label;
-        loadLabel.icEntry = icEntries_.length() - 1;
-        if (!icLoadLabels_.append(loadLabel)) {
-            ReportOutOfMemory(cx);
-            return false;
-        }
-        return true;
-    }
-
-    JSFunction* function() const {
-        // Not delazifying here is ok as the function is guaranteed to have
-        // been delazified before compilation started.
-        return script->functionNonDelazifying();
-    }
-
-    ModuleObject* module() const {
-        return script->module();
-    }
-
-    PCMappingSlotInfo getStackTopSlotInfo() {
-        MOZ_ASSERT(frame.numUnsyncedSlots() <= 2);
-        switch (frame.numUnsyncedSlots()) {
-          case 0:
-            return PCMappingSlotInfo::MakeSlotInfo();
-          case 1:
-            return PCMappingSlotInfo::MakeSlotInfo(PCMappingSlotInfo::ToSlotLocation(frame.peek(-1)));
-          case 2:
-          default:
-            return PCMappingSlotInfo::MakeSlotInfo(PCMappingSlotInfo::ToSlotLocation(frame.peek(-1)),
-                                                   PCMappingSlotInfo::ToSlotLocation(frame.peek(-2)));
-        }
-    }
-
-    template <typename T>
-    void pushArg(const T& t) {
-        masm.Push(t);
-    }
-    void prepareVMCall();
-
-    enum CallVMPhase {
-        POST_INITIALIZE,
-        PRE_INITIALIZE,
-        CHECK_OVER_RECURSED
-    };
-    bool callVM(const VMFunction& fun, CallVMPhase phase=POST_INITIALIZE);
-
-    bool callVMNonOp(const VMFunction& fun, CallVMPhase phase=POST_INITIALIZE) {
-        if (!callVM(fun, phase)) {
-            return false;
-        }
-        icEntries_.back().setFakeKind(ICEntry::Kind_NonOpCallVM);
-        return true;
-    }
-
-  public:
-    BytecodeAnalysis& analysis() {
-        return analysis_;
-    }
-
-    void setCompileDebugInstrumentation() {
-        compileDebugInstrumentation_ = true;
-    }
-};
-
-} // namespace jit
-} // namespace js
-
-#endif /* jit_shared_BaselineCompiler_shared_h */
deleted file mode 100644
--- a/js/src/jit/x64/BaselineCompiler-x64.cpp
+++ /dev/null
@@ -1,15 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
- * vim: set ts=8 sts=4 et sw=4 tw=99:
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include "jit/x64/BaselineCompiler-x64.h"
-
-using namespace js;
-using namespace js::jit;
-
-BaselineCompilerX64::BaselineCompilerX64(JSContext* cx, TempAllocator& alloc, JSScript* script)
-  : BaselineCompilerX86Shared(cx, alloc, script)
-{
-}
deleted file mode 100644
--- a/js/src/jit/x64/BaselineCompiler-x64.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
- * vim: set ts=8 sts=4 et sw=4 tw=99:
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#ifndef jit_x64_BaselineCompiler_x64_h
-#define jit_x64_BaselineCompiler_x64_h
-
-#include "jit/x86-shared/BaselineCompiler-x86-shared.h"
-
-namespace js {
-namespace jit {
-
-class BaselineCompilerX64 : public BaselineCompilerX86Shared
-{
-  protected:
-    BaselineCompilerX64(JSContext* cx, TempAllocator& alloc, JSScript* script);
-};
-
-typedef BaselineCompilerX64 BaselineCompilerSpecific;
-
-} // namespace jit
-} // namespace js
-
-#endif /* jit_x64_BaselineCompiler_x64_h */
deleted file mode 100644
--- a/js/src/jit/x86-shared/BaselineCompiler-x86-shared.cpp
+++ /dev/null
@@ -1,15 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
- * vim: set ts=8 sts=4 et sw=4 tw=99:
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include "jit/x86-shared/BaselineCompiler-x86-shared.h"
-
-using namespace js;
-using namespace js::jit;
-
-BaselineCompilerX86Shared::BaselineCompilerX86Shared(JSContext* cx, TempAllocator& alloc, JSScript* script)
-  : BaselineCompilerShared(cx, alloc, script)
-{
-}
deleted file mode 100644
--- a/js/src/jit/x86-shared/BaselineCompiler-x86-shared.h
+++ /dev/null
@@ -1,24 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
- * vim: set ts=8 sts=4 et sw=4 tw=99:
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#ifndef jit_x86_shared_BaselineCompiler_x86_shared_h
-#define jit_x86_shared_BaselineCompiler_x86_shared_h
-
-#include "jit/shared/BaselineCompiler-shared.h"
-
-namespace js {
-namespace jit {
-
-class BaselineCompilerX86Shared : public BaselineCompilerShared
-{
-  protected:
-    BaselineCompilerX86Shared(JSContext* cx, TempAllocator& alloc, JSScript* script);
-};
-
-} // namespace jit
-} // namespace js
-
-#endif /* jit_x86_shared_BaselineCompiler_x86_shared_h */
deleted file mode 100644
--- a/js/src/jit/x86/BaselineCompiler-x86.cpp
+++ /dev/null
@@ -1,15 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
- * vim: set ts=8 sts=4 et sw=4 tw=99:
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include "jit/x86/BaselineCompiler-x86.h"
-
-using namespace js;
-using namespace js::jit;
-
-BaselineCompilerX86::BaselineCompilerX86(JSContext* cx, TempAllocator& alloc, JSScript* script)
-  : BaselineCompilerX86Shared(cx, alloc, script)
-{
-}
deleted file mode 100644
--- a/js/src/jit/x86/BaselineCompiler-x86.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
- * vim: set ts=8 sts=4 et sw=4 tw=99:
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#ifndef jit_x86_BaselineCompiler_x86_h
-#define jit_x86_BaselineCompiler_x86_h
-
-#include "jit/x86-shared/BaselineCompiler-x86-shared.h"
-
-namespace js {
-namespace jit {
-
-class BaselineCompilerX86 : public BaselineCompilerX86Shared
-{
-  protected:
-    BaselineCompilerX86(JSContext* cx, TempAllocator& alloc, JSScript* script);
-};
-
-typedef BaselineCompilerX86 BaselineCompilerSpecific;
-
-} // namespace jit
-} // namespace js
-
-#endif /* jit_x86_BaselineCompiler_x86_h */
--- a/js/src/moz.build
+++ b/js/src/moz.build
@@ -321,17 +321,16 @@ UNIFIED_SOURCES += [
     'jit/ProcessExecutableMemory.cpp',
     'jit/RangeAnalysis.cpp',
     'jit/Recover.cpp',
     'jit/RegisterAllocator.cpp',
     'jit/RematerializedFrame.cpp',
     'jit/Safepoints.cpp',
     'jit/ScalarReplacement.cpp',
     'jit/shared/Assembler-shared.cpp',
-    'jit/shared/BaselineCompiler-shared.cpp',
     'jit/shared/CodeGenerator-shared.cpp',
     'jit/shared/Disassembler-shared.cpp',
     'jit/shared/Lowering-shared.cpp',
     'jit/Sink.cpp',
     'jit/Snapshots.cpp',
     'jit/StupidAllocator.cpp',
     'jit/TypedObjectPrediction.cpp',
     'jit/TypePolicy.cpp',
@@ -508,55 +507,51 @@ if not CONFIG['ENABLE_ION']:
         'jit/none/Trampoline-none.cpp'
     ]
 elif CONFIG['JS_CODEGEN_X86'] or CONFIG['JS_CODEGEN_X64']:
     LOpcodesGenerated.inputs += ['jit/x86-shared/LIR-x86-shared.h']
     UNIFIED_SOURCES += [
         'jit/x86-shared/Architecture-x86-shared.cpp',
         'jit/x86-shared/Assembler-x86-shared.cpp',
         'jit/x86-shared/AssemblerBuffer-x86-shared.cpp',
-        'jit/x86-shared/BaselineCompiler-x86-shared.cpp',
         'jit/x86-shared/CodeGenerator-x86-shared.cpp',
         'jit/x86-shared/Lowering-x86-shared.cpp',
         'jit/x86-shared/MacroAssembler-x86-shared-SIMD.cpp',
         'jit/x86-shared/MacroAssembler-x86-shared.cpp',
         'jit/x86-shared/MoveEmitter-x86-shared.cpp',
     ]
     SOURCES += [
         'jit/x86-shared/Disassembler-x86-shared.cpp',  # using namespace js::jit::X86Encoding;
     ]
     if CONFIG['JS_CODEGEN_X64']:
         LOpcodesGenerated.inputs += ['jit/x64/LIR-x64.h']
         UNIFIED_SOURCES += [
             'jit/x64/Assembler-x64.cpp',
             'jit/x64/Bailouts-x64.cpp',
-            'jit/x64/BaselineCompiler-x64.cpp',
             'jit/x64/CodeGenerator-x64.cpp',
             'jit/x64/Lowering-x64.cpp',
             'jit/x64/MacroAssembler-x64.cpp',
             'jit/x64/Trampoline-x64.cpp',
         ]
     else:
         LOpcodesGenerated.inputs += ['jit/x86/LIR-x86.h']
         UNIFIED_SOURCES += [
             'jit/x86/Assembler-x86.cpp',
             'jit/x86/Bailouts-x86.cpp',
-            'jit/x86/BaselineCompiler-x86.cpp',
             'jit/x86/CodeGenerator-x86.cpp',
             'jit/x86/Lowering-x86.cpp',
             'jit/x86/MacroAssembler-x86.cpp',
             'jit/x86/Trampoline-x86.cpp',
         ]
 elif CONFIG['JS_CODEGEN_ARM']:
     LOpcodesGenerated.inputs += ['jit/arm/LIR-arm.h']
     UNIFIED_SOURCES += [
         'jit/arm/Architecture-arm.cpp',
         'jit/arm/Assembler-arm.cpp',
         'jit/arm/Bailouts-arm.cpp',
-        'jit/arm/BaselineCompiler-arm.cpp',
         'jit/arm/CodeGenerator-arm.cpp',
         'jit/arm/disasm/Constants-arm.cpp',
         'jit/arm/disasm/Disasm-arm.cpp',
         'jit/arm/Lowering-arm.cpp',
         'jit/arm/MacroAssembler-arm.cpp',
         'jit/arm/MoveEmitter-arm.cpp',
         'jit/arm/Trampoline-arm.cpp',
     ]
@@ -600,46 +595,43 @@ elif CONFIG['JS_CODEGEN_ARM64']:
             'jit/arm64/vixl/Simulator-vixl.cpp'
         ]
 elif CONFIG['JS_CODEGEN_MIPS32'] or CONFIG['JS_CODEGEN_MIPS64']:
     LOpcodesGenerated.inputs += ['jit/mips-shared/LIR-mips-shared.h']
     UNIFIED_SOURCES += [
         'jit/mips-shared/Architecture-mips-shared.cpp',
         'jit/mips-shared/Assembler-mips-shared.cpp',
         'jit/mips-shared/Bailouts-mips-shared.cpp',
-        'jit/mips-shared/BaselineCompiler-mips-shared.cpp',
         'jit/mips-shared/CodeGenerator-mips-shared.cpp',
         'jit/mips-shared/Lowering-mips-shared.cpp',
         'jit/mips-shared/MacroAssembler-mips-shared.cpp',
         'jit/mips-shared/MoveEmitter-mips-shared.cpp',
     ]
     if CONFIG['JS_CODEGEN_MIPS32']:
         LOpcodesGenerated.inputs += ['jit/mips32/LIR-mips32.h']
         UNIFIED_SOURCES += [
             'jit/mips32/Architecture-mips32.cpp',
             'jit/mips32/Assembler-mips32.cpp',
             'jit/mips32/Bailouts-mips32.cpp',
-            'jit/mips32/BaselineCompiler-mips32.cpp',
             'jit/mips32/CodeGenerator-mips32.cpp',
             'jit/mips32/Lowering-mips32.cpp',
             'jit/mips32/MacroAssembler-mips32.cpp',
             'jit/mips32/MoveEmitter-mips32.cpp',
             'jit/mips32/Trampoline-mips32.cpp',
         ]
         if CONFIG['JS_SIMULATOR_MIPS32']:
             UNIFIED_SOURCES += [
                 'jit/mips32/Simulator-mips32.cpp'
             ]
     elif CONFIG['JS_CODEGEN_MIPS64']:
         LOpcodesGenerated.inputs += ['jit/mips64/LIR-mips64.h']
         UNIFIED_SOURCES += [
             'jit/mips64/Architecture-mips64.cpp',
             'jit/mips64/Assembler-mips64.cpp',
             'jit/mips64/Bailouts-mips64.cpp',
-            'jit/mips64/BaselineCompiler-mips64.cpp',
             'jit/mips64/CodeGenerator-mips64.cpp',
             'jit/mips64/Lowering-mips64.cpp',
             'jit/mips64/MacroAssembler-mips64.cpp',
             'jit/mips64/MoveEmitter-mips64.cpp',
             'jit/mips64/Trampoline-mips64.cpp',
         ]
         if CONFIG['JS_SIMULATOR_MIPS64']:
             UNIFIED_SOURCES += [