From 72d2424af4d8b326d44e7e5b80d704583039d292 Mon Sep 17 00:00:00 2001 From: Luke Wagner Date: Tue, 19 Feb 2019 14:28:35 -0600 Subject: [PATCH] Bug 1401675 - Baldr: remove some unneeded header dependencies (r=lth) --HG-- extra : rebase_source : 0e3624ef80dccf41b57545f89539b451dc269dcf --- js/src/wasm/WasmCode.h | 6 +----- js/src/wasm/WasmInstance.cpp | 6 +++--- js/src/wasm/WasmInstance.h | 7 +++---- js/src/wasm/WasmModule.h | 8 ++------ js/src/wasm/WasmSignalHandlers.cpp | 1 + js/src/wasm/WasmTypes.h | 5 +++++ js/src/wasm/WasmValidate.h | 1 - 7 files changed, 15 insertions(+), 19 deletions(-) diff --git a/js/src/wasm/WasmCode.h b/js/src/wasm/WasmCode.h index 43e3e2572ac1..315c5fe39d86 100644 --- a/js/src/wasm/WasmCode.h +++ b/js/src/wasm/WasmCode.h @@ -19,6 +19,7 @@ #ifndef wasm_code_h #define wasm_code_h +#include "jit/shared/Assembler-shared.h" #include "js/HashTable.h" #include "threading/ExclusiveData.h" #include "vm/MutexIDs.h" @@ -292,11 +293,6 @@ class FuncImport { typedef Vector FuncImportVector; -// A wasm module can either use no memory, a unshared memory (ArrayBuffer) or -// shared memory (SharedArrayBuffer). - -enum class MemoryUsage { None = false, Unshared = 1, Shared = 2 }; - // Metadata holds all the data that is needed to describe compiled wasm code // at runtime (as opposed to data that is only used to statically link or // instantiate a module). diff --git a/js/src/wasm/WasmInstance.cpp b/js/src/wasm/WasmInstance.cpp index bcea25cb9493..420ec5af2a37 100644 --- a/js/src/wasm/WasmInstance.cpp +++ b/js/src/wasm/WasmInstance.cpp @@ -1212,9 +1212,9 @@ bool Instance::init(JSContext* cx, const DataSegmentVector& dataSegments, } JitRuntime* jitRuntime = cx->runtime()->jitRuntime(); - jsJitArgsRectifier_ = jitRuntime->getArgumentsRectifier(); - jsJitExceptionHandler_ = jitRuntime->getExceptionTail(); - preBarrierCode_ = jitRuntime->preBarrier(MIRType::Object); + jsJitArgsRectifier_ = jitRuntime->getArgumentsRectifier().value; + jsJitExceptionHandler_ = jitRuntime->getExceptionTail().value; + preBarrierCode_ = jitRuntime->preBarrier(MIRType::Object).value; if (!passiveDataSegments_.resize(dataSegments.length())) { return false; diff --git a/js/src/wasm/WasmInstance.h b/js/src/wasm/WasmInstance.h index 70ac7e2b8e61..3549bea02ebd 100644 --- a/js/src/wasm/WasmInstance.h +++ b/js/src/wasm/WasmInstance.h @@ -21,7 +21,6 @@ #include "builtin/TypedObject.h" #include "gc/Barrier.h" -#include "jit/shared/Assembler-shared.h" #include "vm/SharedMem.h" #include "wasm/WasmCode.h" #include "wasm/WasmDebug.h" @@ -45,9 +44,9 @@ namespace wasm { class Instance { JS::Realm* const realm_; ReadBarrieredWasmInstanceObject object_; - jit::TrampolinePtr jsJitArgsRectifier_; - jit::TrampolinePtr jsJitExceptionHandler_; - jit::TrampolinePtr preBarrierCode_; + void* jsJitArgsRectifier_; + void* jsJitExceptionHandler_; + void* preBarrierCode_; const SharedCode code_; const UniqueTlsData tlsData_; GCPtrWasmMemoryObject memory_; diff --git a/js/src/wasm/WasmModule.h b/js/src/wasm/WasmModule.h index 8f66b97952ac..c4477facd252 100644 --- a/js/src/wasm/WasmModule.h +++ b/js/src/wasm/WasmModule.h @@ -19,14 +19,10 @@ #ifndef wasm_module_h #define wasm_module_h -#include "jit/shared/Assembler-shared.h" -#include "js/TypeDecls.h" -#include "threading/ConditionVariable.h" -#include "threading/Mutex.h" -#include "vm/MutexIDs.h" +#include "js/BuildId.h" + #include "wasm/WasmCode.h" #include "wasm/WasmTable.h" -#include "wasm/WasmValidate.h" namespace js { namespace wasm { diff --git a/js/src/wasm/WasmSignalHandlers.cpp b/js/src/wasm/WasmSignalHandlers.cpp index 4ca060acfa52..fc49f361d82a 100644 --- a/js/src/wasm/WasmSignalHandlers.cpp +++ b/js/src/wasm/WasmSignalHandlers.cpp @@ -23,6 +23,7 @@ #include "mozilla/ThreadLocal.h" #include "threading/Thread.h" +#include "vm/Realm.h" #include "vm/Runtime.h" #include "wasm/WasmInstance.h" diff --git a/js/src/wasm/WasmTypes.h b/js/src/wasm/WasmTypes.h index 82390415bc66..3c90b52f7d13 100644 --- a/js/src/wasm/WasmTypes.h +++ b/js/src/wasm/WasmTypes.h @@ -624,6 +624,11 @@ enum class CompileMode { Once, Tier1, Tier2 }; enum class DebugEnabled { False, True }; +// A wasm module can either use no memory, a unshared memory (ArrayBuffer) or +// shared memory (SharedArrayBuffer). + +enum class MemoryUsage { None = false, Unshared = 1, Shared = 2 }; + // Iterator over tiers present in a tiered data structure. class Tiers { diff --git a/js/src/wasm/WasmValidate.h b/js/src/wasm/WasmValidate.h index 093f463a1178..e97570c491af 100644 --- a/js/src/wasm/WasmValidate.h +++ b/js/src/wasm/WasmValidate.h @@ -21,7 +21,6 @@ #include "mozilla/TypeTraits.h" -#include "wasm/WasmCode.h" #include "wasm/WasmTypes.h" namespace js {