diff options
author | Thomas Lively <tlively@google.com> | 2022-10-11 10:22:41 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-11 08:22:41 -0700 |
commit | 802cb0bc9407c3e1f46cf426873cdbfeed42edaf (patch) | |
tree | 3316ad2f6d8674793e2cb6e2509c24834d32de82 | |
parent | ac21db83c9dbde2a8b4d8c45c86c42d997b88e83 (diff) | |
download | binaryen-802cb0bc9407c3e1f46cf426873cdbfeed42edaf.tar.gz binaryen-802cb0bc9407c3e1f46cf426873cdbfeed42edaf.tar.bz2 binaryen-802cb0bc9407c3e1f46cf426873cdbfeed42edaf.zip |
[NFC] Remove more `cashew::` namespaces from IString (#5127)
Finishes work missed in #5126.
-rw-r--r-- | src/asmjs/shared-constants.h | 158 | ||||
-rw-r--r-- | src/wasm/wasm-s-parser.cpp | 5 |
2 files changed, 81 insertions, 82 deletions
diff --git a/src/asmjs/shared-constants.h b/src/asmjs/shared-constants.h index cebe8baaa..753b34c5d 100644 --- a/src/asmjs/shared-constants.h +++ b/src/asmjs/shared-constants.h @@ -21,85 +21,87 @@ namespace wasm { -extern cashew::IString TOPMOST; -extern cashew::IString INT8ARRAY; -extern cashew::IString INT16ARRAY; -extern cashew::IString INT32ARRAY; -extern cashew::IString UINT8ARRAY; -extern cashew::IString UINT16ARRAY; -extern cashew::IString UINT32ARRAY; -extern cashew::IString FLOAT32ARRAY; -extern cashew::IString FLOAT64ARRAY; -extern cashew::IString ARRAY_BUFFER; -extern cashew::IString ASM_MODULE; -extern cashew::IString MATH; -extern cashew::IString IMUL; -extern cashew::IString CLZ32; -extern cashew::IString FROUND; -extern cashew::IString ASM2WASM; -extern cashew::IString MIN; -extern cashew::IString MAX; -extern cashew::IString F64_REM; -extern cashew::IString F64_TO_INT; -extern cashew::IString F64_TO_UINT; -extern cashew::IString F64_TO_INT64; -extern cashew::IString F64_TO_UINT64; -extern cashew::IString F32_TO_INT; -extern cashew::IString F32_TO_UINT; -extern cashew::IString F32_TO_INT64; -extern cashew::IString F32_TO_UINT64; -extern cashew::IString I32S_DIV; -extern cashew::IString I32U_DIV; -extern cashew::IString I32S_REM; -extern cashew::IString I32U_REM; -extern cashew::IString ABS; -extern cashew::IString FLOOR; -extern cashew::IString CEIL; -extern cashew::IString TRUNC; -extern cashew::IString SQRT; -extern cashew::IString POW; -extern cashew::IString I32_TEMP; -extern cashew::IString DEBUGGER; -extern cashew::IString BUFFER; -extern cashew::IString ENV; -extern cashew::IString STACKTOP; -extern cashew::IString STACK_MAX; -extern cashew::IString INSTRUMENT; -extern cashew::IString MATH_IMUL; -extern cashew::IString MATH_ABS; -extern cashew::IString MATH_CLZ32; -extern cashew::IString MATH_CEIL; -extern cashew::IString MATH_FLOOR; -extern cashew::IString MATH_TRUNC; -extern cashew::IString MATH_SQRT; -extern cashew::IString MATH_MIN; -extern cashew::IString MATH_MAX; -extern cashew::IString WASM_CTZ32; -extern cashew::IString WASM_CTZ64; -extern cashew::IString WASM_CLZ32; -extern cashew::IString WASM_CLZ64; -extern cashew::IString WASM_POPCNT32; -extern cashew::IString WASM_POPCNT64; -extern cashew::IString WASM_ROTL32; -extern cashew::IString WASM_ROTL64; -extern cashew::IString WASM_ROTR32; -extern cashew::IString WASM_ROTR64; -extern cashew::IString WASM_MEMORY_GROW; -extern cashew::IString WASM_MEMORY_SIZE; -extern cashew::IString WASM_FETCH_HIGH_BITS; -extern cashew::IString INT64_TO_32_HIGH_BITS; -extern cashew::IString WASM_NEAREST_F32; -extern cashew::IString WASM_NEAREST_F64; -extern cashew::IString WASM_I64_MUL; -extern cashew::IString WASM_I64_SDIV; -extern cashew::IString WASM_I64_UDIV; -extern cashew::IString WASM_I64_SREM; -extern cashew::IString WASM_I64_UREM; +using IString = cashew::IString; + +extern IString TOPMOST; +extern IString INT8ARRAY; +extern IString INT16ARRAY; +extern IString INT32ARRAY; +extern IString UINT8ARRAY; +extern IString UINT16ARRAY; +extern IString UINT32ARRAY; +extern IString FLOAT32ARRAY; +extern IString FLOAT64ARRAY; +extern IString ARRAY_BUFFER; +extern IString ASM_MODULE; +extern IString MATH; +extern IString IMUL; +extern IString CLZ32; +extern IString FROUND; +extern IString ASM2WASM; +extern IString MIN; +extern IString MAX; +extern IString F64_REM; +extern IString F64_TO_INT; +extern IString F64_TO_UINT; +extern IString F64_TO_INT64; +extern IString F64_TO_UINT64; +extern IString F32_TO_INT; +extern IString F32_TO_UINT; +extern IString F32_TO_INT64; +extern IString F32_TO_UINT64; +extern IString I32S_DIV; +extern IString I32U_DIV; +extern IString I32S_REM; +extern IString I32U_REM; +extern IString ABS; +extern IString FLOOR; +extern IString CEIL; +extern IString TRUNC; +extern IString SQRT; +extern IString POW; +extern IString I32_TEMP; +extern IString DEBUGGER; +extern IString BUFFER; +extern IString ENV; +extern IString STACKTOP; +extern IString STACK_MAX; +extern IString INSTRUMENT; +extern IString MATH_IMUL; +extern IString MATH_ABS; +extern IString MATH_CLZ32; +extern IString MATH_CEIL; +extern IString MATH_FLOOR; +extern IString MATH_TRUNC; +extern IString MATH_SQRT; +extern IString MATH_MIN; +extern IString MATH_MAX; +extern IString WASM_CTZ32; +extern IString WASM_CTZ64; +extern IString WASM_CLZ32; +extern IString WASM_CLZ64; +extern IString WASM_POPCNT32; +extern IString WASM_POPCNT64; +extern IString WASM_ROTL32; +extern IString WASM_ROTL64; +extern IString WASM_ROTR32; +extern IString WASM_ROTR64; +extern IString WASM_MEMORY_GROW; +extern IString WASM_MEMORY_SIZE; +extern IString WASM_FETCH_HIGH_BITS; +extern IString INT64_TO_32_HIGH_BITS; +extern IString WASM_NEAREST_F32; +extern IString WASM_NEAREST_F64; +extern IString WASM_I64_MUL; +extern IString WASM_I64_SDIV; +extern IString WASM_I64_UDIV; +extern IString WASM_I64_SREM; +extern IString WASM_I64_UREM; // wasm2js constants -extern cashew::IString ASM_FUNC; -extern cashew::IString FUNCTION_TABLE; -extern cashew::IString NO_RESULT; -extern cashew::IString EXPRESSION_RESULT; +extern IString ASM_FUNC; +extern IString FUNCTION_TABLE; +extern IString NO_RESULT; +extern IString EXPRESSION_RESULT; } // namespace wasm #endif // wasm_asmjs_shared_constants_h diff --git a/src/wasm/wasm-s-parser.cpp b/src/wasm/wasm-s-parser.cpp index b23419071..172ef15b6 100644 --- a/src/wasm/wasm-s-parser.cpp +++ b/src/wasm/wasm-s-parser.cpp @@ -32,8 +32,6 @@ #define element_assert(condition) \ assert((condition) ? true : (std::cerr << "on: " << *this << '\n' && 0)); -using cashew::IString; - namespace { int unhex(char c) { if (c >= '0' && c <= '9') { @@ -1621,8 +1619,7 @@ Expression* SExpressionWasmBuilder::makeThenOrElse(Element& s) { return ret; } -static Expression* -parseConst(cashew::IString s, Type type, MixedArena& allocator) { +static Expression* parseConst(IString s, Type type, MixedArena& allocator) { const char* str = s.str; auto ret = allocator.alloc<Const>(); ret->type = type; |