summaryrefslogtreecommitdiff
path: root/src/asmjs/shared-constants.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/asmjs/shared-constants.cpp')
-rw-r--r--src/asmjs/shared-constants.cpp186
1 files changed, 94 insertions, 92 deletions
diff --git a/src/asmjs/shared-constants.cpp b/src/asmjs/shared-constants.cpp
index f66b5de18..6cb350f9f 100644
--- a/src/asmjs/shared-constants.cpp
+++ b/src/asmjs/shared-constants.cpp
@@ -18,104 +18,106 @@
namespace wasm {
-cashew::IString TOPMOST("topmost");
-cashew::IString INT8ARRAY("Int8Array");
-cashew::IString INT16ARRAY("Int16Array");
-cashew::IString INT32ARRAY("Int32Array");
-cashew::IString UINT8ARRAY("Uint8Array");
-cashew::IString UINT16ARRAY("Uint16Array");
-cashew::IString UINT32ARRAY("Uint32Array");
-cashew::IString FLOAT32ARRAY("Float32Array");
-cashew::IString FLOAT64ARRAY("Float64Array");
-cashew::IString ARRAY_BUFFER("ArrayBuffer");
-cashew::IString ASM_MODULE("asmModule");
-cashew::IString MATH("Math");
-cashew::IString IMUL("imul");
-cashew::IString CLZ32("clz32");
-cashew::IString FROUND("fround");
-cashew::IString ASM2WASM("asm2wasm");
-cashew::IString MIN("min");
-cashew::IString MAX("max");
-cashew::IString F64_REM("f64-rem");
-cashew::IString F64_TO_INT("f64-to-int");
-cashew::IString F64_TO_UINT("f64-to-uint");
-cashew::IString F64_TO_INT64("f64-to-int64");
-cashew::IString F64_TO_UINT64("f64-to-uint64");
-cashew::IString F32_TO_INT("f32-to-int");
-cashew::IString F32_TO_UINT("f32-to-uint");
-cashew::IString F32_TO_INT64("f32-to-int64");
-cashew::IString F32_TO_UINT64("f32-to-uint64");
-cashew::IString I32S_DIV("i32s-div");
-cashew::IString I32U_DIV("i32u-div");
-cashew::IString I32S_REM("i32s-rem");
-cashew::IString I32U_REM("i32u-rem");
-cashew::IString ABS("abs");
-cashew::IString FLOOR("floor");
-cashew::IString CEIL("ceil");
-cashew::IString TRUNC("trunc");
-cashew::IString SQRT("sqrt");
-cashew::IString POW("pow");
-cashew::IString I32_TEMP("asm2wasm_i32_temp");
-cashew::IString DEBUGGER("debugger");
-cashew::IString BUFFER("buffer");
-cashew::IString ENV("env");
-cashew::IString STACKTOP("STACKTOP");
-cashew::IString STACK_MAX("STACK_MAX");
-cashew::IString INSTRUMENT("instrument");
-cashew::IString MATH_IMUL("Math_imul");
-cashew::IString MATH_ABS("Math_abs");
-cashew::IString MATH_CEIL("Math_ceil");
-cashew::IString MATH_CLZ32("Math_clz32");
-cashew::IString MATH_FLOOR("Math_floor");
-cashew::IString MATH_TRUNC("Math_trunc");
-cashew::IString MATH_SQRT("Math_sqrt");
-cashew::IString MATH_MIN("Math_min");
-cashew::IString MATH_MAX("Math_max");
-cashew::IString WASM_CTZ32("__wasm_ctz_i32");
-cashew::IString WASM_CTZ64("__wasm_ctz_i64");
-cashew::IString WASM_CLZ32("__wasm_clz_i32");
-cashew::IString WASM_CLZ64("__wasm_clz_i64");
-cashew::IString WASM_POPCNT32("__wasm_popcnt_i32");
-cashew::IString WASM_POPCNT64("__wasm_popcnt_i64");
-cashew::IString WASM_ROTL32("__wasm_rotl_i32");
-cashew::IString WASM_ROTL64("__wasm_rotl_i64");
-cashew::IString WASM_ROTR32("__wasm_rotr_i32");
-cashew::IString WASM_ROTR64("__wasm_rotr_i64");
-cashew::IString WASM_MEMORY_GROW("__wasm_memory_grow");
-cashew::IString WASM_MEMORY_SIZE("__wasm_memory_size");
-cashew::IString WASM_FETCH_HIGH_BITS("__wasm_fetch_high_bits");
-cashew::IString INT64_TO_32_HIGH_BITS("i64toi32_i32$HIGH_BITS");
-cashew::IString WASM_NEAREST_F32("__wasm_nearest_f32");
-cashew::IString WASM_NEAREST_F64("__wasm_nearest_f64");
-cashew::IString WASM_I64_MUL("__wasm_i64_mul");
-cashew::IString WASM_I64_SDIV("__wasm_i64_sdiv");
-cashew::IString WASM_I64_UDIV("__wasm_i64_udiv");
-cashew::IString WASM_I64_SREM("__wasm_i64_srem");
-cashew::IString WASM_I64_UREM("__wasm_i64_urem");
+using IString = cashew::IString;
-cashew::IString ASM_FUNC("asmFunc");
-cashew::IString FUNCTION_TABLE("FUNCTION_TABLE");
-cashew::IString NO_RESULT("wasm2js$noresult"); // no result at all
+IString TOPMOST("topmost");
+IString INT8ARRAY("Int8Array");
+IString INT16ARRAY("Int16Array");
+IString INT32ARRAY("Int32Array");
+IString UINT8ARRAY("Uint8Array");
+IString UINT16ARRAY("Uint16Array");
+IString UINT32ARRAY("Uint32Array");
+IString FLOAT32ARRAY("Float32Array");
+IString FLOAT64ARRAY("Float64Array");
+IString ARRAY_BUFFER("ArrayBuffer");
+IString ASM_MODULE("asmModule");
+IString MATH("Math");
+IString IMUL("imul");
+IString CLZ32("clz32");
+IString FROUND("fround");
+IString ASM2WASM("asm2wasm");
+IString MIN("min");
+IString MAX("max");
+IString F64_REM("f64-rem");
+IString F64_TO_INT("f64-to-int");
+IString F64_TO_UINT("f64-to-uint");
+IString F64_TO_INT64("f64-to-int64");
+IString F64_TO_UINT64("f64-to-uint64");
+IString F32_TO_INT("f32-to-int");
+IString F32_TO_UINT("f32-to-uint");
+IString F32_TO_INT64("f32-to-int64");
+IString F32_TO_UINT64("f32-to-uint64");
+IString I32S_DIV("i32s-div");
+IString I32U_DIV("i32u-div");
+IString I32S_REM("i32s-rem");
+IString I32U_REM("i32u-rem");
+IString ABS("abs");
+IString FLOOR("floor");
+IString CEIL("ceil");
+IString TRUNC("trunc");
+IString SQRT("sqrt");
+IString POW("pow");
+IString I32_TEMP("asm2wasm_i32_temp");
+IString DEBUGGER("debugger");
+IString BUFFER("buffer");
+IString ENV("env");
+IString STACKTOP("STACKTOP");
+IString STACK_MAX("STACK_MAX");
+IString INSTRUMENT("instrument");
+IString MATH_IMUL("Math_imul");
+IString MATH_ABS("Math_abs");
+IString MATH_CEIL("Math_ceil");
+IString MATH_CLZ32("Math_clz32");
+IString MATH_FLOOR("Math_floor");
+IString MATH_TRUNC("Math_trunc");
+IString MATH_SQRT("Math_sqrt");
+IString MATH_MIN("Math_min");
+IString MATH_MAX("Math_max");
+IString WASM_CTZ32("__wasm_ctz_i32");
+IString WASM_CTZ64("__wasm_ctz_i64");
+IString WASM_CLZ32("__wasm_clz_i32");
+IString WASM_CLZ64("__wasm_clz_i64");
+IString WASM_POPCNT32("__wasm_popcnt_i32");
+IString WASM_POPCNT64("__wasm_popcnt_i64");
+IString WASM_ROTL32("__wasm_rotl_i32");
+IString WASM_ROTL64("__wasm_rotl_i64");
+IString WASM_ROTR32("__wasm_rotr_i32");
+IString WASM_ROTR64("__wasm_rotr_i64");
+IString WASM_MEMORY_GROW("__wasm_memory_grow");
+IString WASM_MEMORY_SIZE("__wasm_memory_size");
+IString WASM_FETCH_HIGH_BITS("__wasm_fetch_high_bits");
+IString INT64_TO_32_HIGH_BITS("i64toi32_i32$HIGH_BITS");
+IString WASM_NEAREST_F32("__wasm_nearest_f32");
+IString WASM_NEAREST_F64("__wasm_nearest_f64");
+IString WASM_I64_MUL("__wasm_i64_mul");
+IString WASM_I64_SDIV("__wasm_i64_sdiv");
+IString WASM_I64_UDIV("__wasm_i64_udiv");
+IString WASM_I64_SREM("__wasm_i64_srem");
+IString WASM_I64_UREM("__wasm_i64_urem");
+
+IString ASM_FUNC("asmFunc");
+IString FUNCTION_TABLE("FUNCTION_TABLE");
+IString NO_RESULT("wasm2js$noresult"); // no result at all
// result in an expression, no temp var
-cashew::IString EXPRESSION_RESULT("wasm2js$expresult");
+IString EXPRESSION_RESULT("wasm2js$expresult");
namespace ABI {
namespace wasm2js {
-cashew::IString SCRATCH_LOAD_I32("wasm2js_scratch_load_i32");
-cashew::IString SCRATCH_STORE_I32("wasm2js_scratch_store_i32");
-cashew::IString SCRATCH_LOAD_F32("wasm2js_scratch_load_f32");
-cashew::IString SCRATCH_STORE_F32("wasm2js_scratch_store_f32");
-cashew::IString SCRATCH_LOAD_F64("wasm2js_scratch_load_f64");
-cashew::IString SCRATCH_STORE_F64("wasm2js_scratch_store_f64");
-cashew::IString MEMORY_INIT("wasm2js_memory_init");
-cashew::IString MEMORY_FILL("wasm2js_memory_fill");
-cashew::IString MEMORY_COPY("wasm2js_memory_copy");
-cashew::IString DATA_DROP("wasm2js_data_drop");
-cashew::IString ATOMIC_WAIT_I32("wasm2js_atomic_wait_i32");
-cashew::IString ATOMIC_RMW_I64("wasm2js_atomic_rmw_i64");
-cashew::IString GET_STASHED_BITS("wasm2js_get_stashed_bits");
-cashew::IString TRAP("wasm2js_trap");
+IString SCRATCH_LOAD_I32("wasm2js_scratch_load_i32");
+IString SCRATCH_STORE_I32("wasm2js_scratch_store_i32");
+IString SCRATCH_LOAD_F32("wasm2js_scratch_load_f32");
+IString SCRATCH_STORE_F32("wasm2js_scratch_store_f32");
+IString SCRATCH_LOAD_F64("wasm2js_scratch_load_f64");
+IString SCRATCH_STORE_F64("wasm2js_scratch_store_f64");
+IString MEMORY_INIT("wasm2js_memory_init");
+IString MEMORY_FILL("wasm2js_memory_fill");
+IString MEMORY_COPY("wasm2js_memory_copy");
+IString DATA_DROP("wasm2js_data_drop");
+IString ATOMIC_WAIT_I32("wasm2js_atomic_wait_i32");
+IString ATOMIC_RMW_I64("wasm2js_atomic_rmw_i64");
+IString GET_STASHED_BITS("wasm2js_get_stashed_bits");
+IString TRAP("wasm2js_trap");
} // namespace wasm2js
} // namespace ABI