From eb4fb58bdc458a7092371e7f78e6b34b627a2268 Mon Sep 17 00:00:00 2001 From: Benjamin Bouvier Date: Wed, 13 Jul 2016 16:44:43 +0200 Subject: [PATCH] Bug 1286517: Rename AsmJS{Load,Store}GlobalVar to Wasm{Load,Store}GlobalVar; r=luke MozReview-Commit-ID: E7vPsXm1WDs --HG-- extra : rebase_source : fe1d7e145352b0ba445e4633a1e9c3507eef28f7 extra : histedit_source : def439dcbda77437fdf9cbc0f76e4d9d18e52379 --- js/src/asmjs/WasmBaselineCompile.cpp | 36 +++++++------- js/src/asmjs/WasmGenerator.cpp | 8 ++-- js/src/asmjs/WasmIonCompile.cpp | 4 +- js/src/asmjs/WasmStubs.cpp | 4 +- js/src/jit/AliasAnalysisShared.cpp | 4 +- js/src/jit/Lowering.cpp | 8 ++-- js/src/jit/Lowering.h | 4 +- js/src/jit/MIR.cpp | 23 +++++---- js/src/jit/MIR.h | 12 ++--- js/src/jit/MOpcodes.h | 4 +- js/src/jit/arm/CodeGenerator-arm.cpp | 10 ++-- js/src/jit/arm/CodeGenerator-arm.h | 4 +- js/src/jit/arm64/CodeGenerator-arm64.cpp | 8 ++-- js/src/jit/arm64/CodeGenerator-arm64.h | 5 +- .../mips-shared/CodeGenerator-mips-shared.cpp | 8 ++-- .../mips-shared/CodeGenerator-mips-shared.h | 4 +- js/src/jit/shared/Assembler-shared.h | 48 ++++++++++++------- js/src/jit/shared/LIR-shared.h | 18 +++---- js/src/jit/shared/LOpcodes-shared.h | 4 +- js/src/jit/x64/Assembler-x64.h | 4 +- js/src/jit/x64/CodeGenerator-x64.cpp | 20 ++++---- js/src/jit/x64/CodeGenerator-x64.h | 4 +- js/src/jit/x86/Assembler-x86.h | 2 +- js/src/jit/x86/CodeGenerator-x86.cpp | 20 ++++---- js/src/jit/x86/CodeGenerator-x86.h | 4 +- 25 files changed, 141 insertions(+), 129 deletions(-) diff --git a/js/src/asmjs/WasmBaselineCompile.cpp b/js/src/asmjs/WasmBaselineCompile.cpp index 62777dbdbe43..16fd52f886e7 100644 --- a/js/src/asmjs/WasmBaselineCompile.cpp +++ b/js/src/asmjs/WasmBaselineCompile.cpp @@ -2062,7 +2062,7 @@ class BaseCompiler { ScratchI32 scratch(*this); CodeOffset label = masm.loadRipRelativeInt64(scratch); - masm.append(AsmJSGlobalAccess(label, globalDataOffset)); + masm.append(GlobalAccess(label, globalDataOffset)); masm.loadPtr(Operand(scratch, ptrReg, ScalePointer, 0), ptrReg); } #elif defined(JS_CODEGEN_X86) @@ -2070,7 +2070,7 @@ class BaseCompiler { ScratchI32 scratch(*this); CodeOffset label = masm.movlWithPatch(PatchedAbsoluteAddress(), scratch); - masm.append(AsmJSGlobalAccess(label, globalDataOffset)); + masm.append(GlobalAccess(label, globalDataOffset)); masm.loadPtr(Operand(scratch, ptrReg, ScalePointer), ptrReg); } #else @@ -2089,11 +2089,11 @@ class BaseCompiler #if defined(JS_CODEGEN_X64) // CodeGeneratorX64::visitAsmJSLoadFFIFunc() CodeOffset label = masm.loadRipRelativeInt64(ptrReg); - masm.append(AsmJSGlobalAccess(label, globalDataOffset)); + masm.append(GlobalAccess(label, globalDataOffset)); #elif defined(JS_CODEGEN_X86) // CodeGeneratorX86::visitAsmJSLoadFFIFunc() CodeOffset label = masm.movlWithPatch(PatchedAbsoluteAddress(), ptrReg); - masm.append(AsmJSGlobalAccess(label, globalDataOffset)); + masm.append(GlobalAccess(label, globalDataOffset)); #else MOZ_CRASH("BaseCompiler platform hook: ffiCall"); #endif @@ -2665,10 +2665,10 @@ class BaseCompiler { #if defined(JS_CODEGEN_X64) CodeOffset label = masm.loadRipRelativeInt32(r.reg); - masm.append(AsmJSGlobalAccess(label, globalDataOffset)); + masm.append(GlobalAccess(label, globalDataOffset)); #elif defined(JS_CODEGEN_X86) CodeOffset label = masm.movlWithPatch(PatchedAbsoluteAddress(), r.reg); - masm.append(AsmJSGlobalAccess(label, globalDataOffset)); + masm.append(GlobalAccess(label, globalDataOffset)); #else MOZ_CRASH("BaseCompiler platform hook: loadGlobalVarI32"); #endif @@ -2678,7 +2678,7 @@ class BaseCompiler { #if defined(JS_CODEGEN_X64) CodeOffset label = masm.loadRipRelativeInt64(r.reg.reg); - masm.append(AsmJSGlobalAccess(label, globalDataOffset)); + masm.append(GlobalAccess(label, globalDataOffset)); #else MOZ_CRASH("BaseCompiler platform hook: loadGlobalVarI64"); #endif @@ -2688,10 +2688,10 @@ class BaseCompiler { #if defined(JS_CODEGEN_X64) CodeOffset label = masm.loadRipRelativeFloat32(r.reg); - masm.append(AsmJSGlobalAccess(label, globalDataOffset)); + masm.append(GlobalAccess(label, globalDataOffset)); #elif defined(JS_CODEGEN_X86) CodeOffset label = masm.vmovssWithPatch(PatchedAbsoluteAddress(), r.reg); - masm.append(AsmJSGlobalAccess(label, globalDataOffset)); + masm.append(GlobalAccess(label, globalDataOffset)); #else MOZ_CRASH("BaseCompiler platform hook: loadGlobalVarF32"); #endif @@ -2701,10 +2701,10 @@ class BaseCompiler { #if defined(JS_CODEGEN_X64) CodeOffset label = masm.loadRipRelativeDouble(r.reg); - masm.append(AsmJSGlobalAccess(label, globalDataOffset)); + masm.append(GlobalAccess(label, globalDataOffset)); #elif defined(JS_CODEGEN_X86) CodeOffset label = masm.vmovsdWithPatch(PatchedAbsoluteAddress(), r.reg); - masm.append(AsmJSGlobalAccess(label, globalDataOffset)); + masm.append(GlobalAccess(label, globalDataOffset)); #else MOZ_CRASH("BaseCompiler platform hook: loadGlobalVarF32"); #endif @@ -2716,10 +2716,10 @@ class BaseCompiler { #if defined(JS_CODEGEN_X64) CodeOffset label = masm.storeRipRelativeInt32(r.reg); - masm.append(AsmJSGlobalAccess(label, globalDataOffset)); + masm.append(GlobalAccess(label, globalDataOffset)); #elif defined(JS_CODEGEN_X86) CodeOffset label = masm.movlWithPatch(r.reg, PatchedAbsoluteAddress()); - masm.append(AsmJSGlobalAccess(label, globalDataOffset)); + masm.append(GlobalAccess(label, globalDataOffset)); #else MOZ_CRASH("BaseCompiler platform hook: storeGlobalVarI32"); #endif @@ -2729,7 +2729,7 @@ class BaseCompiler { #if defined(JS_CODEGEN_X64) CodeOffset label = masm.storeRipRelativeInt64(r.reg.reg); - masm.append(AsmJSGlobalAccess(label, globalDataOffset)); + masm.append(GlobalAccess(label, globalDataOffset)); #else MOZ_CRASH("BaseCompiler platform hook: storeGlobalVarI64"); #endif @@ -2739,10 +2739,10 @@ class BaseCompiler { #if defined(JS_CODEGEN_X64) CodeOffset label = masm.storeRipRelativeFloat32(r.reg); - masm.append(AsmJSGlobalAccess(label, globalDataOffset)); + masm.append(GlobalAccess(label, globalDataOffset)); #elif defined(JS_CODEGEN_X86) CodeOffset label = masm.vmovssWithPatch(r.reg, PatchedAbsoluteAddress()); - masm.append(AsmJSGlobalAccess(label, globalDataOffset)); + masm.append(GlobalAccess(label, globalDataOffset)); #else MOZ_CRASH("BaseCompiler platform hook: storeGlobalVarF32"); #endif @@ -2752,10 +2752,10 @@ class BaseCompiler { #if defined(JS_CODEGEN_X64) CodeOffset label = masm.storeRipRelativeDouble(r.reg); - masm.append(AsmJSGlobalAccess(label, globalDataOffset)); + masm.append(GlobalAccess(label, globalDataOffset)); #elif defined(JS_CODEGEN_X86) CodeOffset label = masm.vmovsdWithPatch(r.reg, PatchedAbsoluteAddress()); - masm.append(AsmJSGlobalAccess(label, globalDataOffset)); + masm.append(GlobalAccess(label, globalDataOffset)); #else MOZ_CRASH("BaseCompiler platform hook: storeGlobalVarF64"); #endif diff --git a/js/src/asmjs/WasmGenerator.cpp b/js/src/asmjs/WasmGenerator.cpp index 13767b8212eb..64ee846f2784 100644 --- a/js/src/asmjs/WasmGenerator.cpp +++ b/js/src/asmjs/WasmGenerator.cpp @@ -517,8 +517,7 @@ ModuleGenerator::finishLinkData(Bytes& code) // Global data accesses in x86 need to be patched with the absolute // address of the global. Globals are allocated sequentially after the // code section so we can just use an InternalLink. - for (size_t i = 0; i < masm_.numAsmJSGlobalAccesses(); i++) { - AsmJSGlobalAccess a = masm_.asmJSGlobalAccess(i); + for (GlobalAccess a : masm_.globalAccesses()) { LinkData::InternalLink inLink(LinkData::InternalLink::RawPointer); inLink.patchAtOffset = masm_.labelToPatchOffset(a.patchAt); inLink.targetOffset = code.length() + a.globalDataOffset; @@ -528,15 +527,14 @@ ModuleGenerator::finishLinkData(Bytes& code) #elif defined(JS_CODEGEN_X64) // Global data accesses on x64 use rip-relative addressing and thus we can // patch here, now that we know the final codeLength. - for (size_t i = 0; i < masm_.numAsmJSGlobalAccesses(); i++) { - AsmJSGlobalAccess a = masm_.asmJSGlobalAccess(i); + for (GlobalAccess a : masm_.globalAccesses()) { void* from = code.begin() + a.patchAt.offset(); void* to = code.end() + a.globalDataOffset; X86Encoding::SetRel32(from, to); } #else // Global access is performed using the GlobalReg and requires no patching. - MOZ_ASSERT(masm_.numAsmJSGlobalAccesses() == 0); + MOZ_ASSERT(masm_.globalAccesses().length() == 0); #endif return true; diff --git a/js/src/asmjs/WasmIonCompile.cpp b/js/src/asmjs/WasmIonCompile.cpp index b32136f7c52a..27bac1359147 100644 --- a/js/src/asmjs/WasmIonCompile.cpp +++ b/js/src/asmjs/WasmIonCompile.cpp @@ -696,7 +696,7 @@ class FunctionCompiler if (inDeadCode()) return nullptr; - auto* load = MAsmJSLoadGlobalVar::New(alloc(), type, globalDataOffset, isConst); + auto* load = MWasmLoadGlobalVar::New(alloc(), type, globalDataOffset, isConst); curBlock_->add(load); return load; } @@ -705,7 +705,7 @@ class FunctionCompiler { if (inDeadCode()) return; - curBlock_->add(MAsmJSStoreGlobalVar::New(alloc(), globalDataOffset, v)); + curBlock_->add(MWasmStoreGlobalVar::New(alloc(), globalDataOffset, v)); } void addInterruptCheck() diff --git a/js/src/asmjs/WasmStubs.cpp b/js/src/asmjs/WasmStubs.cpp index 4c9e1af80eb2..d3eb99cef195 100644 --- a/js/src/asmjs/WasmStubs.cpp +++ b/js/src/asmjs/WasmStubs.cpp @@ -564,9 +564,9 @@ wasm::GenerateJitExit(MacroAssembler& masm, const FuncImport& fi, bool usesHeap) // 2.1. Get ExitDatum uint32_t globalDataOffset = fi.exitGlobalDataOffset(); #if defined(JS_CODEGEN_X64) - masm.append(AsmJSGlobalAccess(masm.leaRipRelative(callee), globalDataOffset)); + masm.append(GlobalAccess(masm.leaRipRelative(callee), globalDataOffset)); #elif defined(JS_CODEGEN_X86) - masm.append(AsmJSGlobalAccess(masm.movlWithPatch(Imm32(0), callee), globalDataOffset)); + masm.append(GlobalAccess(masm.movlWithPatch(Imm32(0), callee), globalDataOffset)); #elif defined(JS_CODEGEN_ARM) || defined(JS_CODEGEN_ARM64) || \ defined(JS_CODEGEN_MIPS32) || defined(JS_CODEGEN_MIPS64) masm.computeEffectiveAddress(Address(GlobalReg, globalDataOffset - AsmJSGlobalRegBias), callee); diff --git a/js/src/jit/AliasAnalysisShared.cpp b/js/src/jit/AliasAnalysisShared.cpp index b0fbefb232a8..d33dc40e8b0b 100644 --- a/js/src/jit/AliasAnalysisShared.cpp +++ b/js/src/jit/AliasAnalysisShared.cpp @@ -146,8 +146,8 @@ GetObject(const MDefinition* ins) case MDefinition::Op_WasmStore: case MDefinition::Op_AsmJSCompareExchangeHeap: case MDefinition::Op_AsmJSAtomicBinopHeap: - case MDefinition::Op_AsmJSLoadGlobalVar: - case MDefinition::Op_AsmJSStoreGlobalVar: + case MDefinition::Op_WasmLoadGlobalVar: + case MDefinition::Op_WasmStoreGlobalVar: case MDefinition::Op_ArrayJoin: return nullptr; default: diff --git a/js/src/jit/Lowering.cpp b/js/src/jit/Lowering.cpp index 2fff1e771081..ea62b0f67fec 100644 --- a/js/src/jit/Lowering.cpp +++ b/js/src/jit/Lowering.cpp @@ -4081,15 +4081,15 @@ LIRGenerator::visitHasClass(MHasClass* ins) } void -LIRGenerator::visitAsmJSLoadGlobalVar(MAsmJSLoadGlobalVar* ins) +LIRGenerator::visitWasmLoadGlobalVar(MWasmLoadGlobalVar* ins) { - define(new(alloc()) LAsmJSLoadGlobalVar, ins); + define(new(alloc()) LWasmLoadGlobalVar, ins); } void -LIRGenerator::visitAsmJSStoreGlobalVar(MAsmJSStoreGlobalVar* ins) +LIRGenerator::visitWasmStoreGlobalVar(MWasmStoreGlobalVar* ins) { - add(new(alloc()) LAsmJSStoreGlobalVar(useRegisterAtStart(ins->value())), ins); + add(new(alloc()) LWasmStoreGlobalVar(useRegisterAtStart(ins->value())), ins); } void diff --git a/js/src/jit/Lowering.h b/js/src/jit/Lowering.h index 8c6be6e274a1..cc1d1f33caf1 100644 --- a/js/src/jit/Lowering.h +++ b/js/src/jit/Lowering.h @@ -281,8 +281,8 @@ class LIRGenerator : public LIRGeneratorSpecific void visitIsConstructor(MIsConstructor* ins); void visitIsObject(MIsObject* ins); void visitHasClass(MHasClass* ins); - void visitAsmJSLoadGlobalVar(MAsmJSLoadGlobalVar* ins); - void visitAsmJSStoreGlobalVar(MAsmJSStoreGlobalVar* ins); + void visitWasmLoadGlobalVar(MWasmLoadGlobalVar* ins); + void visitWasmStoreGlobalVar(MWasmStoreGlobalVar* ins); void visitAsmJSLoadFuncPtr(MAsmJSLoadFuncPtr* ins); void visitAsmJSLoadFFIFunc(MAsmJSLoadFFIFunc* ins); void visitAsmJSParameter(MAsmJSParameter* ins); diff --git a/js/src/jit/MIR.cpp b/js/src/jit/MIR.cpp index d3ad39a98321..0c667bc880f3 100644 --- a/js/src/jit/MIR.cpp +++ b/js/src/jit/MIR.cpp @@ -4899,10 +4899,11 @@ MAsmJSLoadHeap::congruentTo(const MDefinition* ins) const } MDefinition::AliasType -MAsmJSLoadGlobalVar::mightAlias(const MDefinition* def) const +MWasmLoadGlobalVar::mightAlias(const MDefinition* def) const { - if (def->isAsmJSStoreGlobalVar()) { - const MAsmJSStoreGlobalVar* store = def->toAsmJSStoreGlobalVar(); + if (def->isWasmStoreGlobalVar()) { + const MWasmStoreGlobalVar* store = def->toWasmStoreGlobalVar(); + // Global variables can't alias each other or be type-reinterpreted. return (store->globalDataOffset() == globalDataOffset_) ? AliasType::MayAlias : AliasType::NoAlias; } @@ -4910,7 +4911,7 @@ MAsmJSLoadGlobalVar::mightAlias(const MDefinition* def) const } HashNumber -MAsmJSLoadGlobalVar::valueHash() const +MWasmLoadGlobalVar::valueHash() const { HashNumber hash = MDefinition::valueHash(); hash = addU32ToHash(hash, globalDataOffset_); @@ -4918,22 +4919,20 @@ MAsmJSLoadGlobalVar::valueHash() const } bool -MAsmJSLoadGlobalVar::congruentTo(const MDefinition* ins) const +MWasmLoadGlobalVar::congruentTo(const MDefinition* ins) const { - if (ins->isAsmJSLoadGlobalVar()) { - const MAsmJSLoadGlobalVar* load = ins->toAsmJSLoadGlobalVar(); - return globalDataOffset_ == load->globalDataOffset_; - } + if (ins->isWasmLoadGlobalVar()) + return globalDataOffset_ == ins->toWasmLoadGlobalVar()->globalDataOffset_; return false; } MDefinition* -MAsmJSLoadGlobalVar::foldsTo(TempAllocator& alloc) +MWasmLoadGlobalVar::foldsTo(TempAllocator& alloc) { - if (!dependency() || !dependency()->isAsmJSStoreGlobalVar()) + if (!dependency() || !dependency()->isWasmStoreGlobalVar()) return this; - MAsmJSStoreGlobalVar* store = dependency()->toAsmJSStoreGlobalVar(); + MWasmStoreGlobalVar* store = dependency()->toWasmStoreGlobalVar(); if (!store->block()->dominates(block())) return this; diff --git a/js/src/jit/MIR.h b/js/src/jit/MIR.h index 7dcc6b920c7f..6f0c9b28ea35 100644 --- a/js/src/jit/MIR.h +++ b/js/src/jit/MIR.h @@ -13281,9 +13281,9 @@ class MAsmJSAtomicBinopHeap } }; -class MAsmJSLoadGlobalVar : public MNullaryInstruction +class MWasmLoadGlobalVar : public MNullaryInstruction { - MAsmJSLoadGlobalVar(MIRType type, unsigned globalDataOffset, bool isConstant) + MWasmLoadGlobalVar(MIRType type, unsigned globalDataOffset, bool isConstant) : globalDataOffset_(globalDataOffset), isConstant_(isConstant) { MOZ_ASSERT(IsNumberType(type) || IsSimdType(type)); @@ -13295,7 +13295,7 @@ class MAsmJSLoadGlobalVar : public MNullaryInstruction bool isConstant_; public: - INSTRUCTION_HEADER(AsmJSLoadGlobalVar) + INSTRUCTION_HEADER(WasmLoadGlobalVar) TRIVIAL_NEW_WRAPPERS unsigned globalDataOffset() const { return globalDataOffset_; } @@ -13311,18 +13311,18 @@ class MAsmJSLoadGlobalVar : public MNullaryInstruction AliasType mightAlias(const MDefinition* def) const override; }; -class MAsmJSStoreGlobalVar +class MWasmStoreGlobalVar : public MUnaryInstruction, public NoTypePolicy::Data { - MAsmJSStoreGlobalVar(unsigned globalDataOffset, MDefinition* v) + MWasmStoreGlobalVar(unsigned globalDataOffset, MDefinition* v) : MUnaryInstruction(v), globalDataOffset_(globalDataOffset) {} unsigned globalDataOffset_; public: - INSTRUCTION_HEADER(AsmJSStoreGlobalVar) + INSTRUCTION_HEADER(WasmStoreGlobalVar) TRIVIAL_NEW_WRAPPERS unsigned globalDataOffset() const { return globalDataOffset_; } diff --git a/js/src/jit/MOpcodes.h b/js/src/jit/MOpcodes.h index 4e4e05ab3693..e6eac687ec17 100644 --- a/js/src/jit/MOpcodes.h +++ b/js/src/jit/MOpcodes.h @@ -278,8 +278,8 @@ namespace jit { _(AsmJSUnsignedToFloat32) \ _(AsmJSLoadHeap) \ _(AsmJSStoreHeap) \ - _(AsmJSLoadGlobalVar) \ - _(AsmJSStoreGlobalVar) \ + _(WasmLoadGlobalVar) \ + _(WasmStoreGlobalVar) \ _(AsmJSLoadFuncPtr) \ _(AsmJSLoadFFIFunc) \ _(AsmJSReturn) \ diff --git a/js/src/jit/arm/CodeGenerator-arm.cpp b/js/src/jit/arm/CodeGenerator-arm.cpp index aa52f93c80d8..ff42f6a29887 100644 --- a/js/src/jit/arm/CodeGenerator-arm.cpp +++ b/js/src/jit/arm/CodeGenerator-arm.cpp @@ -2695,9 +2695,9 @@ CodeGeneratorARM::visitEffectiveAddress(LEffectiveAddress* ins) } void -CodeGeneratorARM::visitAsmJSLoadGlobalVar(LAsmJSLoadGlobalVar* ins) +CodeGeneratorARM::visitWasmLoadGlobalVar(LWasmLoadGlobalVar* ins) { - const MAsmJSLoadGlobalVar* mir = ins->mir(); + const MWasmLoadGlobalVar* mir = ins->mir(); unsigned addr = mir->globalDataOffset() - AsmJSGlobalRegBias; if (mir->type() == MIRType::Int32) { masm.ma_dtr(IsLoad, GlobalReg, Imm32(addr), ToRegister(ins->output())); @@ -2705,14 +2705,15 @@ CodeGeneratorARM::visitAsmJSLoadGlobalVar(LAsmJSLoadGlobalVar* ins) VFPRegister vd(ToFloatRegister(ins->output())); masm.ma_vldr(Address(GlobalReg, addr), vd.singleOverlay()); } else { + MOZ_ASSERT(mir->type() == MIRType::Double); masm.ma_vldr(Address(GlobalReg, addr), ToFloatRegister(ins->output())); } } void -CodeGeneratorARM::visitAsmJSStoreGlobalVar(LAsmJSStoreGlobalVar* ins) +CodeGeneratorARM::visitWasmStoreGlobalVar(LWasmStoreGlobalVar* ins) { - const MAsmJSStoreGlobalVar* mir = ins->mir(); + const MWasmStoreGlobalVar* mir = ins->mir(); MIRType type = mir->value()->type(); MOZ_ASSERT(IsNumberType(type)); @@ -2724,6 +2725,7 @@ CodeGeneratorARM::visitAsmJSStoreGlobalVar(LAsmJSStoreGlobalVar* ins) VFPRegister vd(ToFloatRegister(ins->value())); masm.ma_vstr(vd.singleOverlay(), Address(GlobalReg, addr)); } else { + MOZ_ASSERT(mir->type() == MIRType::Double); masm.ma_vstr(ToFloatRegister(ins->value()), Address(GlobalReg, addr)); } } diff --git a/js/src/jit/arm/CodeGenerator-arm.h b/js/src/jit/arm/CodeGenerator-arm.h index 7a8a86805480..7369bc55605d 100644 --- a/js/src/jit/arm/CodeGenerator-arm.h +++ b/js/src/jit/arm/CodeGenerator-arm.h @@ -206,6 +206,8 @@ class CodeGeneratorARM : public CodeGeneratorShared void visitWasmBoundsCheck(LWasmBoundsCheck* ins); void visitWasmLoad(LWasmLoad* ins); void visitWasmStore(LWasmStore* ins); + void visitWasmLoadGlobalVar(LWasmLoadGlobalVar* ins); + void visitWasmStoreGlobalVar(LWasmStoreGlobalVar* ins); void visitAsmJSLoadHeap(LAsmJSLoadHeap* ins); void visitAsmJSStoreHeap(LAsmJSStoreHeap* ins); void visitAsmJSCompareExchangeHeap(LAsmJSCompareExchangeHeap* ins); @@ -215,8 +217,6 @@ class CodeGeneratorARM : public CodeGeneratorShared void visitAsmJSAtomicBinopHeap(LAsmJSAtomicBinopHeap* ins); void visitAsmJSAtomicBinopHeapForEffect(LAsmJSAtomicBinopHeapForEffect* ins); void visitAsmJSAtomicBinopCallout(LAsmJSAtomicBinopCallout* ins); - void visitAsmJSLoadGlobalVar(LAsmJSLoadGlobalVar* ins); - void visitAsmJSStoreGlobalVar(LAsmJSStoreGlobalVar* ins); void visitAsmJSLoadFuncPtr(LAsmJSLoadFuncPtr* ins); void visitAsmJSLoadFFIFunc(LAsmJSLoadFFIFunc* ins); void visitAsmJSPassStackArg(LAsmJSPassStackArg* ins); diff --git a/js/src/jit/arm64/CodeGenerator-arm64.cpp b/js/src/jit/arm64/CodeGenerator-arm64.cpp index 2f5a43249102..db8358fce8ae 100644 --- a/js/src/jit/arm64/CodeGenerator-arm64.cpp +++ b/js/src/jit/arm64/CodeGenerator-arm64.cpp @@ -692,15 +692,15 @@ CodeGeneratorARM64::visitEffectiveAddress(LEffectiveAddress* ins) } void -CodeGeneratorARM64::visitAsmJSLoadGlobalVar(LAsmJSLoadGlobalVar* ins) +CodeGeneratorARM64::visitWasmLoadGlobalVar(LWasmLoadGlobalVar* ins) { - MOZ_CRASH("visitAsmJSLoadGlobalVar"); + MOZ_CRASH("visitWasmLoadGlobalVar"); } void -CodeGeneratorARM64::visitAsmJSStoreGlobalVar(LAsmJSStoreGlobalVar* ins) +CodeGeneratorARM64::visitWasmStoreGlobalVar(LWasmStoreGlobalVar* ins) { - MOZ_CRASH("visitAsmJSStoreGlobalVar"); + MOZ_CRASH("visitWasmStoreGlobalVar"); } void diff --git a/js/src/jit/arm64/CodeGenerator-arm64.h b/js/src/jit/arm64/CodeGenerator-arm64.h index 58983b3ca1c5..2e0101ee1c9d 100644 --- a/js/src/jit/arm64/CodeGenerator-arm64.h +++ b/js/src/jit/arm64/CodeGenerator-arm64.h @@ -203,12 +203,13 @@ class CodeGeneratorARM64 : public CodeGeneratorShared void visitAsmJSStoreHeap(LAsmJSStoreHeap* ins); void visitAsmJSCompareExchangeHeap(LAsmJSCompareExchangeHeap* ins); void visitAsmJSAtomicBinopHeap(LAsmJSAtomicBinopHeap* ins); - void visitAsmJSLoadGlobalVar(LAsmJSLoadGlobalVar* ins); - void visitAsmJSStoreGlobalVar(LAsmJSStoreGlobalVar* ins); void visitAsmJSLoadFuncPtr(LAsmJSLoadFuncPtr* ins); void visitAsmJSLoadFFIFunc(LAsmJSLoadFFIFunc* ins); void visitAsmJSPassStackArg(LAsmJSPassStackArg* ins); + void visitWasmLoadGlobalVar(LWasmLoadGlobalVar* ins); + void visitWasmStoreGlobalVar(LWasmStoreGlobalVar* ins); + void generateInvalidateEpilogue(); void setReturnDoubleRegs(LiveRegisterSet* regs); diff --git a/js/src/jit/mips-shared/CodeGenerator-mips-shared.cpp b/js/src/jit/mips-shared/CodeGenerator-mips-shared.cpp index c1b40dbebdb1..c2669fa04372 100644 --- a/js/src/jit/mips-shared/CodeGenerator-mips-shared.cpp +++ b/js/src/jit/mips-shared/CodeGenerator-mips-shared.cpp @@ -2105,9 +2105,9 @@ CodeGeneratorMIPSShared::visitEffectiveAddress(LEffectiveAddress* ins) } void -CodeGeneratorMIPSShared::visitAsmJSLoadGlobalVar(LAsmJSLoadGlobalVar* ins) +CodeGeneratorMIPSShared::visitWasmLoadGlobalVar(LWasmLoadGlobalVar* ins) { - const MAsmJSLoadGlobalVar* mir = ins->mir(); + const MWasmLoadGlobalVar* mir = ins->mir(); unsigned addr = mir->globalDataOffset() - AsmJSGlobalRegBias; if (mir->type() == MIRType::Int32) masm.load32(Address(GlobalReg, addr), ToRegister(ins->output())); @@ -2118,9 +2118,9 @@ CodeGeneratorMIPSShared::visitAsmJSLoadGlobalVar(LAsmJSLoadGlobalVar* ins) } void -CodeGeneratorMIPSShared::visitAsmJSStoreGlobalVar(LAsmJSStoreGlobalVar* ins) +CodeGeneratorMIPSShared::visitWasmStoreGlobalVar(LWasmStoreGlobalVar* ins) { - const MAsmJSStoreGlobalVar* mir = ins->mir(); + const MWasmStoreGlobalVar* mir = ins->mir(); MOZ_ASSERT(IsNumberType(mir->value()->type())); unsigned addr = mir->globalDataOffset() - AsmJSGlobalRegBias; diff --git a/js/src/jit/mips-shared/CodeGenerator-mips-shared.h b/js/src/jit/mips-shared/CodeGenerator-mips-shared.h index 00648dda1969..ff20f2cfe721 100644 --- a/js/src/jit/mips-shared/CodeGenerator-mips-shared.h +++ b/js/src/jit/mips-shared/CodeGenerator-mips-shared.h @@ -165,6 +165,8 @@ class CodeGeneratorMIPSShared : public CodeGeneratorShared virtual void visitTruncateFToInt32(LTruncateFToInt32* ins); void visitWasmTruncateToInt32(LWasmTruncateToInt32* lir); + void visitWasmLoadGlobalVar(LWasmLoadGlobalVar* ins); + void visitWasmStoreGlobalVar(LWasmStoreGlobalVar* ins); // Out of line visitors. virtual void visitOutOfLineBailout(OutOfLineBailout* ool) = 0; @@ -199,8 +201,6 @@ class CodeGeneratorMIPSShared : public CodeGeneratorShared void visitAsmJSAtomicExchangeHeap(LAsmJSAtomicExchangeHeap* ins); void visitAsmJSAtomicBinopHeap(LAsmJSAtomicBinopHeap* ins); void visitAsmJSAtomicBinopHeapForEffect(LAsmJSAtomicBinopHeapForEffect* ins); - void visitAsmJSLoadGlobalVar(LAsmJSLoadGlobalVar* ins); - void visitAsmJSStoreGlobalVar(LAsmJSStoreGlobalVar* ins); void visitAsmJSLoadFuncPtr(LAsmJSLoadFuncPtr* ins); void visitAsmJSLoadFFIFunc(LAsmJSLoadFFIFunc* ins); diff --git a/js/src/jit/shared/Assembler-shared.h b/js/src/jit/shared/Assembler-shared.h index 0d4b95ba9bf7..87ee709fe26f 100644 --- a/js/src/jit/shared/Assembler-shared.h +++ b/js/src/jit/shared/Assembler-shared.h @@ -680,16 +680,6 @@ struct AsmJSFrame static_assert(sizeof(AsmJSFrame) == 2 * sizeof(void*), "?!"); static const uint32_t AsmJSFrameBytesAfterReturnAddress = sizeof(void*); -struct AsmJSGlobalAccess -{ - CodeOffset patchAt; - unsigned globalDataOffset; - - AsmJSGlobalAccess(CodeOffset patchAt, unsigned globalDataOffset) - : patchAt(patchAt), globalDataOffset(globalDataOffset) - {} -}; - // Represents an instruction to be patched and the intended pointee. These // links are accumulated in the MacroAssembler, but patching is done outside // the MacroAssembler (in Module::staticallyLink). @@ -702,6 +692,29 @@ struct AsmJSAbsoluteAddress wasm::SymbolicAddress target; }; +} // namespace jit + +namespace wasm { + +// Summarizes a global access for a mutable (in asm.js) or immutable value (in +// asm.js or the MVP) that needs to get patched later. + +struct GlobalAccess +{ + GlobalAccess(jit::CodeOffset patchAt, unsigned globalDataOffset) + : patchAt(patchAt), globalDataOffset(globalDataOffset) + {} + + jit::CodeOffset patchAt; + unsigned globalDataOffset; +}; + +typedef Vector GlobalAccessVector; + +} // namespace wasm + +namespace jit { + // The base class of all Assemblers for all archs. class AssemblerShared { @@ -709,7 +722,7 @@ class AssemblerShared wasm::JumpSiteArray jumpsites_; wasm::MemoryAccessVector memoryAccesses_; wasm::BoundsCheckVector boundsChecks_; - Vector asmJSGlobalAccesses_; + wasm::GlobalAccessVector globalAccesses_; Vector asmJSAbsoluteAddresses_; protected: @@ -762,9 +775,8 @@ class AssemblerShared void append(wasm::BoundsCheck check) { enoughMemory_ &= boundsChecks_.append(check); } wasm::BoundsCheckVector&& extractBoundsChecks() { return Move(boundsChecks_); } - void append(AsmJSGlobalAccess access) { enoughMemory_ &= asmJSGlobalAccesses_.append(access); } - size_t numAsmJSGlobalAccesses() const { return asmJSGlobalAccesses_.length(); } - AsmJSGlobalAccess asmJSGlobalAccess(size_t i) const { return asmJSGlobalAccesses_[i]; } + void append(wasm::GlobalAccess access) { enoughMemory_ &= globalAccesses_.append(access); } + const wasm::GlobalAccessVector& globalAccesses() const { return globalAccesses_; } void append(AsmJSAbsoluteAddress link) { enoughMemory_ &= asmJSAbsoluteAddresses_.append(link); } size_t numAsmJSAbsoluteAddresses() const { return asmJSAbsoluteAddresses_.length(); } @@ -808,10 +820,10 @@ class AssemblerShared for (; i < boundsChecks_.length(); i++) boundsChecks_[i].offsetBy(delta); - i = asmJSGlobalAccesses_.length(); - enoughMemory_ &= asmJSGlobalAccesses_.appendAll(other.asmJSGlobalAccesses_); - for (; i < asmJSGlobalAccesses_.length(); i++) - asmJSGlobalAccesses_[i].patchAt.offsetBy(delta); + i = globalAccesses_.length(); + enoughMemory_ &= globalAccesses_.appendAll(other.globalAccesses_); + for (; i < globalAccesses_.length(); i++) + globalAccesses_[i].patchAt.offsetBy(delta); i = asmJSAbsoluteAddresses_.length(); enoughMemory_ &= asmJSAbsoluteAddresses_.appendAll(other.asmJSAbsoluteAddresses_); diff --git a/js/src/jit/shared/LIR-shared.h b/js/src/jit/shared/LIR-shared.h index fac0803825ae..9c6c36081e39 100644 --- a/js/src/jit/shared/LIR-shared.h +++ b/js/src/jit/shared/LIR-shared.h @@ -8046,24 +8046,24 @@ class LAsmJSAtomicBinopHeapForEffect : public LInstructionHelper<0, 2, 5> } }; -class LAsmJSLoadGlobalVar : public LInstructionHelper<1, 0, 0> +class LWasmLoadGlobalVar : public LInstructionHelper<1, 0, 0> { public: - LIR_HEADER(AsmJSLoadGlobalVar); - MAsmJSLoadGlobalVar* mir() const { - return mir_->toAsmJSLoadGlobalVar(); + LIR_HEADER(WasmLoadGlobalVar); + MWasmLoadGlobalVar* mir() const { + return mir_->toWasmLoadGlobalVar(); } }; -class LAsmJSStoreGlobalVar : public LInstructionHelper<0, 1, 0> +class LWasmStoreGlobalVar : public LInstructionHelper<0, 1, 0> { public: - LIR_HEADER(AsmJSStoreGlobalVar); - explicit LAsmJSStoreGlobalVar(const LAllocation& value) { + LIR_HEADER(WasmStoreGlobalVar); + explicit LWasmStoreGlobalVar(const LAllocation& value) { setOperand(0, value); } - MAsmJSStoreGlobalVar* mir() const { - return mir_->toAsmJSStoreGlobalVar(); + MWasmStoreGlobalVar* mir() const { + return mir_->toWasmStoreGlobalVar(); } const LAllocation* value() { return getOperand(0); diff --git a/js/src/jit/shared/LOpcodes-shared.h b/js/src/jit/shared/LOpcodes-shared.h index dae9b7fd50c1..2c41b1d9d96d 100644 --- a/js/src/jit/shared/LOpcodes-shared.h +++ b/js/src/jit/shared/LOpcodes-shared.h @@ -389,11 +389,11 @@ _(WasmLoadI64) \ _(WasmStore) \ _(WasmBoundsCheck) \ + _(WasmLoadGlobalVar) \ + _(WasmStoreGlobalVar) \ _(AsmJSLoadHeap) \ _(AsmJSStoreHeap) \ _(AsmJSLoadFuncPtr) \ - _(AsmJSLoadGlobalVar) \ - _(AsmJSStoreGlobalVar) \ _(AsmJSLoadFFIFunc) \ _(AsmJSParameter) \ _(AsmJSReturn) \ diff --git a/js/src/jit/x64/Assembler-x64.h b/js/src/jit/x64/Assembler-x64.h index 9a5e05a662e5..cf4e760ac83c 100644 --- a/js/src/jit/x64/Assembler-x64.h +++ b/js/src/jit/x64/Assembler-x64.h @@ -827,11 +827,11 @@ class Assembler : public AssemblerX86Shared void loadWasmActivation(Register dest) { CodeOffset label = loadRipRelativeInt64(dest); - append(AsmJSGlobalAccess(label, wasm::ActivationGlobalDataOffset)); + append(wasm::GlobalAccess(label, wasm::ActivationGlobalDataOffset)); } void loadAsmJSHeapRegisterFromGlobalData() { CodeOffset label = loadRipRelativeInt64(HeapReg); - append(AsmJSGlobalAccess(label, wasm::HeapGlobalDataOffset)); + append(wasm::GlobalAccess(label, wasm::HeapGlobalDataOffset)); } void cmpq(Register rhs, Register lhs) { diff --git a/js/src/jit/x64/CodeGenerator-x64.cpp b/js/src/jit/x64/CodeGenerator-x64.cpp index c53e58e8acb1..077bb17a0f6d 100644 --- a/js/src/jit/x64/CodeGenerator-x64.cpp +++ b/js/src/jit/x64/CodeGenerator-x64.cpp @@ -1173,9 +1173,9 @@ CodeGeneratorX64::visitAsmJSAtomicBinopHeapForEffect(LAsmJSAtomicBinopHeapForEff } void -CodeGeneratorX64::visitAsmJSLoadGlobalVar(LAsmJSLoadGlobalVar* ins) +CodeGeneratorX64::visitWasmLoadGlobalVar(LWasmLoadGlobalVar* ins) { - MAsmJSLoadGlobalVar* mir = ins->mir(); + MWasmLoadGlobalVar* mir = ins->mir(); MIRType type = mir->type(); MOZ_ASSERT(IsNumberType(type) || IsSimdType(type)); @@ -1205,16 +1205,16 @@ CodeGeneratorX64::visitAsmJSLoadGlobalVar(LAsmJSLoadGlobalVar* ins) label = masm.loadRipRelativeFloat32x4(ToFloatRegister(ins->output())); break; default: - MOZ_CRASH("unexpected type in visitAsmJSLoadGlobalVar"); + MOZ_CRASH("unexpected type in visitWasmLoadGlobalVar"); } - masm.append(AsmJSGlobalAccess(label, mir->globalDataOffset())); + masm.append(wasm::GlobalAccess(label, mir->globalDataOffset())); } void -CodeGeneratorX64::visitAsmJSStoreGlobalVar(LAsmJSStoreGlobalVar* ins) +CodeGeneratorX64::visitWasmStoreGlobalVar(LWasmStoreGlobalVar* ins) { - MAsmJSStoreGlobalVar* mir = ins->mir(); + MWasmStoreGlobalVar* mir = ins->mir(); MIRType type = mir->value()->type(); MOZ_ASSERT(IsNumberType(type) || IsSimdType(type)); @@ -1240,10 +1240,10 @@ CodeGeneratorX64::visitAsmJSStoreGlobalVar(LAsmJSStoreGlobalVar* ins) label = masm.storeRipRelativeFloat32x4(ToFloatRegister(ins->value())); break; default: - MOZ_CRASH("unexpected type in visitAsmJSStoreGlobalVar"); + MOZ_CRASH("unexpected type in visitWasmStoreGlobalVar"); } - masm.append(AsmJSGlobalAccess(label, mir->globalDataOffset())); + masm.append(wasm::GlobalAccess(label, mir->globalDataOffset())); } void @@ -1260,7 +1260,7 @@ CodeGeneratorX64::visitAsmJSLoadFuncPtr(LAsmJSLoadFuncPtr* ins) } CodeOffset label = masm.loadRipRelativeInt64(out); - masm.append(AsmJSGlobalAccess(label, mir->globalDataOffset())); + masm.append(wasm::GlobalAccess(label, mir->globalDataOffset())); masm.loadPtr(Operand(out, index, ScalePointer, 0), out); } @@ -1271,7 +1271,7 @@ CodeGeneratorX64::visitAsmJSLoadFFIFunc(LAsmJSLoadFFIFunc* ins) MAsmJSLoadFFIFunc* mir = ins->mir(); CodeOffset label = masm.loadRipRelativeInt64(ToRegister(ins->output())); - masm.append(AsmJSGlobalAccess(label, mir->globalDataOffset())); + masm.append(wasm::GlobalAccess(label, mir->globalDataOffset())); } void diff --git a/js/src/jit/x64/CodeGenerator-x64.h b/js/src/jit/x64/CodeGenerator-x64.h index 273ab8ce8399..fd7f18cae319 100644 --- a/js/src/jit/x64/CodeGenerator-x64.h +++ b/js/src/jit/x64/CodeGenerator-x64.h @@ -75,6 +75,8 @@ class CodeGeneratorX64 : public CodeGeneratorX86Shared void visitWasmLoad(LWasmLoad* ins); void visitWasmLoadI64(LWasmLoadI64* ins); void visitWasmStore(LWasmStore* ins); + void visitWasmLoadGlobalVar(LWasmLoadGlobalVar* ins); + void visitWasmStoreGlobalVar(LWasmStoreGlobalVar* ins); void visitAsmSelectI64(LAsmSelectI64* ins); void visitAsmJSCall(LAsmJSCall* ins); void visitAsmJSLoadHeap(LAsmJSLoadHeap* ins); @@ -83,8 +85,6 @@ class CodeGeneratorX64 : public CodeGeneratorX86Shared void visitAsmJSAtomicExchangeHeap(LAsmJSAtomicExchangeHeap* ins); void visitAsmJSAtomicBinopHeap(LAsmJSAtomicBinopHeap* ins); void visitAsmJSAtomicBinopHeapForEffect(LAsmJSAtomicBinopHeapForEffect* ins); - void visitAsmJSLoadGlobalVar(LAsmJSLoadGlobalVar* ins); - void visitAsmJSStoreGlobalVar(LAsmJSStoreGlobalVar* ins); void visitAsmJSLoadFuncPtr(LAsmJSLoadFuncPtr* ins); void visitAsmJSLoadFFIFunc(LAsmJSLoadFFIFunc* ins); void visitAsmJSUInt32ToDouble(LAsmJSUInt32ToDouble* lir); diff --git a/js/src/jit/x86/Assembler-x86.h b/js/src/jit/x86/Assembler-x86.h index 017dc493c9ac..536e97b442b5 100644 --- a/js/src/jit/x86/Assembler-x86.h +++ b/js/src/jit/x86/Assembler-x86.h @@ -922,7 +922,7 @@ class Assembler : public AssemblerX86Shared void loadWasmActivation(Register dest) { CodeOffset label = movlWithPatch(PatchedAbsoluteAddress(), dest); - append(AsmJSGlobalAccess(label, wasm::ActivationGlobalDataOffset)); + append(wasm::GlobalAccess(label, wasm::ActivationGlobalDataOffset)); } void loadAsmJSHeapRegisterFromGlobalData() { // x86 doesn't have a pinned heap register. diff --git a/js/src/jit/x86/CodeGenerator-x86.cpp b/js/src/jit/x86/CodeGenerator-x86.cpp index dc80111ffc5b..a035289bd559 100644 --- a/js/src/jit/x86/CodeGenerator-x86.cpp +++ b/js/src/jit/x86/CodeGenerator-x86.cpp @@ -831,9 +831,9 @@ CodeGeneratorX86::visitAsmJSAtomicBinopHeapForEffect(LAsmJSAtomicBinopHeapForEff } void -CodeGeneratorX86::visitAsmJSLoadGlobalVar(LAsmJSLoadGlobalVar* ins) +CodeGeneratorX86::visitWasmLoadGlobalVar(LWasmLoadGlobalVar* ins) { - MAsmJSLoadGlobalVar* mir = ins->mir(); + MWasmLoadGlobalVar* mir = ins->mir(); MIRType type = mir->type(); MOZ_ASSERT(IsNumberType(type) || IsSimdType(type)); @@ -862,15 +862,15 @@ CodeGeneratorX86::visitAsmJSLoadGlobalVar(LAsmJSLoadGlobalVar* ins) label = masm.vmovapsWithPatch(PatchedAbsoluteAddress(), ToFloatRegister(ins->output())); break; default: - MOZ_CRASH("unexpected type in visitAsmJSLoadGlobalVar"); + MOZ_CRASH("unexpected type in visitWasmLoadGlobalVar"); } - masm.append(AsmJSGlobalAccess(label, mir->globalDataOffset())); + masm.append(wasm::GlobalAccess(label, mir->globalDataOffset())); } void -CodeGeneratorX86::visitAsmJSStoreGlobalVar(LAsmJSStoreGlobalVar* ins) +CodeGeneratorX86::visitWasmStoreGlobalVar(LWasmStoreGlobalVar* ins) { - MAsmJSStoreGlobalVar* mir = ins->mir(); + MWasmStoreGlobalVar* mir = ins->mir(); MIRType type = mir->value()->type(); MOZ_ASSERT(IsNumberType(type) || IsSimdType(type)); @@ -896,9 +896,9 @@ CodeGeneratorX86::visitAsmJSStoreGlobalVar(LAsmJSStoreGlobalVar* ins) label = masm.vmovapsWithPatch(ToFloatRegister(ins->value()), PatchedAbsoluteAddress()); break; default: - MOZ_CRASH("unexpected type in visitAsmJSStoreGlobalVar"); + MOZ_CRASH("unexpected type in visitWasmStoreGlobalVar"); } - masm.append(AsmJSGlobalAccess(label, mir->globalDataOffset())); + masm.append(wasm::GlobalAccess(label, mir->globalDataOffset())); } void @@ -915,7 +915,7 @@ CodeGeneratorX86::visitAsmJSLoadFuncPtr(LAsmJSLoadFuncPtr* ins) } CodeOffset label = masm.movlWithPatch(PatchedAbsoluteAddress(), out); - masm.append(AsmJSGlobalAccess(label, mir->globalDataOffset())); + masm.append(wasm::GlobalAccess(label, mir->globalDataOffset())); masm.loadPtr(Operand(out, index, ScalePointer), out); } @@ -927,7 +927,7 @@ CodeGeneratorX86::visitAsmJSLoadFFIFunc(LAsmJSLoadFFIFunc* ins) Register out = ToRegister(ins->output()); CodeOffset label = masm.movlWithPatch(PatchedAbsoluteAddress(), out); - masm.append(AsmJSGlobalAccess(label, mir->globalDataOffset())); + masm.append(wasm::GlobalAccess(label, mir->globalDataOffset())); } namespace js { diff --git a/js/src/jit/x86/CodeGenerator-x86.h b/js/src/jit/x86/CodeGenerator-x86.h index a7c391478c13..6b9482bb9f38 100644 --- a/js/src/jit/x86/CodeGenerator-x86.h +++ b/js/src/jit/x86/CodeGenerator-x86.h @@ -60,14 +60,14 @@ class CodeGeneratorX86 : public CodeGeneratorX86Shared void visitAsmJSCall(LAsmJSCall* ins); void visitWasmLoad(LWasmLoad* ins); void visitWasmStore(LWasmStore* ins); + void visitWasmLoadGlobalVar(LWasmLoadGlobalVar* ins); + void visitWasmStoreGlobalVar(LWasmStoreGlobalVar* ins); void visitAsmJSLoadHeap(LAsmJSLoadHeap* ins); void visitAsmJSStoreHeap(LAsmJSStoreHeap* ins); void visitAsmJSCompareExchangeHeap(LAsmJSCompareExchangeHeap* ins); void visitAsmJSAtomicExchangeHeap(LAsmJSAtomicExchangeHeap* ins); void visitAsmJSAtomicBinopHeap(LAsmJSAtomicBinopHeap* ins); void visitAsmJSAtomicBinopHeapForEffect(LAsmJSAtomicBinopHeapForEffect* ins); - void visitAsmJSLoadGlobalVar(LAsmJSLoadGlobalVar* ins); - void visitAsmJSStoreGlobalVar(LAsmJSStoreGlobalVar* ins); void visitAsmJSLoadFuncPtr(LAsmJSLoadFuncPtr* ins); void visitAsmJSLoadFFIFunc(LAsmJSLoadFFIFunc* ins); void visitWasmTruncateToInt32(LWasmTruncateToInt32* ins);