Bug 1509848: Cleanups in Baldrdash code; r=lth
authorBenjamin Bouvier <benj@benj.me>
Fri, 16 Nov 2018 18:57:42 +0100
changeset 507502 fc064fbbcdf011cb2028f36b7afec810e64a865c
parent 507501 ecf218f8c16a46fecbcf7e24c2e862b726a0c020
child 507503 6c94d53b486c1140051607b71bf66c0e014c605c
push id1905
push userffxbld-merge
push dateMon, 21 Jan 2019 12:33:13 +0000
treeherdermozilla-release@c2fca1944d8c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerslth
bugs1509848
milestone65.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 1509848: Cleanups in Baldrdash code; r=lth
js/src/jit/MacroAssembler.h
js/src/wasm/WasmCraneliftCompile.cpp
js/src/wasm/cranelift/src/wasm2clif.rs
--- a/js/src/jit/MacroAssembler.h
+++ b/js/src/jit/MacroAssembler.h
@@ -1608,17 +1608,18 @@ class MacroAssembler : public MacroAssem
                                       wasm::BytecodeOffset off, Label* rejoin)
         DEFINED_ON(arm, arm64, x86_shared, mips_shared);
 
     // This function takes care of loading the callee's TLS and pinned regs but
     // it is the caller's responsibility to save/restore TLS or pinned regs.
     void wasmCallImport(const wasm::CallSiteDesc& desc, const wasm::CalleeDesc& callee);
 
     // WasmTableCallIndexReg must contain the index of the indirect call.
-    void wasmCallIndirect(const wasm::CallSiteDesc& desc, const wasm::CalleeDesc& callee, bool needsBoundsCheck);
+    void wasmCallIndirect(const wasm::CallSiteDesc& desc, const wasm::CalleeDesc& callee,
+                          bool needsBoundsCheck);
 
     // This function takes care of loading the pointer to the current instance
     // 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);
 
     // As enterFakeExitFrame(), but using register conventions appropriate for
--- a/js/src/wasm/WasmCraneliftCompile.cpp
+++ b/js/src/wasm/WasmCraneliftCompile.cpp
@@ -279,16 +279,17 @@ wasm::CraneliftCompileFunctions(const Mo
                                 LifoAlloc& lifo,
                                 const FuncCompileInputVector& inputs,
                                 CompiledCode* code,
                                 ExclusiveDeferredValidationState& dvs,
                                 UniqueChars* error)
 {
     MOZ_ASSERT(env.tier() == Tier::Optimized);
     MOZ_ASSERT(env.optimizedBackend() == OptimizedBackend::Cranelift);
+    MOZ_ASSERT(!env.isAsmJS());
 
     AutoCranelift compiler(env);
     if (!compiler.init()) {
         return false;
     }
 
     TempAllocator alloc(&lifo);
     JitContext jitContext(&alloc);
--- a/js/src/wasm/cranelift/src/wasm2clif.rs
+++ b/js/src/wasm/cranelift/src/wasm2clif.rs
@@ -525,17 +525,16 @@ impl<'a, 'b, 'c> FuncEnvironment for Tra
         table: ir::Table,
         sig_index: SignatureIndex,
         sig_ref: ir::SigRef,
         callee: ir::Value,
         call_args: &[ir::Value],
     ) -> WasmResult<ir::Inst> {
         let wsig = self.env.signature(sig_index);
 
-        // TODO: When compiling asm.js, the table index in inferred from the signature index.
         // Currently, WebAssembly doesn't support multiple tables. That may change.
         assert_eq!(table_index.index(), 0);
         let wtable = self.get_table(pos.func, table_index);
 
         // Follows `MacroAssembler::wasmCallIndirect`:
 
         // 1. Materialize the signature ID.
         let sigid_value = match wsig.id_kind() {