Bug 1428453 - Baldr: prefix current trap mechanism names with 'Old' (r=bbouvier)
authorLuke Wagner <luke@mozilla.com>
Mon, 08 Jan 2018 17:47:34 -0600
changeset 452604 e5e24467641e6d918b069d09771a3e4d96a970ea
parent 452603 02fc8728537344ef9cb38f0c8a91fed6ffde5097
child 452605 cf36ca9dd01399d2f6af52052897263bca1c4c6e
push id1648
push usermtabara@mozilla.com
push dateThu, 01 Mar 2018 12:45:47 +0000
treeherdermozilla-release@cbb9688c2eeb [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbbouvier
bugs1428453
milestone59.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 1428453 - Baldr: prefix current trap mechanism names with 'Old' (r=bbouvier) MozReview-Commit-ID: JeNcXpbKL2s
js/src/jit/CodeGenerator.cpp
js/src/jit/MacroAssembler.cpp
js/src/jit/MacroAssembler.h
js/src/jit/arm/Assembler-arm.cpp
js/src/jit/arm/Assembler-arm.h
js/src/jit/arm/CodeGenerator-arm.cpp
js/src/jit/arm/MacroAssembler-arm.cpp
js/src/jit/arm/MacroAssembler-arm.h
js/src/jit/arm64/Assembler-arm64.h
js/src/jit/arm64/MacroAssembler-arm64.h
js/src/jit/mips-shared/Assembler-mips-shared.cpp
js/src/jit/mips-shared/Assembler-mips-shared.h
js/src/jit/mips-shared/CodeGenerator-mips-shared.cpp
js/src/jit/mips-shared/MacroAssembler-mips-shared.cpp
js/src/jit/mips-shared/MacroAssembler-mips-shared.h
js/src/jit/mips32/CodeGenerator-mips32.cpp
js/src/jit/mips32/MacroAssembler-mips32.cpp
js/src/jit/mips32/MacroAssembler-mips32.h
js/src/jit/mips64/CodeGenerator-mips64.cpp
js/src/jit/mips64/MacroAssembler-mips64.cpp
js/src/jit/mips64/MacroAssembler-mips64.h
js/src/jit/none/MacroAssembler-none.h
js/src/jit/shared/Assembler-shared.h
js/src/jit/shared/CodeGenerator-shared.h
js/src/jit/x64/CodeGenerator-x64.cpp
js/src/jit/x86-shared/Assembler-x86-shared.h
js/src/jit/x86-shared/CodeGenerator-x86-shared.cpp
js/src/jit/x86-shared/MacroAssembler-x86-shared.cpp
js/src/jit/x86-shared/MacroAssembler-x86-shared.h
js/src/jit/x86/CodeGenerator-x86.cpp
js/src/wasm/WasmBaselineCompile.cpp
js/src/wasm/WasmBuiltins.cpp
js/src/wasm/WasmFrameIter.cpp
js/src/wasm/WasmGenerator.cpp
js/src/wasm/WasmGenerator.h
js/src/wasm/WasmStubs.cpp
js/src/wasm/WasmTypes.cpp
js/src/wasm/WasmTypes.h
--- a/js/src/jit/CodeGenerator.cpp
+++ b/js/src/jit/CodeGenerator.cpp
@@ -9473,17 +9473,17 @@ CodeGenerator::generateWasm(wasm::SigIdD
 
     masm.bind(&returnLabel_);
     wasm::GenerateFunctionEpilogue(masm, frameSize(), offsets);
 
     if (!omitOverRecursedCheck()) {
         // Since we just overflowed the stack, to be on the safe side, pop the
         // stack so that, when the trap exit stub executes, it is a safe
         // distance away from the end of the native stack.
-        wasm::TrapDesc trap(trapOffset, wasm::Trap::StackOverflow, /* framePushed = */ 0);
+        wasm::OldTrapDesc trap(trapOffset, wasm::Trap::StackOverflow, /* framePushed = */ 0);
         if (frameSize() > 0) {
             masm.bind(&onOverflow);
             masm.addToStackPtr(Imm32(frameSize()));
             masm.jump(trap);
         } else {
             masm.bindLater(&onOverflow, trap);
         }
     }
@@ -9491,17 +9491,17 @@ CodeGenerator::generateWasm(wasm::SigIdD
 #if defined(JS_ION_PERF)
     // Note the end of the inline code and start of the OOL code.
     gen->perfSpewer().noteEndInlineCode(masm);
 #endif
 
     if (!generateOutOfLineCode())
         return false;
 
-    masm.wasmEmitTrapOutOfLineCode();
+    masm.wasmEmitOldTrapOutOfLineCode();
 
     masm.flush();
     if (masm.oom())
         return false;
 
     offsets->end = masm.currentOffset();
 
     MOZ_ASSERT(!masm.failureLabel()->used());
@@ -12345,40 +12345,40 @@ CodeGenerator::visitInterruptCheck(LInte
 }
 
 void
 CodeGenerator::visitWasmTrap(LWasmTrap* lir)
 {
     MOZ_ASSERT(gen->compilingWasm());
     const MWasmTrap* mir = lir->mir();
 
-    masm.jump(trap(mir, mir->trap()));
+    masm.jump(oldTrap(mir, mir->trap()));
 }
 
 void
 CodeGenerator::visitWasmBoundsCheck(LWasmBoundsCheck* ins)
 {
 #ifdef WASM_HUGE_MEMORY
     MOZ_CRASH("No wasm bounds check for huge memory");
 #else
     const MWasmBoundsCheck* mir = ins->mir();
     Register ptr = ToRegister(ins->ptr());
     Register boundsCheckLimit = ToRegister(ins->boundsCheckLimit());
     masm.wasmBoundsCheck(Assembler::AboveOrEqual, ptr, boundsCheckLimit,
-                         trap(mir, wasm::Trap::OutOfBounds));
+                         oldTrap(mir, wasm::Trap::OutOfBounds));
 #endif
 }
 
 void
 CodeGenerator::visitWasmAlignmentCheck(LWasmAlignmentCheck* ins)
 {
     const MWasmAlignmentCheck* mir = ins->mir();
     Register ptr = ToRegister(ins->ptr());
     masm.branchTest32(Assembler::NonZero, ptr, Imm32(mir->byteSize() - 1),
-                      trap(mir, wasm::Trap::UnalignedAccess));
+                      oldTrap(mir, wasm::Trap::UnalignedAccess));
 }
 
 void
 CodeGenerator::visitWasmLoadTls(LWasmLoadTls* ins)
 {
     switch (ins->mir()->type()) {
       case MIRType::Pointer:
         masm.loadPtr(Address(ToRegister(ins->tlsPtr()), ins->mir()->offset()),
--- a/js/src/jit/MacroAssembler.cpp
+++ b/js/src/jit/MacroAssembler.cpp
@@ -2839,34 +2839,34 @@ MacroAssembler::callWithABINoProfiler(vo
         assumeUnreachable("callWithABI: callee did not use AutoInUnsafeCallWithABI");
         bind(&ok);
         pop(ReturnReg);
     }
 #endif
 }
 
 void
-MacroAssembler::callWithABI(wasm::BytecodeOffset callOffset, wasm::SymbolicAddress imm,
+MacroAssembler::callWithABI(wasm::BytecodeOffset bytecode, wasm::SymbolicAddress imm,
                             MoveOp::Type result)
 {
     MOZ_ASSERT(wasm::NeedsBuiltinThunk(imm));
 
     // We clobber WasmTlsReg below in the loadWasmTlsRegFromFrame(), but Ion
     // assumes it is non-volatile, so preserve it manually.
     Push(WasmTlsReg);
 
     uint32_t stackAdjust;
     callWithABIPre(&stackAdjust, /* callFromWasm = */ true);
 
     // The TLS register is used in builtin thunks and must be set, by ABI:
     // reload it after passing arguments, which might have used it at spill
     // points when placing arguments.
     loadWasmTlsRegFromFrame();
 
-    call(wasm::CallSiteDesc(callOffset.bytecodeOffset, wasm::CallSite::Symbolic), imm);
+    call(wasm::CallSiteDesc(bytecode.offset, wasm::CallSite::Symbolic), imm);
     callWithABIPost(stackAdjust, result, /* callFromWasm = */ true);
 
     Pop(WasmTlsReg);
 }
 
 // ===============================================================
 // Exit frame footer.
 
@@ -3001,25 +3001,25 @@ MacroAssembler::wasmCallIndirect(const w
     }
 
     wasm::BytecodeOffset trapOffset(desc.lineOrBytecode());
 
     // WebAssembly throws if the index is out-of-bounds.
     if (needsBoundsCheck) {
         loadWasmGlobalPtr(callee.tableLengthGlobalDataOffset(), scratch);
 
-        wasm::TrapDesc oobTrap(trapOffset, wasm::Trap::OutOfBounds, framePushed());
+        wasm::OldTrapDesc oobTrap(trapOffset, wasm::Trap::OutOfBounds, framePushed());
         branch32(Assembler::Condition::AboveOrEqual, index, scratch, oobTrap);
     }
 
     // Load the base pointer of the table.
     loadWasmGlobalPtr(callee.tableBaseGlobalDataOffset(), scratch);
 
     // Load the callee from the table.
-    wasm::TrapDesc nullTrap(trapOffset, wasm::Trap::IndirectCallToNull, framePushed());
+    wasm::OldTrapDesc nullTrap(trapOffset, wasm::Trap::IndirectCallToNull, framePushed());
     if (callee.wasmTableIsExternal()) {
         static_assert(sizeof(wasm::ExternalTableElem) == 8 || sizeof(wasm::ExternalTableElem) == 16,
                       "elements of external tables are two words");
         if (sizeof(wasm::ExternalTableElem) == 8) {
             computeEffectiveAddress(BaseIndex(scratch, index, TimesEight), scratch);
         } else {
             lshift32(Imm32(4), index);
             addPtr(index, scratch);
@@ -3035,31 +3035,31 @@ MacroAssembler::wasmCallIndirect(const w
         loadPtr(BaseIndex(scratch, index, ScalePointer), scratch);
         branchTest32(Assembler::Zero, scratch, scratch, nullTrap);
     }
 
     call(desc, scratch);
 }
 
 void
-MacroAssembler::wasmEmitTrapOutOfLineCode()
+MacroAssembler::wasmEmitOldTrapOutOfLineCode()
 {
-    for (const wasm::TrapSite& site : trapSites()) {
+    for (const wasm::OldTrapSite& site : oldTrapSites()) {
         // Trap out-of-line codes are created for two kinds of trap sites:
         //  - jumps, which are bound directly to the trap out-of-line path
         //  - memory accesses, which can fault and then have control transferred
         //    to the out-of-line path directly via signal handler setting pc
         switch (site.kind) {
-          case wasm::TrapSite::Jump: {
+          case wasm::OldTrapSite::Jump: {
             RepatchLabel jump;
             jump.use(site.codeOffset);
             bind(&jump);
             break;
           }
-          case wasm::TrapSite::MemoryAccess: {
+          case wasm::OldTrapSite::MemoryAccess: {
             append(wasm::MemoryAccess(site.codeOffset, currentOffset()));
             break;
           }
         }
 
         if (site.trap == wasm::Trap::IndirectCallBadSig) {
             // The indirect call bad-signature trap is a special case for two
             // reasons:
@@ -3067,17 +3067,17 @@ MacroAssembler::wasmEmitTrapOutOfLineCod
             //    prologue, before the stack frame has been set up which messes
             //    up everything (stack depth computations, unwinding)
             //  - the check happens in the callee while the trap should be
             //    reported at the caller's call_indirect
             // To solve both problems at once, the out-of-line path (far) jumps
             // directly to the trap exit stub. This takes advantage of the fact
             // that there is already a CallSite for call_indirect and the
             // current pre-prologue stack/register state.
-            append(wasm::TrapFarJump(site.trap, farJumpWithPatch()));
+            append(wasm::OldTrapFarJump(site.trap, farJumpWithPatch()));
         } else {
             // Inherit the frame depth of the trap site. This value is captured
             // by the wasm::CallSite to allow unwinding this frame.
             setFramePushed(site.framePushed);
 
             // Align the stack for a nullary call.
             size_t alreadyPushed = sizeof(wasm::Frame) + framePushed();
             size_t toPush = ABIArgGenerator().stackBytesConsumedSoFar();
@@ -3093,32 +3093,32 @@ MacroAssembler::wasmEmitTrapOutOfLineCod
             // the shared FarJumpIsland generated by patchCallSites.
 
             // Call the trap's exit, using the bytecode offset of the trap site.
             // Note that this code is inside the same CodeRange::Function as the
             // trap site so it's as if the trapping instruction called the
             // trap-handling function. The frame iterator knows to skip the trap
             // exit's frame so that unwinding begins at the frame and offset of
             // the trapping instruction.
-            wasm::CallSiteDesc desc(site.bytecodeOffset, wasm::CallSiteDesc::TrapExit);
+            wasm::CallSiteDesc desc(site.offset, wasm::CallSiteDesc::OldTrapExit);
             call(desc, site.trap);
         }
 
 #ifdef DEBUG
         // Traps do not return, so no need to freeStack().
         breakpoint();
 #endif
     }
 
     // Ensure that the return address of the last emitted call above is always
     // within this function's CodeRange which is necessary for the stack
     // iterator to find the right CodeRange while walking the stack.
     breakpoint();
 
-    trapSites().clear();
+    oldTrapSites().clear();
 }
 
 void
 MacroAssembler::wasmEmitStackCheck(Register sp, Register scratch, Label* onOverflow)
 {
     loadPtr(Address(WasmTlsReg, offsetof(wasm::TlsData, addressOfContext)), scratch);
     loadPtr(Address(scratch, 0), scratch);
     branchPtr(Assembler::AboveOrEqual,
--- a/js/src/jit/MacroAssembler.h
+++ b/js/src/jit/MacroAssembler.h
@@ -1501,17 +1501,17 @@ class MacroAssembler : public MacroAssem
     // as the implicit first argument. It preserves TLS and pinned registers.
     // (TLS & pinned regs are non-volatile registers in the system ABI).
     void wasmCallBuiltinInstanceMethod(const wasm::CallSiteDesc& desc, const ABIArg& instanceArg,
                                        wasm::SymbolicAddress builtin);
 
     // Emit the out-of-line trap code to which trapping jumps/branches are
     // bound. This should be called once per function after all other codegen,
     // including "normal" OutOfLineCode.
-    void wasmEmitTrapOutOfLineCode();
+    void wasmEmitOldTrapOutOfLineCode();
 
     // Perform a stack-overflow test, branching to the given Label on overflow.
     void wasmEmitStackCheck(Register sp, Register scratch, Label* onOverflow);
 
     void emitPreBarrierFastPath(JSRuntime* rt, MIRType type, Register temp1, Register temp2,
                                 Register temp3, Label* noBarrier);
 
   public:
--- a/js/src/jit/arm/Assembler-arm.cpp
+++ b/js/src/jit/arm/Assembler-arm.cpp
@@ -2448,17 +2448,17 @@ Assembler::as_b(Label* l, Condition c)
     if (oom())
         return BufferOffset();
 
     l->use(ret.getOffset());
     return ret;
 }
 
 BufferOffset
-Assembler::as_b(wasm::TrapDesc target, Condition c)
+Assembler::as_b(wasm::OldTrapDesc target, Condition c)
 {
     Label l;
     BufferOffset ret = as_b(&l, c);
     bindLater(&l, target);
     return ret;
 }
 
 BufferOffset
@@ -2889,22 +2889,22 @@ Assembler::bind(Label* label, BufferOffs
             b = next;
         } while (more);
     }
     label->bind(nextOffset().getOffset());
     MOZ_ASSERT(!oom());
 }
 
 void
-Assembler::bindLater(Label* label, wasm::TrapDesc target)
+Assembler::bindLater(Label* label, wasm::OldTrapDesc target)
 {
     if (label->used()) {
         BufferOffset b(label);
         do {
-            append(wasm::TrapSite(target, b.getOffset()));
+            append(wasm::OldTrapSite(target, b.getOffset()));
         } while (nextLink(b, &b));
     }
     label->reset();
 }
 
 void
 Assembler::bind(RepatchLabel* label)
 {
--- a/js/src/jit/arm/Assembler-arm.h
+++ b/js/src/jit/arm/Assembler-arm.h
@@ -1609,17 +1609,17 @@ class Assembler : public AssemblerShared
     // bx can *only* branch to a register never to an immediate.
     BufferOffset as_bx(Register r, Condition c = Always);
 
     // Branch can branch to an immediate *or* to a register. Branches to
     // immediates are pc relative, branches to registers are absolute.
     BufferOffset as_b(BOffImm off, Condition c, Label* documentation = nullptr);
 
     BufferOffset as_b(Label* l, Condition c = Always);
-    BufferOffset as_b(wasm::TrapDesc target, Condition c = Always);
+    BufferOffset as_b(wasm::OldTrapDesc target, Condition c = Always);
     BufferOffset as_b(BOffImm off, Condition c, BufferOffset inst);
 
     // blx can go to either an immediate or a register. When blx'ing to a
     // register, we change processor mode depending on the low bit of the
     // register when blx'ing to an immediate, we *always* change processor
     // state.
     BufferOffset as_blx(Label* l);
 
@@ -1717,17 +1717,17 @@ class Assembler : public AssemblerShared
 
     BufferOffset as_vmrs(Register r, Condition c = Always);
     BufferOffset as_vmsr(Register r, Condition c = Always);
 
     // Label operations.
     bool nextLink(BufferOffset b, BufferOffset* next);
     void bind(Label* label, BufferOffset boff = BufferOffset());
     void bind(RepatchLabel* label);
-    void bindLater(Label* label, wasm::TrapDesc target);
+    void bindLater(Label* label, wasm::OldTrapDesc target);
     uint32_t currentOffset() {
         return nextOffset().getOffset();
     }
     void retarget(Label* label, Label* target);
     // I'm going to pretend this doesn't exist for now.
     void retarget(Label* label, void* target, Relocation::Kind reloc);
 
     static void Bind(uint8_t* rawCode, CodeOffset label, CodeOffset target);
--- a/js/src/jit/arm/CodeGenerator-arm.cpp
+++ b/js/src/jit/arm/CodeGenerator-arm.cpp
@@ -526,17 +526,17 @@ CodeGeneratorARM::divICommon(MDiv* mir, 
         // The integer division will give INT32_MIN, but we want -(double)INT32_MIN.
 
         // Sets EQ if lhs == INT32_MIN.
         masm.ma_cmp(lhs, Imm32(INT32_MIN), scratch);
         // If EQ (LHS == INT32_MIN), sets EQ if rhs == -1.
         masm.ma_cmp(rhs, Imm32(-1), scratch, Assembler::Equal);
         if (mir->canTruncateOverflow()) {
             if (mir->trapOnError()) {
-                masm.ma_b(trap(mir, wasm::Trap::IntegerOverflow), Assembler::Equal);
+                masm.ma_b(oldTrap(mir, wasm::Trap::IntegerOverflow), Assembler::Equal);
             } else {
                 // (-INT32_MIN)|0 = INT32_MIN
                 Label skip;
                 masm.ma_b(&skip, Assembler::NotEqual);
                 masm.ma_mov(Imm32(INT32_MIN), output);
                 masm.ma_b(&done);
                 masm.bind(&skip);
             }
@@ -546,17 +546,17 @@ CodeGeneratorARM::divICommon(MDiv* mir, 
         }
     }
 
     // Handle divide by zero.
     if (mir->canBeDivideByZero()) {
         masm.as_cmp(rhs, Imm8(0));
         if (mir->canTruncateInfinities()) {
             if (mir->trapOnError()) {
-                masm.ma_b(trap(mir, wasm::Trap::IntegerDivideByZero), Assembler::Equal);
+                masm.ma_b(oldTrap(mir, wasm::Trap::IntegerDivideByZero), Assembler::Equal);
             } else {
                 // Infinity|0 == 0
                 Label skip;
                 masm.ma_b(&skip, Assembler::NotEqual);
                 masm.ma_mov(Imm32(0), output);
                 masm.ma_b(&done);
                 masm.bind(&skip);
             }
@@ -709,17 +709,17 @@ CodeGeneratorARM::modICommon(MMod* mir, 
     // because the EQ flag is set.
     // If (Y > 0), we don't set EQ, and we don't trigger LT, so we don't take
     // the bailout.
     if (mir->canBeDivideByZero() || mir->canBeNegativeDividend()) {
         if (mir->trapOnError()) {
             // wasm allows negative lhs and return 0 in this case.
             MOZ_ASSERT(mir->isTruncated());
             masm.as_cmp(rhs, Imm8(0));
-            masm.ma_b(trap(mir, wasm::Trap::IntegerDivideByZero), Assembler::Equal);
+            masm.ma_b(oldTrap(mir, wasm::Trap::IntegerDivideByZero), Assembler::Equal);
             return;
         }
 
         masm.as_cmp(rhs, Imm8(0));
         masm.as_cmp(lhs, Imm8(0), Assembler::LessThan);
         if (mir->isTruncated()) {
             // NaN|0 == 0 and (0 % -X)|0 == 0
             Label skip;
@@ -2115,17 +2115,17 @@ CodeGeneratorARM::visitWasmAddOffset(LWa
 {
     MWasmAddOffset* mir = lir->mir();
     Register base = ToRegister(lir->base());
     Register out = ToRegister(lir->output());
 
     ScratchRegisterScope scratch(masm);
     masm.ma_add(base, Imm32(mir->offset()), out, scratch, SetCC);
 
-    masm.ma_b(trap(mir, wasm::Trap::OutOfBounds), Assembler::CarrySet);
+    masm.ma_b(oldTrap(mir, wasm::Trap::OutOfBounds), Assembler::CarrySet);
 }
 
 template <typename T>
 void
 CodeGeneratorARM::emitWasmStore(T* lir)
 {
     const MWasmStore* mir = lir->mir();
     Scalar::Type accessType = mir->access().type();
@@ -2412,17 +2412,17 @@ CodeGeneratorARM::generateUDivModZeroChe
                                            LSnapshot* snapshot, T* mir)
 {
     if (!mir)
         return;
     if (mir->canBeDivideByZero()) {
         masm.as_cmp(rhs, Imm8(0));
         if (mir->isTruncated()) {
             if (mir->trapOnError()) {
-                masm.ma_b(trap(mir, wasm::Trap::IntegerDivideByZero), Assembler::Equal);
+                masm.ma_b(oldTrap(mir, wasm::Trap::IntegerDivideByZero), Assembler::Equal);
             } else {
                 Label skip;
                 masm.ma_b(&skip, Assembler::NotEqual);
                 // Infinity|0 == 0
                 masm.ma_mov(Imm32(0), output);
                 masm.ma_b(done);
                 masm.bind(&skip);
             }
@@ -2763,30 +2763,30 @@ CodeGeneratorARM::visitDivOrModI64(LDivO
     MOZ_ASSERT(output == ReturnReg64);
 
     Label done;
 
     // Handle divide by zero.
     if (lir->canBeDivideByZero()) {
         Register temp = WasmGetTemporaryForDivOrMod(lhs, rhs);
         masm.branchTest64(Assembler::Zero, rhs, rhs, temp,
-                          trap(lir, wasm::Trap::IntegerDivideByZero));
+                          oldTrap(lir, wasm::Trap::IntegerDivideByZero));
     }
 
     auto* mir = lir->mir();
 
     // Handle an integer overflow exception from INT64_MIN / -1.
     if (lir->canBeNegativeOverflow()) {
         Label notmin;
         masm.branch64(Assembler::NotEqual, lhs, Imm64(INT64_MIN), &notmin);
         masm.branch64(Assembler::NotEqual, rhs, Imm64(-1), &notmin);
         if (mir->isMod())
             masm.xor64(output, output);
         else
-            masm.jump(trap(lir, wasm::Trap::IntegerOverflow));
+            masm.jump(oldTrap(lir, wasm::Trap::IntegerOverflow));
         masm.jump(&done);
         masm.bind(&notmin);
     }
 
     masm.setupWasmABICall();
     masm.passABIArg(lhs.high);
     masm.passABIArg(lhs.low);
     masm.passABIArg(rhs.high);
@@ -2809,17 +2809,17 @@ CodeGeneratorARM::visitUDivOrModI64(LUDi
     Register64 rhs = ToRegister64(lir->getInt64Operand(LDivOrModI64::Rhs));
 
     MOZ_ASSERT(ToOutRegister64(lir) == ReturnReg64);
 
     // Prevent divide by zero.
     if (lir->canBeDivideByZero()) {
         Register temp = WasmGetTemporaryForDivOrMod(lhs, rhs);
         masm.branchTest64(Assembler::Zero, rhs, rhs, temp,
-                          trap(lir, wasm::Trap::IntegerDivideByZero));
+                          oldTrap(lir, wasm::Trap::IntegerDivideByZero));
     }
 
     masm.setupWasmABICall();
     masm.passABIArg(lhs.high);
     masm.passABIArg(lhs.low);
     masm.passABIArg(rhs.high);
     masm.passABIArg(rhs.low);
 
--- a/js/src/jit/arm/MacroAssembler-arm.cpp
+++ b/js/src/jit/arm/MacroAssembler-arm.cpp
@@ -1385,17 +1385,17 @@ MacroAssemblerARM::ma_dsb(BarrierOption 
 // Branches when done from within arm-specific code.
 BufferOffset
 MacroAssemblerARM::ma_b(Label* dest, Assembler::Condition c)
 {
     return as_b(dest, c);
 }
 
 BufferOffset
-MacroAssemblerARM::ma_b(wasm::TrapDesc target, Assembler::Condition c)
+MacroAssemblerARM::ma_b(wasm::OldTrapDesc target, Assembler::Condition c)
 {
     return as_b(target, c);
 }
 
 void
 MacroAssemblerARM::ma_bx(Register dest, Assembler::Condition c)
 {
     as_bx(dest, c);
@@ -5746,22 +5746,22 @@ MacroAssemblerARM::outOfLineWasmTruncate
         asMasm().branchFloat(maxCond, input, scratch, &fail);
     }
 
     // We had an actual correct value, get back to where we were.
     ma_b(rejoin);
 
     // Handle errors.
     bind(&fail);
-    asMasm().jump(wasm::TrapDesc(trapOffset, wasm::Trap::IntegerOverflow,
-                                 asMasm().framePushed()));
+    asMasm().jump(wasm::OldTrapDesc(trapOffset, wasm::Trap::IntegerOverflow,
+                                    asMasm().framePushed()));
 
     bind(&inputIsNaN);
-    asMasm().jump(wasm::TrapDesc(trapOffset, wasm::Trap::InvalidConversionToInteger,
-                                 asMasm().framePushed()));
+    asMasm().jump(wasm::OldTrapDesc(trapOffset, wasm::Trap::InvalidConversionToInteger,
+                                    asMasm().framePushed()));
 }
 
 void
 MacroAssemblerARM::wasmLoadImpl(const wasm::MemoryAccessDesc& access, Register memoryBase,
                                 Register ptr, Register ptrScratch, AnyRegister output,
                                 Register64 out64)
 {
     MOZ_ASSERT(ptr == ptrScratch);
--- a/js/src/jit/arm/MacroAssembler-arm.h
+++ b/js/src/jit/arm/MacroAssembler-arm.h
@@ -341,17 +341,17 @@ class MacroAssemblerARM : public Assembl
     void ma_vpush(VFPRegister r);
 
     // Barriers.
     void ma_dmb(BarrierOption option=BarrierSY);
     void ma_dsb(BarrierOption option=BarrierSY);
 
     // Branches when done from within arm-specific code.
     BufferOffset ma_b(Label* dest, Condition c = Always);
-    BufferOffset ma_b(wasm::TrapDesc target, Condition c = Always);
+    BufferOffset ma_b(wasm::OldTrapDesc target, Condition c = Always);
     void ma_b(void* target, Condition c = Always);
     void ma_bx(Register dest, Condition c = Always);
 
     // This is almost NEVER necessary, we'll basically never be calling a label
     // except, possibly in the crazy bailout-table case.
     void ma_bl(Label* dest, Condition c = Always);
 
     void ma_blx(Register dest, Condition c = Always);
@@ -672,17 +672,17 @@ class MacroAssemblerARMCompat : public M
         ma_bx(reg);
     }
     void jump(const Address& addr) {
         ScratchRegisterScope scratch(asMasm());
         SecondScratchRegisterScope scratch2(asMasm());
         ma_ldr(addr, scratch, scratch2);
         ma_bx(scratch);
     }
-    void jump(wasm::TrapDesc target) {
+    void jump(wasm::OldTrapDesc target) {
         as_b(target);
     }
 
     void negl(Register reg) {
         ma_neg(reg, reg, SetCC);
     }
     void test32(Register lhs, Register rhs) {
         ma_tst(lhs, rhs);
--- a/js/src/jit/arm64/Assembler-arm64.h
+++ b/js/src/jit/arm64/Assembler-arm64.h
@@ -210,17 +210,17 @@ class Assembler : public vixl::Assembler
     BufferOffset immPool64Branch(RepatchLabel* label, ARMBuffer::PoolEntry* pe, vixl::Condition c);
     BufferOffset fImmPool(ARMFPRegister dest, uint8_t* value, vixl::LoadLiteralOp op);
     BufferOffset fImmPool64(ARMFPRegister dest, double value);
     BufferOffset fImmPool32(ARMFPRegister dest, float value);
 
     void bind(Label* label) { bind(label, nextOffset()); }
     void bind(Label* label, BufferOffset boff);
     void bind(RepatchLabel* label);
-    void bindLater(Label* label, wasm::TrapDesc target) {
+    void bindLater(Label* label, wasm::OldTrapDesc target) {
         MOZ_CRASH("NYI");
     }
 
     bool oom() const {
         return AssemblerShared::oom() ||
             armbuffer_.oom() ||
             jumpRelocations_.oom() ||
             dataRelocations_.oom();
--- a/js/src/jit/arm64/MacroAssembler-arm64.h
+++ b/js/src/jit/arm64/MacroAssembler-arm64.h
@@ -488,20 +488,20 @@ class MacroAssemblerCompat : public vixl
     void convertFloat32ToDouble(FloatRegister src, FloatRegister dest) {
         Fcvt(ARMFPRegister(dest, 64), ARMFPRegister(src, 32));
     }
     void convertDoubleToFloat32(FloatRegister src, FloatRegister dest) {
         Fcvt(ARMFPRegister(dest, 32), ARMFPRegister(src, 64));
     }
 
     using vixl::MacroAssembler::B;
-    void B(wasm::TrapDesc) {
+    void B(wasm::OldTrapDesc) {
         MOZ_CRASH("NYI");
     }
-    void B(wasm::TrapDesc, Condition cond) {
+    void B(wasm::OldTrapDesc, Condition cond) {
         MOZ_CRASH("NYI");
     }
 
     void convertDoubleToInt32(FloatRegister src, Register dest, Label* fail,
                               bool negativeZeroCheck = true)
     {
         vixl::UseScratchRegisterScope temps(this);
         const ARMFPRegister scratch64 = temps.AcquireD();
@@ -668,17 +668,17 @@ class MacroAssemblerCompat : public vixl
     }
     void jump(Register reg) {
         Br(ARMRegister(reg, 64));
     }
     void jump(const Address& addr) {
         loadPtr(addr, ip0);
         Br(vixl::ip0);
     }
-    void jump(wasm::TrapDesc target) {
+    void jump(wasm::OldTrapDesc target) {
         MOZ_CRASH("NYI");
     }
 
     void align(int alignment) {
         armbuffer_.align(alignment);
     }
 
     void haltingAlign(int alignment) {
--- a/js/src/jit/mips-shared/Assembler-mips-shared.cpp
+++ b/js/src/jit/mips-shared/Assembler-mips-shared.cpp
@@ -1804,26 +1804,26 @@ AssemblerMIPSShared::bind(Label* label, 
 
             b = BufferOffset(next);
         } while (next != LabelBase::INVALID_OFFSET);
     }
     label->bind(dest.getOffset());
 }
 
 void
-AssemblerMIPSShared::bindLater(Label* label, wasm::TrapDesc target)
+AssemblerMIPSShared::bindLater(Label* label, wasm::OldTrapDesc target)
 {
     if (label->used()) {
         int32_t next;
 
         BufferOffset b(label);
         do {
             Instruction* inst = editSrc(b);
 
-            append(wasm::TrapSite(target, b.getOffset()));
+            append(wasm::OldTrapSite(target, b.getOffset()));
             next = inst[1].encode();
             inst[1].makeNop();
 
             b = BufferOffset(next);
         } while (next != LabelBase::INVALID_OFFSET);
     }
     label->reset();
 }
--- a/js/src/jit/mips-shared/Assembler-mips-shared.h
+++ b/js/src/jit/mips-shared/Assembler-mips-shared.h
@@ -1226,17 +1226,17 @@ class AssemblerMIPSShared : public Assem
                          FPConditionBit fcc = FCC0);
     BufferOffset as_movf(FloatFormat fmt, FloatRegister fd, FloatRegister fs,
                          FPConditionBit fcc = FCC0);
     BufferOffset as_movz(FloatFormat fmt, FloatRegister fd, FloatRegister fs, Register rt);
     BufferOffset as_movn(FloatFormat fmt, FloatRegister fd, FloatRegister fs, Register rt);
 
     // label operations
     void bind(Label* label, BufferOffset boff = BufferOffset());
-    void bindLater(Label* label, wasm::TrapDesc target);
+    void bindLater(Label* label, wasm::OldTrapDesc target);
     virtual void bind(InstImm* inst, uintptr_t branch, uintptr_t target) = 0;
     void bind(CodeOffset* label) {
         label->bind(currentOffset());
     }
     void use(CodeOffset* label) {
         label->bind(currentOffset());
     }
     uint32_t currentOffset() {
--- a/js/src/jit/mips-shared/CodeGenerator-mips-shared.cpp
+++ b/js/src/jit/mips-shared/CodeGenerator-mips-shared.cpp
@@ -563,17 +563,17 @@ CodeGeneratorMIPSShared::visitDivI(LDivI
     Register temp = ToRegister(ins->getTemp(0));
     MDiv* mir = ins->mir();
 
     Label done;
 
     // Handle divide by zero.
     if (mir->canBeDivideByZero()) {
         if (mir->trapOnError()) {
-            masm.ma_b(rhs, rhs, trap(mir, wasm::Trap::IntegerDivideByZero), Assembler::Zero);
+            masm.ma_b(rhs, rhs, oldTrap(mir, wasm::Trap::IntegerDivideByZero), Assembler::Zero);
         } else if (mir->canTruncateInfinities()) {
             // Truncated division by zero is zero (Infinity|0 == 0)
             Label notzero;
             masm.ma_b(rhs, rhs, &notzero, Assembler::NonZero, ShortJump);
             masm.move32(Imm32(0), dest);
             masm.ma_b(&done, ShortJump);
             masm.bind(&notzero);
         } else {
@@ -585,17 +585,17 @@ CodeGeneratorMIPSShared::visitDivI(LDivI
     // Handle an integer overflow exception from -2147483648 / -1.
     if (mir->canBeNegativeOverflow()) {
         Label notMinInt;
         masm.move32(Imm32(INT32_MIN), temp);
         masm.ma_b(lhs, temp, &notMinInt, Assembler::NotEqual, ShortJump);
 
         masm.move32(Imm32(-1), temp);
         if (mir->trapOnError()) {
-            masm.ma_b(rhs, temp, trap(mir, wasm::Trap::IntegerOverflow), Assembler::Equal);
+            masm.ma_b(rhs, temp, oldTrap(mir, wasm::Trap::IntegerOverflow), Assembler::Equal);
         } else if (mir->canTruncateOverflow()) {
             // (-INT32_MIN)|0 == INT32_MIN
             Label skip;
             masm.ma_b(rhs, temp, &skip, Assembler::NotEqual, ShortJump);
             masm.move32(Imm32(INT32_MIN), dest);
             masm.ma_b(&done, ShortJump);
             masm.bind(&skip);
         } else {
@@ -713,17 +713,17 @@ CodeGeneratorMIPSShared::visitModI(LModI
     // There are three cases: (Y < 0), (Y == 0) and (Y > 0)
     // If (Y < 0), then we compare X with 0, and bail if X == 0
     // If (Y == 0), then we simply want to bail.
     // if (Y > 0), we don't bail.
 
     if (mir->canBeDivideByZero()) {
         if (mir->isTruncated()) {
             if (mir->trapOnError()) {
-                masm.ma_b(rhs, rhs, trap(mir, wasm::Trap::IntegerDivideByZero), Assembler::Zero);
+                masm.ma_b(rhs, rhs, oldTrap(mir, wasm::Trap::IntegerDivideByZero), Assembler::Zero);
             } else {
                 Label skip;
                 masm.ma_b(rhs, Imm32(0), &skip, Assembler::NotEqual, ShortJump);
                 masm.move32(Imm32(0), dest);
                 masm.ma_b(&done, ShortJump);
                 masm.bind(&skip);
             }
         } else {
@@ -1554,20 +1554,20 @@ CodeGeneratorMIPSShared::visitOutOfLineW
         masm.loadConstantFloat32(float(maxValue), ScratchFloat32Reg);
         masm.branchFloat(maxCond, input, ScratchFloat32Reg, &fail);
     }
 
     masm.jump(ool->rejoin());
 
     // Handle errors.
     masm.bind(&fail);
-    masm.jump(trap(ool, wasm::Trap::IntegerOverflow));
+    masm.jump(oldTrap(ool, wasm::Trap::IntegerOverflow));
 
     masm.bind(&inputIsNaN);
-    masm.jump(trap(ool, wasm::Trap::InvalidConversionToInteger));
+    masm.jump(oldTrap(ool, wasm::Trap::InvalidConversionToInteger));
 }
 
 void
 CodeGeneratorMIPSShared::visitCopySignF(LCopySignF* ins)
 {
     FloatRegister lhs = ToFloatRegister(ins->getOperand(0));
     FloatRegister rhs = ToFloatRegister(ins->getOperand(1));
     FloatRegister output = ToFloatRegister(ins->getDef(0));
@@ -2410,17 +2410,17 @@ CodeGeneratorMIPSShared::visitUDivOrMod(
     Register rhs = ToRegister(ins->rhs());
     Register output = ToRegister(ins->output());
     Label done;
 
     // Prevent divide by zero.
     if (ins->canBeDivideByZero()) {
         if (ins->mir()->isTruncated()) {
             if (ins->trapOnError()) {
-                masm.ma_b(rhs, rhs, trap(ins, wasm::Trap::IntegerDivideByZero), Assembler::Zero);
+                masm.ma_b(rhs, rhs, oldTrap(ins, wasm::Trap::IntegerDivideByZero), Assembler::Zero);
             } else {
                 // Infinity|0 == 0
                 Label notzero;
                 masm.ma_b(rhs, rhs, &notzero, Assembler::NonZero, ShortJump);
                 masm.move32(Imm32(0), output);
                 masm.ma_b(&done, ShortJump);
                 masm.bind(&notzero);
             }
@@ -2762,17 +2762,17 @@ CodeGeneratorMIPSShared::atomicBinopToTy
 
 void
 CodeGeneratorMIPSShared::visitWasmAddOffset(LWasmAddOffset* lir)
 {
     MWasmAddOffset* mir = lir->mir();
     Register base = ToRegister(lir->base());
     Register out = ToRegister(lir->output());
 
-    masm.ma_addTestCarry(out, base, Imm32(mir->offset()), trap(mir, wasm::Trap::OutOfBounds));
+    masm.ma_addTestCarry(out, base, Imm32(mir->offset()), oldTrap(mir, wasm::Trap::OutOfBounds));
 }
 
 template <typename T>
 static inline void
 AtomicBinopToTypedArray(CodeGeneratorMIPSShared* cg, AtomicOp op,
                         Scalar::Type arrayType, const LAllocation* value, const T& mem,
                         Register flagTemp, Register outTemp, Register valueTemp,
                         Register offsetTemp, Register maskTemp, AnyRegister output)
--- a/js/src/jit/mips-shared/MacroAssembler-mips-shared.cpp
+++ b/js/src/jit/mips-shared/MacroAssembler-mips-shared.cpp
@@ -332,33 +332,33 @@ MacroAssemblerMIPSShared::ma_addTestCarr
     as_sltu(SecondScratchReg, rd, rs);
     ma_b(SecondScratchReg, SecondScratchReg, overflow, Assembler::NonZero);
 }
 
 template void
 MacroAssemblerMIPSShared::ma_addTestCarry<Label*>(Register rd, Register rs,
                                                   Register rt, Label* overflow);
 template void
-MacroAssemblerMIPSShared::ma_addTestCarry<wasm::TrapDesc>(Register rd, Register rs, Register rt,
-                                                          wasm::TrapDesc overflow);
+MacroAssemblerMIPSShared::ma_addTestCarry<wasm::OldTrapDesc>(Register rd, Register rs, Register rt,
+                                                             wasm::OldTrapDesc overflow);
 
 template <typename L>
 void
 MacroAssemblerMIPSShared::ma_addTestCarry(Register rd, Register rs, Imm32 imm, L overflow)
 {
     ma_li(ScratchRegister, imm);
     ma_addTestCarry(rd, rs, ScratchRegister, overflow);
 }
 
 template void
 MacroAssemblerMIPSShared::ma_addTestCarry<Label*>(Register rd, Register rs,
                                                   Imm32 imm, Label* overflow);
 template void
-MacroAssemblerMIPSShared::ma_addTestCarry<wasm::TrapDesc>(Register rd, Register rs, Imm32 imm,
-                                                          wasm::TrapDesc overflow);
+MacroAssemblerMIPSShared::ma_addTestCarry<wasm::OldTrapDesc>(Register rd, Register rs, Imm32 imm,
+                                                             wasm::OldTrapDesc overflow);
 
 // Subtract.
 void
 MacroAssemblerMIPSShared::ma_subu(Register rd, Register rs, Imm32 imm)
 {
     if (Imm16::IsInSignedRange(-imm.value)) {
         as_addiu(rd, rs, -imm.value);
     } else {
@@ -791,42 +791,42 @@ MacroAssemblerMIPSShared::ma_b(Register 
 void
 MacroAssemblerMIPSShared::ma_b(Register lhs, ImmPtr imm, Label* l, Condition c, JumpKind jumpKind)
 {
     asMasm().ma_b(lhs, ImmWord(uintptr_t(imm.value)), l, c, jumpKind);
 }
 
 template <typename T>
 void
-MacroAssemblerMIPSShared::ma_b(Register lhs, T rhs, wasm::TrapDesc target, Condition c,
+MacroAssemblerMIPSShared::ma_b(Register lhs, T rhs, wasm::OldTrapDesc target, Condition c,
                                JumpKind jumpKind)
 {
     Label label;
     ma_b(lhs, rhs, &label, c, jumpKind);
     bindLater(&label, target);
 }
 
 template void MacroAssemblerMIPSShared::ma_b<Register>(Register lhs, Register rhs,
-                                                       wasm::TrapDesc target, Condition c,
+                                                       wasm::OldTrapDesc target, Condition c,
                                                        JumpKind jumpKind);
 template void MacroAssemblerMIPSShared::ma_b<Imm32>(Register lhs, Imm32 rhs,
-                                                       wasm::TrapDesc target, Condition c,
+                                                       wasm::OldTrapDesc target, Condition c,
                                                        JumpKind jumpKind);
 template void MacroAssemblerMIPSShared::ma_b<ImmTag>(Register lhs, ImmTag rhs,
-                                                       wasm::TrapDesc target, Condition c,
+                                                       wasm::OldTrapDesc target, Condition c,
                                                        JumpKind jumpKind);
 
 void
 MacroAssemblerMIPSShared::ma_b(Label* label, JumpKind jumpKind)
 {
     asMasm().branchWithCode(getBranchCode(BranchIsJump), label, jumpKind);
 }
 
 void
-MacroAssemblerMIPSShared::ma_b(wasm::TrapDesc target, JumpKind jumpKind)
+MacroAssemblerMIPSShared::ma_b(wasm::OldTrapDesc target, JumpKind jumpKind)
 {
     Label label;
     asMasm().branchWithCode(getBranchCode(BranchIsJump), &label, jumpKind);
     bindLater(&label, target);
 }
 
 Assembler::Condition
 MacroAssemblerMIPSShared::ma_cmp(Register scratch, Register lhs, Register rhs, Condition c)
--- a/js/src/jit/mips-shared/MacroAssembler-mips-shared.h
+++ b/js/src/jit/mips-shared/MacroAssembler-mips-shared.h
@@ -159,21 +159,21 @@ class MacroAssemblerMIPSShared : public 
     void ma_b(Register lhs, Imm32 imm, Label* l, Condition c, JumpKind jumpKind = LongJump);
     void ma_b(Register lhs, ImmPtr imm, Label* l, Condition c, JumpKind jumpKind = LongJump);
     void ma_b(Register lhs, ImmGCPtr imm, Label* l, Condition c, JumpKind jumpKind = LongJump) {
         MOZ_ASSERT(lhs != ScratchRegister);
         ma_li(ScratchRegister, imm);
         ma_b(lhs, ScratchRegister, l, c, jumpKind);
     }
     template <typename T>
-    void ma_b(Register lhs, T rhs, wasm::TrapDesc target, Condition c,
+    void ma_b(Register lhs, T rhs, wasm::OldTrapDesc target, Condition c,
               JumpKind jumpKind = LongJump);
 
     void ma_b(Label* l, JumpKind jumpKind = LongJump);
-    void ma_b(wasm::TrapDesc target, JumpKind jumpKind = LongJump);
+    void ma_b(wasm::OldTrapDesc target, JumpKind jumpKind = LongJump);
 
     // fp instructions
     void ma_lis(FloatRegister dest, float value);
     void ma_liNegZero(FloatRegister dest);
 
     void ma_sd(FloatRegister fd, BaseIndex address);
     void ma_ss(FloatRegister fd, BaseIndex address);
 
--- a/js/src/jit/mips32/CodeGenerator-mips32.cpp
+++ b/js/src/jit/mips32/CodeGenerator-mips32.cpp
@@ -375,27 +375,27 @@ CodeGeneratorMIPS::visitDivOrModI64(LDiv
         regs.take(rhs.low);
         regs.take(rhs.high);
     }
     Register temp = regs.takeAny();
     Label done;
 
     // Handle divide by zero.
     if (lir->canBeDivideByZero())
-        masm.branchTest64(Assembler::Zero, rhs, rhs, temp, trap(lir, wasm::Trap::IntegerDivideByZero));
+        masm.branchTest64(Assembler::Zero, rhs, rhs, temp, oldTrap(lir, wasm::Trap::IntegerDivideByZero));
 
     // Handle an integer overflow exception from INT64_MIN / -1.
     if (lir->canBeNegativeOverflow()) {
         Label notmin;
         masm.branch64(Assembler::NotEqual, lhs, Imm64(INT64_MIN), &notmin);
         masm.branch64(Assembler::NotEqual, rhs, Imm64(-1), &notmin);
         if (lir->mir()->isMod()) {
             masm.xor64(output, output);
         } else {
-            masm.jump(trap(lir, wasm::Trap::IntegerOverflow));
+            masm.jump(oldTrap(lir, wasm::Trap::IntegerOverflow));
         }
         masm.jump(&done);
         masm.bind(&notmin);
     }
 
     masm.setupWasmABICall();
     masm.passABIArg(lhs.high);
     masm.passABIArg(lhs.low);
@@ -428,17 +428,17 @@ CodeGeneratorMIPS::visitUDivOrModI64(LUD
     if (lhs != rhs) {
         regs.take(rhs.low);
         regs.take(rhs.high);
     }
     Register temp = regs.takeAny();
 
     // Prevent divide by zero.
     if (lir->canBeDivideByZero())
-        masm.branchTest64(Assembler::Zero, rhs, rhs, temp, trap(lir, wasm::Trap::IntegerDivideByZero));
+        masm.branchTest64(Assembler::Zero, rhs, rhs, temp, oldTrap(lir, wasm::Trap::IntegerDivideByZero));
 
     masm.setupWasmABICall();
     masm.passABIArg(lhs.high);
     masm.passABIArg(lhs.low);
     masm.passABIArg(rhs.high);
     masm.passABIArg(rhs.low);
 
     MOZ_ASSERT(gen->compilingWasm());
--- a/js/src/jit/mips32/MacroAssembler-mips32.cpp
+++ b/js/src/jit/mips32/MacroAssembler-mips32.cpp
@@ -233,18 +233,18 @@ MacroAssemblerMIPS::ma_addTestOverflow(R
 
     bind(&goodAddition);
 }
 
 template void
 MacroAssemblerMIPS::ma_addTestOverflow<Label*>(Register rd, Register rs,
                                                Register rt, Label* overflow);
 template void
-MacroAssemblerMIPS::ma_addTestOverflow<wasm::TrapDesc>(Register rd, Register rs, Register rt,
-                                                       wasm::TrapDesc overflow);
+MacroAssemblerMIPS::ma_addTestOverflow<wasm::OldTrapDesc>(Register rd, Register rs, Register rt,
+                                                          wasm::OldTrapDesc overflow);
 
 template <typename L>
 void
 MacroAssemblerMIPS::ma_addTestOverflow(Register rd, Register rs, Imm32 imm, L overflow)
 {
     // Check for signed range because of as_addiu
     // Check for unsigned range because of as_xori
     if (Imm16::IsInSignedRange(imm.value) && Imm16::IsInUnsignedRange(imm.value)) {
@@ -265,18 +265,18 @@ MacroAssemblerMIPS::ma_addTestOverflow(R
         ma_addTestOverflow(rd, rs, ScratchRegister, overflow);
     }
 }
 
 template void
 MacroAssemblerMIPS::ma_addTestOverflow<Label*>(Register rd, Register rs,
                                                Imm32 imm, Label* overflow);
 template void
-MacroAssemblerMIPS::ma_addTestOverflow<wasm::TrapDesc>(Register rd, Register rs, Imm32 imm,
-                                                       wasm::TrapDesc overflow);
+MacroAssemblerMIPS::ma_addTestOverflow<wasm::OldTrapDesc>(Register rd, Register rs, Imm32 imm,
+                                                          wasm::OldTrapDesc overflow);
 
 // Subtract.
 void
 MacroAssemblerMIPS::ma_subTestOverflow(Register rd, Register rs, Register rt, Label* overflow)
 {
     Label goodSubtraction;
     // Use second scratch. The instructions generated by ma_b don't use the
     // second scratch register.
--- a/js/src/jit/mips32/MacroAssembler-mips32.h
+++ b/js/src/jit/mips32/MacroAssembler-mips32.h
@@ -301,17 +301,17 @@ class MacroAssemblerMIPSCompat : public 
         as_jr(ScratchRegister);
         as_nop();
     }
 
     void jump(JitCode* code) {
         branch(code);
     }
 
-    void jump(wasm::TrapDesc target) {
+    void jump(wasm::OldTrapDesc target) {
         ma_b(target);
     }
 
     void jump(TrampolinePtr code)
     {
         auto target = ImmPtr(code.value);
         BufferOffset bo = m_buffer.nextOffset();
         addPendingJump(bo, target, Relocation::HARDCODED);
--- a/js/src/jit/mips64/CodeGenerator-mips64.cpp
+++ b/js/src/jit/mips64/CodeGenerator-mips64.cpp
@@ -357,27 +357,27 @@ CodeGeneratorMIPS64::visitDivOrModI64(LD
     Register lhs = ToRegister(lir->lhs());
     Register rhs = ToRegister(lir->rhs());
     Register output = ToRegister(lir->output());
 
     Label done;
 
     // Handle divide by zero.
     if (lir->canBeDivideByZero())
-        masm.ma_b(rhs, rhs, trap(lir, wasm::Trap::IntegerDivideByZero), Assembler::Zero);
+        masm.ma_b(rhs, rhs, oldTrap(lir, wasm::Trap::IntegerDivideByZero), Assembler::Zero);
 
     // Handle an integer overflow exception from INT64_MIN / -1.
     if (lir->canBeNegativeOverflow()) {
         Label notmin;
         masm.branchPtr(Assembler::NotEqual, lhs, ImmWord(INT64_MIN), &notmin);
         masm.branchPtr(Assembler::NotEqual, rhs, ImmWord(-1), &notmin);
         if (lir->mir()->isMod()) {
             masm.ma_xor(output, output);
         } else {
-            masm.jump(trap(lir, wasm::Trap::IntegerOverflow));
+            masm.jump(oldTrap(lir, wasm::Trap::IntegerOverflow));
         }
         masm.jump(&done);
         masm.bind(&notmin);
     }
 
     masm.as_ddiv(lhs, rhs);
 
     if (lir->mir()->isMod())
@@ -394,17 +394,17 @@ CodeGeneratorMIPS64::visitUDivOrModI64(L
     Register lhs = ToRegister(lir->lhs());
     Register rhs = ToRegister(lir->rhs());
     Register output = ToRegister(lir->output());
 
     Label done;
 
     // Prevent divide by zero.
     if (lir->canBeDivideByZero())
-        masm.ma_b(rhs, rhs, trap(lir, wasm::Trap::IntegerDivideByZero), Assembler::Zero);
+        masm.ma_b(rhs, rhs, oldTrap(lir, wasm::Trap::IntegerDivideByZero), Assembler::Zero);
 
     masm.as_ddivu(lhs, rhs);
 
     if (lir->mir()->isMod())
         masm.as_mfhi(output);
     else
         masm.as_mflo(output);
 
--- a/js/src/jit/mips64/MacroAssembler-mips64.cpp
+++ b/js/src/jit/mips64/MacroAssembler-mips64.cpp
@@ -484,18 +484,18 @@ MacroAssemblerMIPS64::ma_addTestOverflow
     as_addu(rd, rs, rt);
     ma_b(rd, SecondScratchReg, overflow, Assembler::NotEqual);
 }
 
 template void
 MacroAssemblerMIPS64::ma_addTestOverflow<Label*>(Register rd, Register rs,
                                                  Register rt, Label* overflow);
 template void
-MacroAssemblerMIPS64::ma_addTestOverflow<wasm::TrapDesc>(Register rd, Register rs, Register rt,
-                                                         wasm::TrapDesc overflow);
+MacroAssemblerMIPS64::ma_addTestOverflow<wasm::OldTrapDesc>(Register rd, Register rs, Register rt,
+                                                            wasm::OldTrapDesc overflow);
 
 template <typename L>
 void
 MacroAssemblerMIPS64::ma_addTestOverflow(Register rd, Register rs, Imm32 imm, L overflow)
 {
     // Check for signed range because of as_daddiu
     if (Imm16::IsInSignedRange(imm.value)) {
         as_daddiu(SecondScratchReg, rs, imm.value);
@@ -506,18 +506,18 @@ MacroAssemblerMIPS64::ma_addTestOverflow
         ma_addTestOverflow(rd, rs, ScratchRegister, overflow);
     }
 }
 
 template void
 MacroAssemblerMIPS64::ma_addTestOverflow<Label*>(Register rd, Register rs,
                                                  Imm32 imm, Label* overflow);
 template void
-MacroAssemblerMIPS64::ma_addTestOverflow<wasm::TrapDesc>(Register rd, Register rs, Imm32 imm,
-                                                         wasm::TrapDesc overflow);
+MacroAssemblerMIPS64::ma_addTestOverflow<wasm::OldTrapDesc>(Register rd, Register rs, Imm32 imm,
+                                                            wasm::OldTrapDesc overflow);
 
 // Subtract.
 void
 MacroAssemblerMIPS64::ma_dsubu(Register rd, Register rs, Imm32 imm)
 {
     if (Imm16::IsInSignedRange(-imm.value)) {
         as_daddiu(rd, rs, -imm.value);
     } else {
--- a/js/src/jit/mips64/MacroAssembler-mips64.h
+++ b/js/src/jit/mips64/MacroAssembler-mips64.h
@@ -330,17 +330,17 @@ class MacroAssemblerMIPS64Compat : publi
         as_jr(ScratchRegister);
         as_nop();
     }
 
     void jump(JitCode* code) {
         branch(code);
     }
 
-    void jump(wasm::TrapDesc target) {
+    void jump(wasm::OldTrapDesc target) {
         ma_b(target);
     }
 
     void jump(TrampolinePtr code)
     {
         auto target = ImmPtr(code.value);
         BufferOffset bo = m_buffer.nextOffset();
         addPendingJump(bo, target, Relocation::HARDCODED);
--- a/js/src/jit/none/MacroAssembler-none.h
+++ b/js/src/jit/none/MacroAssembler-none.h
@@ -205,17 +205,17 @@ class MacroAssemblerNone : public Assemb
     void copyJumpRelocationTable(uint8_t*) { MOZ_CRASH(); }
     void copyDataRelocationTable(uint8_t*) { MOZ_CRASH(); }
     void copyPreBarrierTable(uint8_t*) { MOZ_CRASH(); }
     void processCodeLabels(uint8_t*) { MOZ_CRASH(); }
 
     void flushBuffer() { MOZ_CRASH(); }
 
     template <typename T> void bind(T) { MOZ_CRASH(); }
-    void bindLater(Label*, wasm::TrapDesc) { MOZ_CRASH(); }
+    void bindLater(Label*, wasm::OldTrapDesc) { MOZ_CRASH(); }
     template <typename T> void j(Condition, T) { MOZ_CRASH(); }
     template <typename T> void jump(T) { MOZ_CRASH(); }
     void writeCodePointer(CodeOffset* label) { MOZ_CRASH(); }
     void haltingAlign(size_t) { MOZ_CRASH(); }
     void nopAlign(size_t) { MOZ_CRASH(); }
     void checkStackAlignment() { MOZ_CRASH(); }
     uint32_t currentOffset() { MOZ_CRASH(); }
     CodeOffset labelForPatch() { MOZ_CRASH(); }
--- a/js/src/jit/shared/Assembler-shared.h
+++ b/js/src/jit/shared/Assembler-shared.h
@@ -806,78 +806,78 @@ struct CallFarJump
 
     void offsetBy(size_t delta) {
         jump.offsetBy(delta);
     }
 };
 
 typedef Vector<CallFarJump, 0, SystemAllocPolicy> CallFarJumpVector;
 
-// The TrapDesc struct describes a wasm trap that is about to be emitted. This
+// The OldTrapDesc struct describes a wasm trap that is about to be emitted. This
 // includes the logical wasm bytecode offset to report, the kind of instruction
 // causing the trap, and the stack depth right before control is transferred to
 // the trap out-of-line path.
 
-struct TrapDesc : BytecodeOffset
+struct OldTrapDesc : BytecodeOffset
 {
     enum Kind { Jump, MemoryAccess };
     Kind kind;
     Trap trap;
     uint32_t framePushed;
 
-    TrapDesc(BytecodeOffset offset, Trap trap, uint32_t framePushed, Kind kind = Jump)
+    OldTrapDesc(BytecodeOffset offset, Trap trap, uint32_t framePushed, Kind kind = Jump)
       : BytecodeOffset(offset), kind(kind), trap(trap), framePushed(framePushed)
     {}
 };
 
-// A TrapSite captures all relevant information at the point of emitting the
+// An OldTrapSite captures all relevant information at the point of emitting the
 // in-line trapping instruction for the purpose of generating the out-of-line
 // trap code (at the end of the function).
 
-struct TrapSite : TrapDesc
+struct OldTrapSite : OldTrapDesc
 {
     uint32_t codeOffset;
 
-    TrapSite(TrapDesc trap, uint32_t codeOffset)
-      : TrapDesc(trap), codeOffset(codeOffset)
+    OldTrapSite(OldTrapDesc trap, uint32_t codeOffset)
+      : OldTrapDesc(trap), codeOffset(codeOffset)
     {}
 };
 
-typedef Vector<TrapSite, 0, SystemAllocPolicy> TrapSiteVector;
+typedef Vector<OldTrapSite, 0, SystemAllocPolicy> OldTrapSiteVector;
 
-// A TrapFarJump records the offset of a jump that needs to be patched to a trap
+// An OldTrapFarJump records the offset of a jump that needs to be patched to a trap
 // exit at the end of the module when trap exits are emitted.
 
-struct TrapFarJump
+struct OldTrapFarJump
 {
     Trap trap;
     jit::CodeOffset jump;
 
-    TrapFarJump(Trap trap, jit::CodeOffset jump)
+    OldTrapFarJump(Trap trap, jit::CodeOffset jump)
       : trap(trap), jump(jump)
     {}
 
     void offsetBy(size_t delta) {
         jump.offsetBy(delta);
     }
 };
 
-typedef Vector<TrapFarJump, 0, SystemAllocPolicy> TrapFarJumpVector;
+typedef Vector<OldTrapFarJump, 0, SystemAllocPolicy> OldTrapFarJumpVector;
 
 } // namespace wasm
 
 namespace jit {
 
 // The base class of all Assemblers for all archs.
 class AssemblerShared
 {
     wasm::CallSiteVector callSites_;
     wasm::CallSiteTargetVector callSiteTargets_;
-    wasm::TrapSiteVector trapSites_;
-    wasm::TrapFarJumpVector trapFarJumps_;
+    wasm::OldTrapSiteVector oldTrapSites_;
+    wasm::OldTrapFarJumpVector oldTrapFarJumps_;
     wasm::CallFarJumpVector callFarJumps_;
     wasm::MemoryAccessVector memoryAccesses_;
     wasm::SymbolicAccessVector symbolicAccesses_;
 
   protected:
     CodeLabelVector codeLabels_;
 
     bool enoughMemory_;
@@ -925,54 +925,54 @@ class AssemblerShared
     // WebAssembly metadata emitted by masm operations accumulated on the
     // MacroAssembler, and swapped into a wasm::CompiledCode after finish().
 
     template <typename... Args>
     void append(const wasm::CallSiteDesc& desc, CodeOffset retAddr, Args&&... args) {
         enoughMemory_ &= callSites_.emplaceBack(desc, retAddr.offset());
         enoughMemory_ &= callSiteTargets_.emplaceBack(mozilla::Forward<Args>(args)...);
     }
-    void append(wasm::TrapSite trapSite) {
-        enoughMemory_ &= trapSites_.append(trapSite);
+    void append(wasm::OldTrapSite trapSite) {
+        enoughMemory_ &= oldTrapSites_.append(trapSite);
     }
-    void append(wasm::TrapFarJump jmp) {
-        enoughMemory_ &= trapFarJumps_.append(jmp);
+    void append(wasm::OldTrapFarJump jmp) {
+        enoughMemory_ &= oldTrapFarJumps_.append(jmp);
     }
     void append(wasm::CallFarJump jmp) {
         enoughMemory_ &= callFarJumps_.append(jmp);
     }
     void append(wasm::MemoryAccess access) {
         enoughMemory_ &= memoryAccesses_.append(access);
     }
     void append(const wasm::MemoryAccessDesc& access, size_t codeOffset, size_t framePushed) {
         if (access.hasTrap()) {
             // If a memory access is trapping (wasm, SIMD.js, Atomics), create a
-            // TrapSite now which will generate a trap out-of-line path at the end
+            // OldTrapSite now which will generate a trap out-of-line path at the end
             // of the function which will *then* append a MemoryAccess.
-            wasm::TrapDesc trap(access.trapOffset(), wasm::Trap::OutOfBounds, framePushed,
-                                wasm::TrapSite::MemoryAccess);
-            append(wasm::TrapSite(trap, codeOffset));
+            wasm::OldTrapDesc trap(access.trapOffset(), wasm::Trap::OutOfBounds, framePushed,
+                                   wasm::OldTrapSite::MemoryAccess);
+            append(wasm::OldTrapSite(trap, codeOffset));
         } else {
             // Otherwise, this is a plain asm.js access. On WASM_HUGE_MEMORY
             // platforms, asm.js uses signal handlers to remove bounds checks
             // and thus requires a MemoryAccess.
             MOZ_ASSERT(access.isPlainAsmJS());
 #ifdef WASM_HUGE_MEMORY
             append(wasm::MemoryAccess(codeOffset));
 #endif
         }
     }
     void append(wasm::SymbolicAccess access) {
         enoughMemory_ &= symbolicAccesses_.append(access);
     }
 
     wasm::CallSiteVector& callSites() { return callSites_; }
     wasm::CallSiteTargetVector& callSiteTargets() { return callSiteTargets_; }
-    wasm::TrapSiteVector& trapSites() { return trapSites_; }
-    wasm::TrapFarJumpVector& trapFarJumps() { return trapFarJumps_; }
+    wasm::OldTrapSiteVector& oldTrapSites() { return oldTrapSites_; }
+    wasm::OldTrapFarJumpVector& oldTrapFarJumps() { return oldTrapFarJumps_; }
     wasm::CallFarJumpVector& callFarJumps() { return callFarJumps_; }
     wasm::MemoryAccessVector& memoryAccesses() { return memoryAccesses_; }
     wasm::SymbolicAccessVector& symbolicAccesses() { return symbolicAccesses_; }
 };
 
 } // namespace jit
 } // namespace js
 
--- a/js/src/jit/shared/CodeGenerator-shared.h
+++ b/js/src/jit/shared/CodeGenerator-shared.h
@@ -498,18 +498,18 @@ class CodeGeneratorShared : public LElem
     Label* labelForBackedgeWithImplicitCheck(MBasicBlock* mir);
 
 // This function is not used for MIPS. MIPS has branchToBlock.
 #if !defined(JS_CODEGEN_MIPS32) && !defined(JS_CODEGEN_MIPS64)
     void jumpToBlock(MBasicBlock* mir, Assembler::Condition cond);
 #endif
 
     template <class T>
-    wasm::TrapDesc trap(T* mir, wasm::Trap trap) {
-        return wasm::TrapDesc(mir->bytecodeOffset(), trap, masm.framePushed());
+    wasm::OldTrapDesc oldTrap(T* mir, wasm::Trap trap) {
+        return wasm::OldTrapDesc(mir->bytecodeOffset(), trap, masm.framePushed());
     }
 
   private:
     void generateInvalidateEpilogue();
 
   public:
     CodeGeneratorShared(MIRGenerator* gen, LIRGraph* graph, MacroAssembler* masm);
 
--- a/js/src/jit/x64/CodeGenerator-x64.cpp
+++ b/js/src/jit/x64/CodeGenerator-x64.cpp
@@ -280,28 +280,28 @@ CodeGeneratorX64::visitDivOrModI64(LDivO
     Label done;
 
     // Put the lhs in rax.
     if (lhs != rax)
         masm.mov(lhs, rax);
 
     // Handle divide by zero.
     if (lir->canBeDivideByZero()) {
-        masm.branchTestPtr(Assembler::Zero, rhs, rhs, trap(lir, wasm::Trap::IntegerDivideByZero));
+        masm.branchTestPtr(Assembler::Zero, rhs, rhs, oldTrap(lir, wasm::Trap::IntegerDivideByZero));
     }
 
     // Handle an integer overflow exception from INT64_MIN / -1.
     if (lir->canBeNegativeOverflow()) {
         Label notmin;
         masm.branchPtr(Assembler::NotEqual, lhs, ImmWord(INT64_MIN), &notmin);
         masm.branchPtr(Assembler::NotEqual, rhs, ImmWord(-1), &notmin);
         if (lir->mir()->isMod())
             masm.xorl(output, output);
         else
-            masm.jump(trap(lir, wasm::Trap::IntegerOverflow));
+            masm.jump(oldTrap(lir, wasm::Trap::IntegerOverflow));
         masm.jump(&done);
         masm.bind(&notmin);
     }
 
     // Sign extend the lhs into rdx to make rdx:rax.
     masm.cqo();
     masm.idivq(rhs);
 
@@ -323,17 +323,17 @@ CodeGeneratorX64::visitUDivOrModI64(LUDi
     // Put the lhs in rax.
     if (lhs != rax)
         masm.mov(lhs, rax);
 
     Label done;
 
     // Prevent divide by zero.
     if (lir->canBeDivideByZero())
-        masm.branchTestPtr(Assembler::Zero, rhs, rhs, trap(lir, wasm::Trap::IntegerDivideByZero));
+        masm.branchTestPtr(Assembler::Zero, rhs, rhs, oldTrap(lir, wasm::Trap::IntegerDivideByZero));
 
     // Zero extend the lhs into rdx to make (rdx:rax).
     masm.xorl(rdx, rdx);
     masm.udivq(rhs);
 
     masm.bind(&done);
 }
 
--- a/js/src/jit/x86-shared/Assembler-x86-shared.h
+++ b/js/src/jit/x86-shared/Assembler-x86-shared.h
@@ -917,22 +917,22 @@ class AssemblerX86Shared : public Assemb
   public:
     void nop() { masm.nop(); }
     void nop(size_t n) { masm.insert_nop(n); }
     void j(Condition cond, Label* label) { jSrc(cond, label); }
     void jmp(Label* label) { jmpSrc(label); }
     void j(Condition cond, RepatchLabel* label) { jSrc(cond, label); }
     void jmp(RepatchLabel* label) { jmpSrc(label); }
 
-    void j(Condition cond, wasm::TrapDesc target) {
+    void j(Condition cond, wasm::OldTrapDesc target) {
         Label l;
         j(cond, &l);
         bindLater(&l, target);
     }
-    void jmp(wasm::TrapDesc target) {
+    void jmp(wasm::OldTrapDesc target) {
         Label l;
         jmp(&l);
         bindLater(&l, target);
     }
 
     void jmp(const Operand& op) {
         switch (op.kind()) {
           case Operand::MEM_REG_DISP:
@@ -958,21 +958,21 @@ class AssemblerX86Shared : public Assemb
                 JmpSrc next;
                 more = masm.nextJump(jmp, &next);
                 masm.linkJump(jmp, dst);
                 jmp = next;
             } while (more);
         }
         label->bind(dst.offset());
     }
-    void bindLater(Label* label, wasm::TrapDesc target) {
+    void bindLater(Label* label, wasm::OldTrapDesc target) {
         if (label->used()) {
             JmpSrc jmp(label->offset());
             do {
-                append(wasm::TrapSite(target, jmp.offset()));
+                append(wasm::OldTrapSite(target, jmp.offset()));
             } while (masm.nextJump(jmp, &jmp));
         }
         label->reset();
     }
     void bind(RepatchLabel* label) {
         JmpDst dst(masm.label());
         if (label->used()) {
             JmpSrc jmp(label->offset());
--- a/js/src/jit/x86-shared/CodeGenerator-x86-shared.cpp
+++ b/js/src/jit/x86-shared/CodeGenerator-x86-shared.cpp
@@ -430,17 +430,17 @@ CodeGeneratorX86Shared::visitWasmAddOffs
     MWasmAddOffset* mir = lir->mir();
     Register base = ToRegister(lir->base());
     Register out = ToRegister(lir->output());
 
     if (base != out)
         masm.move32(base, out);
     masm.add32(Imm32(mir->offset()), out);
 
-    masm.j(Assembler::CarrySet, trap(mir, wasm::Trap::OutOfBounds));
+    masm.j(Assembler::CarrySet, oldTrap(mir, wasm::Trap::OutOfBounds));
 }
 
 void
 CodeGeneratorX86Shared::visitWasmTruncateToInt32(LWasmTruncateToInt32* lir)
 {
     FloatRegister input = ToFloatRegister(lir->input());
     Register output = ToRegister(lir->output());
 
@@ -1021,17 +1021,17 @@ CodeGeneratorX86Shared::visitUDivOrMod(L
     if (lhs != eax)
         masm.mov(lhs, eax);
 
     // Prevent divide by zero.
     if (ins->canBeDivideByZero()) {
         masm.test32(rhs, rhs);
         if (ins->mir()->isTruncated()) {
             if (ins->trapOnError()) {
-                masm.j(Assembler::Zero, trap(ins, wasm::Trap::IntegerDivideByZero));
+                masm.j(Assembler::Zero, oldTrap(ins, wasm::Trap::IntegerDivideByZero));
             } else {
                 ool = new(alloc()) ReturnZero(output);
                 masm.j(Assembler::Zero, ool->entry());
             }
         } else {
             bailoutIf(Assembler::Zero, ins->snapshot());
         }
     }
@@ -1069,17 +1069,17 @@ CodeGeneratorX86Shared::visitUDivOrModCo
     // This emits the division answer into edx or the modulus answer into eax.
     MOZ_ASSERT(output == eax || output == edx);
     MOZ_ASSERT(lhs != eax && lhs != edx);
     bool isDiv = (output == edx);
 
     if (d == 0) {
         if (ins->mir()->isTruncated()) {
             if (ins->trapOnError())
-                masm.jump(trap(ins, wasm::Trap::IntegerDivideByZero));
+                masm.jump(oldTrap(ins, wasm::Trap::IntegerDivideByZero));
             else
                 masm.xorl(output, output);
         } else {
             bailout(ins->snapshot());
         }
         return;
     }
 
@@ -1208,17 +1208,17 @@ CodeGeneratorX86Shared::visitDivPowTwoI(
     }
 
     if (negativeDivisor) {
         // INT32_MIN / -1 overflows.
         masm.negl(lhs);
         if (!mir->isTruncated())
             bailoutIf(Assembler::Overflow, ins->snapshot());
         else if (mir->trapOnError())
-            masm.j(Assembler::Overflow, trap(mir, wasm::Trap::IntegerOverflow));
+            masm.j(Assembler::Overflow, oldTrap(mir, wasm::Trap::IntegerOverflow));
     } else if (mir->isUnsigned() && !mir->isTruncated()) {
         // Unsigned division by 1 can overflow if output is not
         // truncated.
         masm.test32(lhs, lhs);
         bailoutIf(Assembler::Signed, ins->snapshot());
     }
 }
 
@@ -1327,17 +1327,17 @@ CodeGeneratorX86Shared::visitDivI(LDivI*
     // divide case.
     if (lhs != eax)
         masm.mov(lhs, eax);
 
     // Handle divide by zero.
     if (mir->canBeDivideByZero()) {
         masm.test32(rhs, rhs);
         if (mir->trapOnError()) {
-            masm.j(Assembler::Zero, trap(mir, wasm::Trap::IntegerDivideByZero));
+            masm.j(Assembler::Zero, oldTrap(mir, wasm::Trap::IntegerDivideByZero));
         } else if (mir->canTruncateInfinities()) {
             // Truncated division by zero is zero (Infinity|0 == 0)
             if (!ool)
                 ool = new(alloc()) ReturnZero(output);
             masm.j(Assembler::Zero, ool->entry());
         } else {
             MOZ_ASSERT(mir->fallible());
             bailoutIf(Assembler::Zero, ins->snapshot());
@@ -1346,17 +1346,17 @@ CodeGeneratorX86Shared::visitDivI(LDivI*
 
     // Handle an integer overflow exception from -2147483648 / -1.
     if (mir->canBeNegativeOverflow()) {
         Label notmin;
         masm.cmp32(lhs, Imm32(INT32_MIN));
         masm.j(Assembler::NotEqual, &notmin);
         masm.cmp32(rhs, Imm32(-1));
         if (mir->trapOnError()) {
-            masm.j(Assembler::Equal, trap(mir, wasm::Trap::IntegerOverflow));
+            masm.j(Assembler::Equal, oldTrap(mir, wasm::Trap::IntegerOverflow));
         } else if (mir->canTruncateOverflow()) {
             // (-INT32_MIN)|0 == INT32_MIN and INT32_MIN is already in the
             // output register (lhs == eax).
             masm.j(Assembler::Equal, &done);
         } else {
             MOZ_ASSERT(mir->fallible());
             bailoutIf(Assembler::Equal, ins->snapshot());
         }
@@ -1496,17 +1496,17 @@ CodeGeneratorX86Shared::visitModI(LModI*
 
     MMod* mir = ins->mir();
 
     // Prevent divide by zero.
     if (mir->canBeDivideByZero()) {
         masm.test32(rhs, rhs);
         if (mir->isTruncated()) {
             if (mir->trapOnError()) {
-                masm.j(Assembler::Zero, trap(mir, wasm::Trap::IntegerDivideByZero));
+                masm.j(Assembler::Zero, oldTrap(mir, wasm::Trap::IntegerDivideByZero));
             } else {
                 if (!ool)
                     ool = new(alloc()) ReturnZero(edx);
                 masm.j(Assembler::Zero, ool->entry());
             }
         } else {
             bailoutIf(Assembler::Zero, ins->snapshot());
         }
@@ -2518,17 +2518,17 @@ CodeGeneratorX86Shared::visitOutOfLineSi
     masm.vcmpleps(Operand(input), scratch, scratch);
     masm.vmovmskps(scratch, temp);
     masm.cmp32(temp, Imm32(0));
     masm.j(Assembler::NotEqual, &onConversionError);
 
     masm.jump(ool->rejoin());
 
     if (gen->compilingWasm()) {
-        masm.bindLater(&onConversionError, trap(ool, wasm::Trap::ImpreciseSimdConversion));
+        masm.bindLater(&onConversionError, oldTrap(ool, wasm::Trap::ImpreciseSimdConversion));
     } else {
         masm.bind(&onConversionError);
         bailout(ool->ins()->snapshot());
     }
 }
 
 // Convert Float32x4 to Uint32x4.
 //
@@ -2598,17 +2598,17 @@ CodeGeneratorX86Shared::visitFloat32x4To
 
     // We still need to filter out the V-lanes. They would show up as 0x80000000
     // in both A and B. Since we cleared the valid A-lanes in B, the V-lanes are
     // the remaining negative lanes in B.
     masm.vmovmskps(scratch, temp);
     masm.cmp32(temp, Imm32(0));
 
     if (gen->compilingWasm())
-        masm.j(Assembler::NotEqual, trap(mir, wasm::Trap::ImpreciseSimdConversion));
+        masm.j(Assembler::NotEqual, oldTrap(mir, wasm::Trap::ImpreciseSimdConversion));
     else
         bailoutIf(Assembler::NotEqual, ins->snapshot());
 }
 
 void
 CodeGeneratorX86Shared::visitSimdValueInt32x4(LSimdValueInt32x4* ins)
 {
     MOZ_ASSERT(ins->mir()->type() == MIRType::Int32x4 || ins->mir()->type() == MIRType::Bool32x4);
--- a/js/src/jit/x86-shared/MacroAssembler-x86-shared.cpp
+++ b/js/src/jit/x86-shared/MacroAssembler-x86-shared.cpp
@@ -681,20 +681,20 @@ struct MOZ_RAII AutoHandleWasmTruncateTo
 
     explicit AutoHandleWasmTruncateToIntErrors(MacroAssembler& masm, wasm::BytecodeOffset off)
       : masm(masm), off(off)
     { }
 
     ~AutoHandleWasmTruncateToIntErrors() {
         // Handle errors.
         masm.bind(&fail);
-        masm.jump(wasm::TrapDesc(off, wasm::Trap::IntegerOverflow, masm.framePushed()));
+        masm.jump(wasm::OldTrapDesc(off, wasm::Trap::IntegerOverflow, masm.framePushed()));
 
         masm.bind(&inputIsNaN);
-        masm.jump(wasm::TrapDesc(off, wasm::Trap::InvalidConversionToInteger, masm.framePushed()));
+        masm.jump(wasm::OldTrapDesc(off, wasm::Trap::InvalidConversionToInteger, masm.framePushed()));
     }
 };
 
 void
 MacroAssembler::wasmTruncateDoubleToInt32(FloatRegister input, Register output, Label* oolEntry)
 {
     vcvttsd2si(input, output);
     cmp32(output, Imm32(1));
--- a/js/src/jit/x86-shared/MacroAssembler-x86-shared.h
+++ b/js/src/jit/x86-shared/MacroAssembler-x86-shared.h
@@ -197,17 +197,17 @@ class MacroAssemblerX86Shared : public A
         jmp(label);
     }
     void jump(Register reg) {
         jmp(Operand(reg));
     }
     void jump(const Address& addr) {
         jmp(Operand(addr));
     }
-    void jump(wasm::TrapDesc target) {
+    void jump(wasm::OldTrapDesc target) {
         jmp(target);
     }
 
     void convertInt32ToDouble(Register src, FloatRegister dest) {
         // vcvtsi2sd and friends write only part of their output register, which
         // causes slowdowns on out-of-order processors. Explicitly break
         // dependencies with vxorpd (and vxorps elsewhere), which are handled
         // specially in modern CPUs, for this purpose. See sections 8.14, 9.8,
--- a/js/src/jit/x86/CodeGenerator-x86.cpp
+++ b/js/src/jit/x86/CodeGenerator-x86.cpp
@@ -1026,29 +1026,29 @@ CodeGeneratorX86::visitDivOrModI64(LDivO
     Register64 output = ToOutRegister64(lir);
 
     MOZ_ASSERT(output == ReturnReg64);
 
     Label done;
 
     // Handle divide by zero.
     if (lir->canBeDivideByZero())
-        masm.branchTest64(Assembler::Zero, rhs, rhs, temp, trap(lir, wasm::Trap::IntegerDivideByZero));
+        masm.branchTest64(Assembler::Zero, rhs, rhs, temp, oldTrap(lir, wasm::Trap::IntegerDivideByZero));
 
     MDefinition* mir = lir->mir();
 
     // Handle an integer overflow exception from INT64_MIN / -1.
     if (lir->canBeNegativeOverflow()) {
         Label notmin;
         masm.branch64(Assembler::NotEqual, lhs, Imm64(INT64_MIN), &notmin);
         masm.branch64(Assembler::NotEqual, rhs, Imm64(-1), &notmin);
         if (mir->isMod())
             masm.xor64(output, output);
         else
-            masm.jump(trap(lir, wasm::Trap::IntegerOverflow));
+            masm.jump(oldTrap(lir, wasm::Trap::IntegerOverflow));
         masm.jump(&done);
         masm.bind(&notmin);
     }
 
     masm.setupWasmABICall();
     masm.passABIArg(lhs.high);
     masm.passABIArg(lhs.low);
     masm.passABIArg(rhs.high);
@@ -1074,17 +1074,17 @@ CodeGeneratorX86::visitUDivOrModI64(LUDi
     Register64 rhs = ToRegister64(lir->getInt64Operand(LDivOrModI64::Rhs));
     Register temp = ToRegister(lir->temp());
     Register64 output = ToOutRegister64(lir);
 
     MOZ_ASSERT(output == ReturnReg64);
 
     // Prevent divide by zero.
     if (lir->canBeDivideByZero())
-        masm.branchTest64(Assembler::Zero, rhs, rhs, temp, trap(lir, wasm::Trap::IntegerDivideByZero));
+        masm.branchTest64(Assembler::Zero, rhs, rhs, temp, oldTrap(lir, wasm::Trap::IntegerDivideByZero));
 
     masm.setupWasmABICall();
     masm.passABIArg(lhs.high);
     masm.passABIArg(lhs.low);
     masm.passABIArg(rhs.high);
     masm.passABIArg(rhs.low);
 
     MOZ_ASSERT(gen->compilingWasm());
--- a/js/src/wasm/WasmBaselineCompile.cpp
+++ b/js/src/wasm/WasmBaselineCompile.cpp
@@ -3015,17 +3015,17 @@ class BaseCompiler final : public BaseCo
         // maintain the invariant that, when debugEnabled_, all wasm::Frames
         // are valid wasm::DebugFrames which is observable by WasmHandleThrow.
         masm.bind(&stackOverflowLabel_);
         uint32_t debugFrameReserved = debugEnabled_ ? DebugFrame::offsetOfFrame() : 0;
         MOZ_ASSERT(fr.initialSize() >= debugFrameReserved);
         if (fr.initialSize() > debugFrameReserved)
             masm.addToStackPtr(Imm32(fr.initialSize() - debugFrameReserved));
         BytecodeOffset prologueTrapOffset(func_.lineOrBytecode);
-        masm.jump(TrapDesc(prologueTrapOffset, Trap::StackOverflow, debugFrameReserved));
+        masm.jump(OldTrapDesc(prologueTrapOffset, Trap::StackOverflow, debugFrameReserved));
 
         masm.bind(&returnLabel_);
 
         if (debugEnabled_) {
             // Store and reload the return value from DebugFrame::return so that
             // it can be clobbered, and/or modified by the debug trap.
             saveResult();
             insertBreakablePoint(CallSiteDesc::Breakpoint);
@@ -3040,17 +3040,17 @@ class BaseCompiler final : public BaseCo
 
         // Note the end of the inline code and start of the OOL code.
         //gen->perfSpewer().noteEndInlineCode(masm);
 #endif
 
         if (!generateOutOfLineCode())
             return false;
 
-        masm.wasmEmitTrapOutOfLineCode();
+        masm.wasmEmitOldTrapOutOfLineCode();
 
         offsets_.end = masm.currentOffset();
 
         if (!fr.checkStackHeight())
             return false;
 
         return !masm.oom();
     }
@@ -3448,46 +3448,46 @@ class BaseCompiler final : public BaseCo
 
     void returnCleanup(bool popStack) {
         if (popStack)
             fr.popStackBeforeBranch(controlOutermost().stackHeight);
         masm.jump(&returnLabel_);
     }
 
     void checkDivideByZeroI32(RegI32 rhs, RegI32 srcDest, Label* done) {
-        masm.branchTest32(Assembler::Zero, rhs, rhs, trap(Trap::IntegerDivideByZero));
+        masm.branchTest32(Assembler::Zero, rhs, rhs, oldTrap(Trap::IntegerDivideByZero));
     }
 
     void checkDivideByZeroI64(RegI64 r) {
         ScratchI32 scratch(*this);
-        masm.branchTest64(Assembler::Zero, r, r, scratch, trap(Trap::IntegerDivideByZero));
+        masm.branchTest64(Assembler::Zero, r, r, scratch, oldTrap(Trap::IntegerDivideByZero));
     }
 
     void checkDivideSignedOverflowI32(RegI32 rhs, RegI32 srcDest, Label* done, bool zeroOnOverflow) {
         Label notMin;
         masm.branch32(Assembler::NotEqual, srcDest, Imm32(INT32_MIN), &notMin);
         if (zeroOnOverflow) {
             masm.branch32(Assembler::NotEqual, rhs, Imm32(-1), &notMin);
             moveImm32(0, srcDest);
             masm.jump(done);
         } else {
-            masm.branch32(Assembler::Equal, rhs, Imm32(-1), trap(Trap::IntegerOverflow));
+            masm.branch32(Assembler::Equal, rhs, Imm32(-1), oldTrap(Trap::IntegerOverflow));
         }
         masm.bind(&notMin);
     }
 
     void checkDivideSignedOverflowI64(RegI64 rhs, RegI64 srcDest, Label* done, bool zeroOnOverflow) {
         Label notmin;
         masm.branch64(Assembler::NotEqual, srcDest, Imm64(INT64_MIN), &notmin);
         masm.branch64(Assembler::NotEqual, rhs, Imm64(-1), &notmin);
         if (zeroOnOverflow) {
             masm.xor64(srcDest, srcDest);
             masm.jump(done);
         } else {
-            masm.jump(trap(Trap::IntegerOverflow));
+            masm.jump(oldTrap(Trap::IntegerOverflow));
         }
         masm.bind(&notmin);
     }
 
 #ifndef RABALDR_INT_DIV_I64_CALLOUT
     void quotientI64(RegI64 rhs, RegI64 srcDest, RegI64 reserved, IsUnsigned isUnsigned,
                      bool isConst, int64_t c)
     {
@@ -3804,17 +3804,17 @@ class BaseCompiler final : public BaseCo
         masm.or32(src.high, src.low);
         masm.cmp32(src.low, Imm32(0));
         masm.emitSet(Assembler::Equal, dest);
 #endif
     }
 
     void unreachableTrap()
     {
-        masm.jump(trap(Trap::Unreachable));
+        masm.jump(oldTrap(Trap::Unreachable));
 #ifdef DEBUG
         masm.breakpoint();
 #endif
     }
 
 
     MOZ_MUST_USE bool
     supportsRoundInstruction(RoundingMode mode)
@@ -3935,28 +3935,28 @@ class BaseCompiler final : public BaseCo
     void prepareMemoryAccess(MemoryAccessDesc* access, AccessCheck* check, RegI32 tls, RegI32 ptr) {
 
         // Fold offset if necessary for further computations.
 
         if (access->offset() >= OffsetGuardLimit ||
             (access->isAtomic() && !check->omitAlignmentCheck && !check->onlyPointerAlignment))
         {
             masm.branchAdd32(Assembler::CarrySet, Imm32(access->offset()), ptr,
-                             trap(Trap::OutOfBounds));
+                             oldTrap(Trap::OutOfBounds));
             access->clearOffset();
             check->onlyPointerAlignment = true;
         }
 
         // Alignment check if required.
 
         if (access->isAtomic() && !check->omitAlignmentCheck) {
             MOZ_ASSERT(check->onlyPointerAlignment);
             // We only care about the low pointer bits here.
             masm.branchTest32(Assembler::NonZero, ptr, Imm32(access->byteSize() - 1),
-                              trap(Trap::UnalignedAccess));
+                              oldTrap(Trap::UnalignedAccess));
         }
 
         // Ensure no tls if we don't need it.
 
 #ifdef WASM_HUGE_MEMORY
         // We have HeapReg and no bounds checking and need load neither
         // memoryBase nor boundsCheckLimit from tls.
         MOZ_ASSERT_IF(check->omitBoundsCheck, tls.isInvalid());
@@ -3967,17 +3967,17 @@ class BaseCompiler final : public BaseCo
 #endif
 
         // Bounds check if required.
 
 #ifndef WASM_HUGE_MEMORY
         if (!check->omitBoundsCheck) {
             masm.wasmBoundsCheck(Assembler::AboveOrEqual, ptr,
                                  Address(tls, offsetof(TlsData, boundsCheckLimit)),
-                                 trap(Trap::OutOfBounds));
+                                 oldTrap(Trap::OutOfBounds));
         }
 #endif
     }
 
 #if defined(JS_CODEGEN_X64) || defined(JS_CODEGEN_ARM)
     BaseIndex prepareAtomicMemoryAccess(MemoryAccessDesc* access, AccessCheck* check, RegI32 tls,
                                         RegI32 ptr)
     {
@@ -4900,21 +4900,21 @@ class BaseCompiler final : public BaseCo
     bool done() const {
         return iter_.done();
     }
 
     BytecodeOffset bytecodeOffset() const {
         return iter_.bytecodeOffset();
     }
 
-    TrapDesc trap(Trap t) const {
+    OldTrapDesc oldTrap(Trap t) const {
         // Use masm.framePushed() because the value needed by the trap machinery
         // is the size of the frame overall, not the height of the stack area of
         // the frame.
-        return TrapDesc(bytecodeOffset(), t, masm.framePushed());
+        return OldTrapDesc(bytecodeOffset(), t, masm.framePushed());
     }
 
     ////////////////////////////////////////////////////////////
     //
     // Machinery for optimized conditional branches.
     //
     // To disable this optimization it is enough always to return false from
     // sniffConditionalControl{Cmp,Eqz}.
@@ -8390,17 +8390,17 @@ BaseCompiler::emitWait(ValType type, uin
         emitInstanceCall(lineOrBytecode, SigPIIL_, ExprType::I32, SymbolicAddress::WaitI32);
         break;
       case ValType::I64:
         emitInstanceCall(lineOrBytecode, SigPILL_, ExprType::I32, SymbolicAddress::WaitI64);
         break;
       default:
         MOZ_CRASH();
     }
-    masm.branchTest32(Assembler::Signed, ReturnReg, ReturnReg, trap(Trap::ThrowReported));
+    masm.branchTest32(Assembler::Signed, ReturnReg, ReturnReg, oldTrap(Trap::ThrowReported));
 
     return true;
 }
 
 bool
 BaseCompiler::emitWake()
 {
     uint32_t lineOrBytecode = readCallSiteLineOrBytecode();
@@ -8409,17 +8409,17 @@ BaseCompiler::emitWake()
     LinearMemoryAddress<Nothing> addr;
     if (!iter_.readWake(&addr, &nothing))
         return false;
 
     if (deadCode_)
         return true;
 
     emitInstanceCall(lineOrBytecode, SigPII_, ExprType::I32, SymbolicAddress::Wake);
-    masm.branchTest32(Assembler::Signed, ReturnReg, ReturnReg, trap(Trap::ThrowReported));
+    masm.branchTest32(Assembler::Signed, ReturnReg, ReturnReg, oldTrap(Trap::ThrowReported));
 
     return true;
 }
 
 bool
 BaseCompiler::emitBody()
 {
     if (!iter_.readFunctionStart(sig().ret()))
--- a/js/src/wasm/WasmBuiltins.cpp
+++ b/js/src/wasm/WasmBuiltins.cpp
@@ -229,17 +229,17 @@ WasmHandleThrow()
 {
     JitActivation* activation = CallingActivation();
     JSContext* cx = activation->cx();
     WasmFrameIter iter(activation);
     return HandleThrow(cx, iter);
 }
 
 static void
-WasmReportTrap(int32_t trapIndex)
+WasmOldReportTrap(int32_t trapIndex)
 {
     JSContext* cx = TlsContext.get();
 
     MOZ_ASSERT(trapIndex < int32_t(Trap::Limit) && trapIndex >= 0);
     Trap trap = Trap(trapIndex);
 
     unsigned errorNumber;
     switch (trap) {
@@ -434,19 +434,19 @@ AddressOf(SymbolicAddress imm, ABIFuncti
         *abiType = Args_General0;
         return FuncCast(WasmHandleExecutionInterrupt, *abiType);
       case SymbolicAddress::HandleDebugTrap:
         *abiType = Args_General0;
         return FuncCast(WasmHandleDebugTrap, *abiType);
       case SymbolicAddress::HandleThrow:
         *abiType = Args_General0;
         return FuncCast(WasmHandleThrow, *abiType);
-      case SymbolicAddress::ReportTrap:
+      case SymbolicAddress::OldReportTrap:
         *abiType = Args_General1;
-        return FuncCast(WasmReportTrap, *abiType);
+        return FuncCast(WasmOldReportTrap, *abiType);
       case SymbolicAddress::ReportOutOfBounds:
         *abiType = Args_General0;
         return FuncCast(WasmReportOutOfBounds, *abiType);
       case SymbolicAddress::ReportUnalignedAccess:
         *abiType = Args_General0;
         return FuncCast(WasmReportUnalignedAccess, *abiType);
       case SymbolicAddress::CallImport_Void:
         *abiType = Args_General4;
@@ -590,17 +590,17 @@ bool
 wasm::NeedsBuiltinThunk(SymbolicAddress sym)
 {
     // Some functions don't want to a thunk, because they already have one or
     // they don't have frame info.
     switch (sym) {
       case SymbolicAddress::HandleExecutionInterrupt: // GenerateInterruptExit
       case SymbolicAddress::HandleDebugTrap:          // GenerateDebugTrapStub
       case SymbolicAddress::HandleThrow:              // GenerateThrowStub
-      case SymbolicAddress::ReportTrap:               // GenerateTrapExit
+      case SymbolicAddress::OldReportTrap:            // GenerateOldTrapExit
       case SymbolicAddress::ReportOutOfBounds:        // GenerateOutOfBoundsExit
       case SymbolicAddress::ReportUnalignedAccess:    // GeneratesUnalignedExit
       case SymbolicAddress::CallImport_Void:          // GenerateImportInterpExit
       case SymbolicAddress::CallImport_I32:
       case SymbolicAddress::CallImport_I64:
       case SymbolicAddress::CallImport_F64:
       case SymbolicAddress::CoerceInPlace_ToInt32:    // GenerateImportJitExit
       case SymbolicAddress::CoerceInPlace_ToNumber:
@@ -886,18 +886,18 @@ wasm::EnsureBuiltinThunksInitialized()
     masm.executableCopy(thunks->codeBase, /* flushICache = */ false);
     memset(thunks->codeBase + masm.bytesNeeded(), 0, allocSize - masm.bytesNeeded());
 
     masm.processCodeLabels(thunks->codeBase);
 #ifdef DEBUG
     MOZ_ASSERT(masm.callSites().empty());
     MOZ_ASSERT(masm.callSiteTargets().empty());
     MOZ_ASSERT(masm.callFarJumps().empty());
-    MOZ_ASSERT(masm.trapSites().empty());
-    MOZ_ASSERT(masm.trapFarJumps().empty());
+    MOZ_ASSERT(masm.oldTrapSites().empty());
+    MOZ_ASSERT(masm.oldTrapFarJumps().empty());
     MOZ_ASSERT(masm.callFarJumps().empty());
     MOZ_ASSERT(masm.memoryAccesses().empty());
     MOZ_ASSERT(masm.symbolicAccesses().empty());
 #endif
 
     ExecutableAllocator::cacheFlush(thunks->codeBase, thunks->codeSize);
     if (!ExecutableAllocator::makeExecutable(thunks->codeBase, thunks->codeSize))
         return false;
--- a/js/src/wasm/WasmFrameIter.cpp
+++ b/js/src/wasm/WasmFrameIter.cpp
@@ -441,17 +441,17 @@ wasm::GenerateFunctionPrologue(MacroAsse
     // 'normalEntry' offsets since the difference must be less than UINT8_MAX
     // to be stored in CodeRange::funcBeginToNormalEntry_.
     masm.flushBuffer();
     masm.haltingAlign(CodeAlignment);
 
     // Generate table entry:
     offsets->begin = masm.currentOffset();
     BytecodeOffset trapOffset(0);  // ignored by masm.wasmEmitTrapOutOfLineCode
-    TrapDesc trap(trapOffset, Trap::IndirectCallBadSig, masm.framePushed());
+    OldTrapDesc trap(trapOffset, Trap::IndirectCallBadSig, masm.framePushed());
     switch (sigId.kind()) {
       case SigIdDesc::Kind::Global: {
         Register scratch = WasmTableCallScratchReg;
         masm.loadWasmGlobalPtr(sigId.globalDataOffset(), scratch);
         masm.branchPtr(Assembler::Condition::NotEqual, WasmTableCallSigReg, scratch, trap);
         break;
       }
       case SigIdDesc::Kind::Immediate: {
@@ -630,17 +630,17 @@ ProfilingFrameIterator::initFromExitFP(c
         fp = fp->callerFP;
         callerPC_ = fp->returnAddress;
         callerFP_ = fp->callerFP;
         AssertMatchesCallSite(callerPC_, callerFP_);
         break;
       case CodeRange::ImportJitExit:
       case CodeRange::ImportInterpExit:
       case CodeRange::BuiltinThunk:
-      case CodeRange::TrapExit:
+      case CodeRange::OldTrapExit:
       case CodeRange::DebugTrap:
       case CodeRange::OutOfBoundsExit:
       case CodeRange::UnalignedExit:
       case CodeRange::Throw:
       case CodeRange::Interrupt:
       case CodeRange::FarJumpIsland:
         MOZ_CRASH("Unexpected CodeRange kind");
     }
@@ -709,17 +709,17 @@ js::wasm::StartUnwinding(const RegisterS
     Frame* fixedFP = nullptr;
     void* fixedPC = nullptr;
     switch (codeRange->kind()) {
       case CodeRange::Function:
       case CodeRange::FarJumpIsland:
       case CodeRange::ImportJitExit:
       case CodeRange::ImportInterpExit:
       case CodeRange::BuiltinThunk:
-      case CodeRange::TrapExit:
+      case CodeRange::OldTrapExit:
       case CodeRange::DebugTrap:
 #if defined(JS_CODEGEN_MIPS32) || defined(JS_CODEGEN_MIPS64)
         if ((offsetFromEntry >= BeforePushRetAddr && offsetFromEntry < PushedFP) || codeRange->isThunk()) {
             // See BUG 1407986.
             // On MIPS push is emulated by two instructions: adjusting the sp
             // and storing the value to sp.
             // Execution might be interrupted in between the two operation so we
             // have to relay on register state instead of state saved on stack
@@ -908,17 +908,17 @@ ProfilingFrameIterator::operator++()
     codeRange_ = code_->lookupRange(callerPC_);
     MOZ_ASSERT(codeRange_);
 
     switch (codeRange_->kind()) {
       case CodeRange::Function:
       case CodeRange::ImportJitExit:
       case CodeRange::ImportInterpExit:
       case CodeRange::BuiltinThunk:
-      case CodeRange::TrapExit:
+      case CodeRange::OldTrapExit:
       case CodeRange::DebugTrap:
       case CodeRange::OutOfBoundsExit:
       case CodeRange::UnalignedExit:
       case CodeRange::FarJumpIsland:
         stackAddress_ = callerFP_;
         callerPC_ = callerFP_->returnAddress;
         AssertMatchesCallSite(callerPC_, callerFP_->callerFP);
         callerFP_ = callerFP_->callerFP;
@@ -936,17 +936,17 @@ ProfilingFrameIterator::operator++()
 static const char*
 ThunkedNativeToDescription(SymbolicAddress func)
 {
     MOZ_ASSERT(NeedsBuiltinThunk(func));
     switch (func) {
       case SymbolicAddress::HandleExecutionInterrupt:
       case SymbolicAddress::HandleDebugTrap:
       case SymbolicAddress::HandleThrow:
-      case SymbolicAddress::ReportTrap:
+      case SymbolicAddress::OldReportTrap:
       case SymbolicAddress::ReportOutOfBounds:
       case SymbolicAddress::ReportUnalignedAccess:
       case SymbolicAddress::CallImport_Void:
       case SymbolicAddress::CallImport_I32:
       case SymbolicAddress::CallImport_I64:
       case SymbolicAddress::CallImport_F64:
       case SymbolicAddress::CoerceInPlace_ToInt32:
       case SymbolicAddress::CoerceInPlace_ToNumber:
@@ -1066,17 +1066,17 @@ ProfilingFrameIterator::label() const
     }
 
     switch (codeRange_->kind()) {
       case CodeRange::Function:          return code_->profilingLabel(codeRange_->funcIndex());
       case CodeRange::InterpEntry:       return "slow entry trampoline (in wasm)";
       case CodeRange::ImportJitExit:     return importJitDescription;
       case CodeRange::BuiltinThunk:      return builtinNativeDescription;
       case CodeRange::ImportInterpExit:  return importInterpDescription;
-      case CodeRange::TrapExit:          return trapDescription;
+      case CodeRange::OldTrapExit:       return trapDescription;
       case CodeRange::DebugTrap:         return debugTrapDescription;
       case CodeRange::OutOfBoundsExit:   return "out-of-bounds stub (in wasm)";
       case CodeRange::UnalignedExit:     return "unaligned trap stub (in wasm)";
       case CodeRange::FarJumpIsland:     return "interstitial (in wasm)";
       case CodeRange::Throw:             MOZ_FALLTHROUGH;
       case CodeRange::Interrupt:         MOZ_CRASH("does not have a frame");
     }
 
--- a/js/src/wasm/WasmGenerator.cpp
+++ b/js/src/wasm/WasmGenerator.cpp
@@ -42,19 +42,19 @@ bool
 CompiledCode::swap(MacroAssembler& masm)
 {
     MOZ_ASSERT(bytes.empty());
     if (!masm.swapBuffer(bytes))
         return false;
 
     callSites.swap(masm.callSites());
     callSiteTargets.swap(masm.callSiteTargets());
-    trapSites.swap(masm.trapSites());
+    oldTrapSites.swap(masm.oldTrapSites());
     callFarJumps.swap(masm.callFarJumps());
-    trapFarJumps.swap(masm.trapFarJumps());
+    oldTrapFarJumps.swap(masm.oldTrapFarJumps());
     memoryAccesses.swap(masm.memoryAccesses());
     symbolicAccesses.swap(masm.symbolicAccesses());
     codeLabels.swap(masm.codeLabels());
     return true;
 }
 
 // ****************************************************************************
 // ModuleGenerator
@@ -70,28 +70,28 @@ ModuleGenerator::ModuleGenerator(const C
     cancelled_(cancelled),
     env_(env),
     linkDataTier_(nullptr),
     metadataTier_(nullptr),
     taskState_(mutexid::WasmCompileTaskState),
     lifo_(GENERATOR_LIFO_DEFAULT_CHUNK_SIZE),
     masmAlloc_(&lifo_),
     masm_(MacroAssembler::WasmToken(), masmAlloc_),
-    trapCodeOffsets_(),
+    oldTrapCodeOffsets_(),
     debugTrapCodeOffset_(),
     lastPatchedCallSite_(0),
     startOfUnpatchedCallsites_(0),
     parallel_(false),
     outstanding_(0),
     currentTask_(nullptr),
     batchedBytecode_(0),
     finishedFuncDefs_(false)
 {
     MOZ_ASSERT(IsCompilingWasm());
-    std::fill(trapCodeOffsets_.begin(), trapCodeOffsets_.end(), 0);
+    std::fill(oldTrapCodeOffsets_.begin(), oldTrapCodeOffsets_.end(), 0);
 }
 
 ModuleGenerator::~ModuleGenerator()
 {
     MOZ_ASSERT_IF(finishedFuncDefs_, !batchedBytecode_);
     MOZ_ASSERT_IF(finishedFuncDefs_, !currentTask_);
 
     if (parallel_) {
@@ -431,24 +431,24 @@ ModuleGenerator::linkCallSites()
                     return false;
                 if (!existingCallFarJumps.add(p, target.funcIndex(), offsets.begin))
                     return false;
             }
 
             masm_.patchCall(callerOffset, p->value());
             break;
           }
-          case CallSiteDesc::TrapExit: {
+          case CallSiteDesc::OldTrapExit: {
             if (!existingTrapFarJumps[target.trap()]) {
-                // See MacroAssembler::wasmEmitTrapOutOfLineCode for why we must
+                // See MacroAssembler::wasmEmitOldTrapOutOfLineCode for why we must
                 // reload the TLS register on this path.
                 Offsets offsets;
                 offsets.begin = masm_.currentOffset();
                 masm_.loadPtr(Address(FramePointer, offsetof(Frame, tls)), WasmTlsReg);
-                if (!trapFarJumps_.emplaceBack(target.trap(), masm_.farJumpWithPatch()))
+                if (!oldTrapFarJumps_.emplaceBack(target.trap(), masm_.farJumpWithPatch()))
                     return false;
                 offsets.end = masm_.currentOffset();
                 if (masm_.oom())
                     return false;
                 if (!metadataTier_->codeRanges.emplaceBack(CodeRange::FarJumpIsland, offsets))
                     return false;
                 existingTrapFarJumps[target.trap()] = Some(offsets.begin);
             }
@@ -498,19 +498,19 @@ ModuleGenerator::noteCodeRange(uint32_t 
         metadataTier_->lookupFuncExport(codeRange.funcIndex()).initInterpEntryOffset(codeRange.begin());
         break;
       case CodeRange::ImportJitExit:
         metadataTier_->funcImports[codeRange.funcIndex()].initJitExitOffset(codeRange.begin());
         break;
       case CodeRange::ImportInterpExit:
         metadataTier_->funcImports[codeRange.funcIndex()].initInterpExitOffset(codeRange.begin());
         break;
-      case CodeRange::TrapExit:
-        MOZ_ASSERT(!trapCodeOffsets_[codeRange.trap()]);
-        trapCodeOffsets_[codeRange.trap()] = codeRange.begin();
+      case CodeRange::OldTrapExit:
+        MOZ_ASSERT(!oldTrapCodeOffsets_[codeRange.trap()]);
+        oldTrapCodeOffsets_[codeRange.trap()] = codeRange.begin();
         break;
       case CodeRange::DebugTrap:
         MOZ_ASSERT(!debugTrapCodeOffset_);
         debugTrapCodeOffset_ = codeRange.begin();
         break;
       case CodeRange::OutOfBoundsExit:
         MOZ_ASSERT(!linkDataTier_->outOfBoundsOffset);
         linkDataTier_->outOfBoundsOffset = codeRange.begin();
@@ -575,20 +575,20 @@ ModuleGenerator::linkCompiledCode(const 
 
     auto callSiteOp = [=](uint32_t, CallSite* cs) { cs->offsetBy(offsetInModule); };
     if (!AppendForEach(&metadataTier_->callSites, code.callSites, callSiteOp))
         return false;
 
     if (!callSiteTargets_.appendAll(code.callSiteTargets))
         return false;
 
-    MOZ_ASSERT(code.trapSites.empty());
+    MOZ_ASSERT(code.oldTrapSites.empty());
 
-    auto trapFarJumpOp = [=](uint32_t, TrapFarJump* tfj) { tfj->offsetBy(offsetInModule); };
-    if (!AppendForEach(&trapFarJumps_, code.trapFarJumps, trapFarJumpOp))
+    auto trapFarJumpOp = [=](uint32_t, OldTrapFarJump* tfj) { tfj->offsetBy(offsetInModule); };
+    if (!AppendForEach(&oldTrapFarJumps_, code.oldTrapFarJumps, trapFarJumpOp))
         return false;
 
     auto callFarJumpOp = [=](uint32_t, CallFarJump* cfj) { cfj->offsetBy(offsetInModule); };
     if (!AppendForEach(&callFarJumps_, code.callFarJumps, callFarJumpOp))
         return false;
 
     auto memoryOp = [=](uint32_t, MemoryAccess* ma) { ma->offsetBy(offsetInModule); };
     if (!AppendForEach(&metadataTier_->memoryAccesses, code.memoryAccesses, memoryOp))
@@ -783,28 +783,28 @@ ModuleGenerator::finishCode()
     // can emit tiny far-jump stubs, so there is an ordering dependency here.
 
     if (!linkCallSites())
         return false;
 
     for (CallFarJump far : callFarJumps_)
         masm_.patchFarJump(far.jump, funcCodeRange(far.funcIndex).funcNormalEntry());
 
-    for (TrapFarJump far : trapFarJumps_)
-        masm_.patchFarJump(far.jump, trapCodeOffsets_[far.trap]);
+    for (OldTrapFarJump far : oldTrapFarJumps_)
+        masm_.patchFarJump(far.jump, oldTrapCodeOffsets_[far.trap]);
 
     for (CodeOffset farJump : debugTrapFarJumps_)
         masm_.patchFarJump(farJump, debugTrapCodeOffset_);
 
     // None of the linking or far-jump operations should emit masm metadata.
 
     MOZ_ASSERT(masm_.callSites().empty());
     MOZ_ASSERT(masm_.callSiteTargets().empty());
-    MOZ_ASSERT(masm_.trapSites().empty());
-    MOZ_ASSERT(masm_.trapFarJumps().empty());
+    MOZ_ASSERT(masm_.oldTrapSites().empty());
+    MOZ_ASSERT(masm_.oldTrapFarJumps().empty());
     MOZ_ASSERT(masm_.callFarJumps().empty());
     MOZ_ASSERT(masm_.memoryAccesses().empty());
     MOZ_ASSERT(masm_.symbolicAccesses().empty());
     MOZ_ASSERT(masm_.codeLabels().empty());
 
     masm_.finish();
     return !masm_.oom();
 }
--- a/js/src/wasm/WasmGenerator.h
+++ b/js/src/wasm/WasmGenerator.h
@@ -59,46 +59,46 @@ typedef Vector<FuncCompileInput, 8, Syst
 // input functions or stubs.
 
 struct CompiledCode
 {
     Bytes                bytes;
     CodeRangeVector      codeRanges;
     CallSiteVector       callSites;
     CallSiteTargetVector callSiteTargets;
-    TrapSiteVector       trapSites;
-    TrapFarJumpVector    trapFarJumps;
+    OldTrapSiteVector    oldTrapSites;
+    OldTrapFarJumpVector oldTrapFarJumps;
     CallFarJumpVector    callFarJumps;
     MemoryAccessVector   memoryAccesses;
     SymbolicAccessVector symbolicAccesses;
     jit::CodeLabelVector codeLabels;
 
     MOZ_MUST_USE bool swap(jit::MacroAssembler& masm);
 
     void clear() {
         bytes.clear();
         codeRanges.clear();
         callSites.clear();
         callSiteTargets.clear();
-        trapSites.clear();
-        trapFarJumps.clear();
+        oldTrapSites.clear();
+        oldTrapFarJumps.clear();
         callFarJumps.clear();
         memoryAccesses.clear();
         symbolicAccesses.clear();
         codeLabels.clear();
         MOZ_ASSERT(empty());
     }
 
     bool empty() {
         return bytes.empty() &&
                codeRanges.empty() &&
                callSites.empty() &&
                callSiteTargets.empty() &&
-               trapSites.empty() &&
-               trapFarJumps.empty() &&
+               oldTrapSites.empty() &&
+               oldTrapFarJumps.empty() &&
                callFarJumps.empty() &&
                memoryAccesses.empty() &&
                symbolicAccesses.empty() &&
                codeLabels.empty();
     }
 };
 
 // The CompileTaskState of a ModuleGenerator contains the mutable state shared
@@ -140,17 +140,17 @@ struct CompileTask
 // lifetime of a ModuleGenerator, a sequence of FunctionGenerators are created
 // and destroyed to compile the individual function bodies. After generating all
 // functions, ModuleGenerator::finish() must be called to complete the
 // compilation and extract the resulting wasm module.
 
 class MOZ_STACK_CLASS ModuleGenerator
 {
     typedef Vector<CompileTask, 0, SystemAllocPolicy> CompileTaskVector;
-    typedef EnumeratedArray<Trap, Trap::Limit, uint32_t> Uint32TrapArray;
+    typedef EnumeratedArray<Trap, Trap::Limit, uint32_t> OldTrapOffsetArray;
     typedef Vector<jit::CodeOffset, 0, SystemAllocPolicy> CodeOffsetVector;
 
     // Constant parameters
     SharedCompileArgs const         compileArgs_;
     UniqueChars* const              error_;
     const Atomic<bool>* const       cancelled_;
     ModuleEnvironment* const        env_;
 
@@ -163,19 +163,19 @@ class MOZ_STACK_CLASS ModuleGenerator
 
     // Data scoped to the ModuleGenerator's lifetime
     ExclusiveCompileTaskState       taskState_;
     LifoAlloc                       lifo_;
     jit::JitContext                 jcx_;
     jit::TempAllocator              masmAlloc_;
     jit::MacroAssembler             masm_;
     Uint32Vector                    funcToCodeRange_;
-    Uint32TrapArray                 trapCodeOffsets_;
+    OldTrapOffsetArray              oldTrapCodeOffsets_;
     uint32_t                        debugTrapCodeOffset_;
-    TrapFarJumpVector               trapFarJumps_;
+    OldTrapFarJumpVector            oldTrapFarJumps_;
     CallFarJumpVector               callFarJumps_;
     CallSiteTargetVector            callSiteTargets_;
     uint32_t                        lastPatchedCallSite_;
     uint32_t                        startOfUnpatchedCallsites_;
     CodeOffsetVector                debugTrapFarJumps_;
 
     // Parallel compilation
     bool                            parallel_;
--- a/js/src/wasm/WasmStubs.cpp
+++ b/js/src/wasm/WasmStubs.cpp
@@ -528,17 +528,17 @@ GenerateImportFunction(jit::MacroAssembl
     masm.wasmCallImport(desc, CalleeDesc::import(fi.tlsDataOffset()));
 
     // Restore the TLS register and pinned regs, per wasm function ABI.
     masm.loadWasmTlsRegFromFrame();
     masm.loadWasmPinnedRegsFromTls();
 
     GenerateFunctionEpilogue(masm, framePushed, offsets);
 
-    masm.wasmEmitTrapOutOfLineCode();
+    masm.wasmEmitOldTrapOutOfLineCode();
 
     return FinishOffsets(masm, offsets);
 }
 
 static const unsigned STUBS_LIFO_DEFAULT_CHUNK_SIZE = 4 * 1024;
 
 bool
 wasm::GenerateImportFunctions(const ModuleEnvironment& env, const FuncImportVector& imports,
@@ -996,22 +996,22 @@ wasm::GenerateBuiltinThunk(MacroAssemble
     if (!UseHardFpABI() && IsFloatingPointType(retType))
         masm.ma_vxfer(r0, r1, d0);
 #endif
 
     GenerateExitEpilogue(masm, framePushed, exitReason, offsets);
     return FinishOffsets(masm, offsets);
 }
 
-// Generate a stub that calls into ReportTrap with the right trap reason.
+// Generate a stub that calls into WasmOldReportTrap with the right trap reason.
 // This stub is called with ABIStackAlignment by a trap out-of-line path. An
 // exit prologue/epilogue is used so that stack unwinding picks up the
 // current JitActivation. Unwinding will begin at the caller of this trap exit.
 static bool
-GenerateTrapExit(MacroAssembler& masm, Trap trap, Label* throwLabel, CallableOffsets* offsets)
+GenerateOldTrapExit(MacroAssembler& masm, Trap trap, Label* throwLabel, CallableOffsets* offsets)
 {
     masm.haltingAlign(CodeAlignment);
 
     masm.setFramePushed(0);
 
     MIRTypeVector args;
     MOZ_ALWAYS_TRUE(args.append(MIRType::Int32));
 
@@ -1023,17 +1023,17 @@ GenerateTrapExit(MacroAssembler& masm, T
     if (i->kind() == ABIArg::GPR)
         masm.move32(Imm32(int32_t(trap)), i->gpr());
     else
         masm.store32(Imm32(int32_t(trap)), Address(masm.getStackPointer(), i->offsetFromArgBase()));
     i++;
     MOZ_ASSERT(i.done());
 
     masm.assertStackAlignment(ABIStackAlignment);
-    masm.call(SymbolicAddress::ReportTrap);
+    masm.call(SymbolicAddress::OldReportTrap);
 
     masm.jump(throwLabel);
 
     GenerateExitEpilogue(masm, framePushed, ExitReason::Fixed::Trap, offsets);
 
     return FinishOffsets(masm, offsets);
 }
 
@@ -1364,17 +1364,17 @@ wasm::GenerateStubs(const ModuleEnvironm
         if (!GenerateInterpEntry(masm, fe, &offsets))
             return false;
         if (!code->codeRanges.emplaceBack(CodeRange::InterpEntry, fe.funcIndex(), offsets))
             return false;
     }
 
     for (Trap trap : MakeEnumeratedRange(Trap::Limit)) {
         CallableOffsets offsets;
-        if (!GenerateTrapExit(masm, trap, &throwLabel, &offsets))
+        if (!GenerateOldTrapExit(masm, trap, &throwLabel, &offsets))
             return false;
         if (!code->codeRanges.emplaceBack(trap, offsets))
             return false;
     }
 
     Offsets offsets;
 
     if (!GenerateOutOfBoundsExit(masm, &throwLabel, &offsets))
--- a/js/src/wasm/WasmTypes.cpp
+++ b/js/src/wasm/WasmTypes.cpp
@@ -723,17 +723,17 @@ CodeRange::CodeRange(Kind kind, Callable
     end_(offsets.end),
     kind_(kind)
 {
     MOZ_ASSERT(begin_ < ret_);
     MOZ_ASSERT(ret_ < end_);
     PodZero(&u);
 #ifdef DEBUG
     switch (kind_) {
-      case TrapExit:
+      case OldTrapExit:
       case DebugTrap:
       case BuiltinThunk:
         break;
       default:
         MOZ_CRASH("should use more specific constructor");
     }
 #endif
 }
@@ -768,17 +768,17 @@ CodeRange::CodeRange(uint32_t funcIndex,
     MOZ_ASSERT(jitExitUntrustedFPStart() == offsets.untrustedFPStart);
     MOZ_ASSERT(jitExitUntrustedFPEnd() == offsets.untrustedFPEnd);
 }
 
 CodeRange::CodeRange(Trap trap, CallableOffsets offsets)
   : begin_(offsets.begin),
     ret_(offsets.ret),
     end_(offsets.end),
-    kind_(TrapExit)
+    kind_(OldTrapExit)
 {
     MOZ_ASSERT(begin_ < ret_);
     MOZ_ASSERT(ret_ < end_);
     u.trap_ = trap;
 }
 
 CodeRange::CodeRange(uint32_t funcIndex, uint32_t funcLineOrBytecode, FuncOffsets offsets)
   : begin_(offsets.begin),
--- a/js/src/wasm/WasmTypes.h
+++ b/js/src/wasm/WasmTypes.h
@@ -1006,17 +1006,17 @@ class CodeRange
 {
   public:
     enum Kind {
         Function,          // function definition
         InterpEntry,       // calls into wasm from C++
         ImportJitExit,     // fast-path calling from wasm into JIT code
         ImportInterpExit,  // slow-path calling from wasm into C++ interp
         BuiltinThunk,      // fast-path calling from wasm into a C++ native
-        TrapExit,          // calls C++ to report and jumps to throw stub
+        OldTrapExit,       // calls C++ to report and jumps to throw stub
         DebugTrap,         // calls C++ to handle debug event
         FarJumpIsland,     // inserted to connect otherwise out-of-range insns
         OutOfBoundsExit,   // stub jumped to by non-standard asm.js SIMD/Atomics
         UnalignedExit,     // stub jumped to by wasm Atomics and non-standard
                            // ARM unaligned trap
         Interrupt,         // stub executes asynchronously to interrupt wasm
         Throw              // special stack-unwinding stub jumped to by other stubs
     };
@@ -1082,17 +1082,17 @@ class CodeRange
     }
     bool isImportExit() const {
         return kind() == ImportJitExit || kind() == ImportInterpExit || kind() == BuiltinThunk;
     }
     bool isImportJitExit() const {
         return kind() == ImportJitExit;
     }
     bool isTrapExit() const {
-        return kind() == TrapExit;
+        return kind() == OldTrapExit;
     }
     bool isDebugTrap() const {
         return kind() == DebugTrap;
     }
     bool isThunk() const {
         return kind() == FarJumpIsland;
     }
 
@@ -1182,22 +1182,22 @@ LookupInSorted(const CodeRangeVector& co
 // A wrapper around the bytecode offset of a wasm instruction within a whole
 // module, used for trap offsets or call offsets. These offsets should refer to
 // the first byte of the instruction that triggered the trap / did the call and
 // should ultimately derive from OpIter::bytecodeOffset.
 
 struct BytecodeOffset
 {
     static const uint32_t INVALID = -1;
-    uint32_t bytecodeOffset;
+    uint32_t offset;
 
-    BytecodeOffset() : bytecodeOffset(INVALID) {}
-    explicit BytecodeOffset(uint32_t bytecodeOffset) : bytecodeOffset(bytecodeOffset) {}
+    BytecodeOffset() : offset(INVALID) {}
+    explicit BytecodeOffset(uint32_t offset) : offset(offset) {}
 
-    bool isValid() const { return bytecodeOffset != INVALID; }
+    bool isValid() const { return offset != INVALID; }
 };
 
 // While the frame-pointer chain allows the stack to be unwound without
 // metadata, Error.stack still needs to know the line/column of every call in
 // the chain. A CallSiteDesc describes a single callsite to which CallSite adds
 // the metadata necessary to walk up to the next frame. Lastly CallSiteAndTarget
 // adds the function index of the callee.
 
@@ -1205,17 +1205,17 @@ class CallSiteDesc
 {
     uint32_t lineOrBytecode_ : 29;
     uint32_t kind_ : 3;
   public:
     enum Kind {
         Func,       // pc-relative call to a specific function
         Dynamic,    // dynamic callee called via register
         Symbolic,   // call to a single symbolic callee
-        TrapExit,   // call to a trap exit
+        OldTrapExit,// call to a trap exit (being removed)
         EnterFrame, // call to a enter frame handler
         LeaveFrame, // call to a leave frame handler
         Breakpoint  // call to instruction breakpoint
     };
     CallSiteDesc() {}
     explicit CallSiteDesc(Kind kind)
       : lineOrBytecode_(0), kind_(kind)
     {
@@ -1328,17 +1328,17 @@ enum class SymbolicAddress
     NearbyIntF,
     ExpD,
     LogD,
     PowD,
     ATan2D,
     HandleExecutionInterrupt,
     HandleDebugTrap,
     HandleThrow,
-    ReportTrap,
+    OldReportTrap,
     ReportOutOfBounds,
     ReportUnalignedAccess,
     CallImport_Void,
     CallImport_I32,
     CallImport_I64,
     CallImport_F64,
     CoerceInPlace_ToInt32,
     CoerceInPlace_ToNumber,