diff options
author | Thomas Lively <tlively@google.com> | 2022-10-10 18:05:17 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-10 16:05:17 -0700 |
commit | ac21db83c9dbde2a8b4d8c45c86c42d997b88e83 (patch) | |
tree | 58b00e39fd4274df81b1a1b849a7852e1c213ad8 /src/abi/js.h | |
parent | 2f722471e55b3bc7c013763d6dc9043fba7317d8 (diff) | |
download | binaryen-ac21db83c9dbde2a8b4d8c45c86c42d997b88e83.tar.gz binaryen-ac21db83c9dbde2a8b4d8c45c86c42d997b88e83.tar.bz2 binaryen-ac21db83c9dbde2a8b4d8c45c86c42d997b88e83.zip |
[NFC] Remove `cashew::` namespace from IString (#5126)
As an NFC preliminary change that will minimize the diff in #5122, which moves
IString to the wasm namespace.
Diffstat (limited to 'src/abi/js.h')
-rw-r--r-- | src/abi/js.h | 35 |
1 files changed, 18 insertions, 17 deletions
diff --git a/src/abi/js.h b/src/abi/js.h index 96bfc2125..60531803d 100644 --- a/src/abi/js.h +++ b/src/abi/js.h @@ -37,28 +37,29 @@ inline std::string getLegalizationPass(LegalizationLevel level) { namespace wasm2js { -extern cashew::IString SCRATCH_LOAD_I32; -extern cashew::IString SCRATCH_STORE_I32; -extern cashew::IString SCRATCH_LOAD_F32; -extern cashew::IString SCRATCH_STORE_F32; -extern cashew::IString SCRATCH_LOAD_F64; -extern cashew::IString SCRATCH_STORE_F64; -extern cashew::IString MEMORY_INIT; -extern cashew::IString MEMORY_FILL; -extern cashew::IString MEMORY_COPY; -extern cashew::IString DATA_DROP; -extern cashew::IString ATOMIC_WAIT_I32; -extern cashew::IString ATOMIC_RMW_I64; -extern cashew::IString GET_STASHED_BITS; -extern cashew::IString TRAP; +using IString = cashew::IString; + +extern IString SCRATCH_LOAD_I32; +extern IString SCRATCH_STORE_I32; +extern IString SCRATCH_LOAD_F32; +extern IString SCRATCH_STORE_F32; +extern IString SCRATCH_LOAD_F64; +extern IString SCRATCH_STORE_F64; +extern IString MEMORY_INIT; +extern IString MEMORY_FILL; +extern IString MEMORY_COPY; +extern IString DATA_DROP; +extern IString ATOMIC_WAIT_I32; +extern IString ATOMIC_RMW_I64; +extern IString GET_STASHED_BITS; +extern IString TRAP; // The wasm2js helpers let us do things that can't be done without special help, // like read and write to scratch memory for purposes of implementing things // like reinterpret, etc. // The optional "specific" parameter is a specific function we want. If not // provided, we create them all. -inline void ensureHelpers(Module* wasm, - cashew::IString specific = cashew::IString()) { +inline void ensureHelpers(Module* wasm, IString specific = IString()) { auto ensureImport = [&](Name name, Type params, Type results) { if (wasm->getFunctionOrNull(name)) { return; @@ -93,7 +94,7 @@ inline void ensureHelpers(Module* wasm, ensureImport(TRAP, {}, Type::none); } -inline bool isHelper(cashew::IString name) { +inline bool isHelper(IString name) { return name == SCRATCH_LOAD_I32 || name == SCRATCH_STORE_I32 || name == SCRATCH_LOAD_F32 || name == SCRATCH_STORE_F32 || name == SCRATCH_LOAD_F64 || name == SCRATCH_STORE_F64 || |