1 /* 2 * Copyright 2015 WebAssembly Community Group participants 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 #ifndef wasm_asmjs_shared_constants_h 18 #define wasm_asmjs_shared_constants_h 19 20 #include "emscripten-optimizer/istring.h" 21 22 namespace wasm { 23 24 extern cashew::IString GLOBAL; 25 extern cashew::IString NAN_; 26 extern cashew::IString INFINITY_; 27 extern cashew::IString NAN__; 28 extern cashew::IString INFINITY__; 29 extern cashew::IString TOPMOST; 30 extern cashew::IString INT8ARRAY; 31 extern cashew::IString INT16ARRAY; 32 extern cashew::IString INT32ARRAY; 33 extern cashew::IString UINT8ARRAY; 34 extern cashew::IString UINT16ARRAY; 35 extern cashew::IString UINT32ARRAY; 36 extern cashew::IString FLOAT32ARRAY; 37 extern cashew::IString FLOAT64ARRAY; 38 extern cashew::IString ARRAY_BUFFER; 39 extern cashew::IString ASM_MODULE; 40 extern cashew::IString IMPOSSIBLE_CONTINUE; 41 extern cashew::IString MATH; 42 extern cashew::IString IMUL; 43 extern cashew::IString CLZ32; 44 extern cashew::IString FROUND; 45 extern cashew::IString ASM2WASM; 46 extern cashew::IString MIN; 47 extern cashew::IString MAX; 48 extern cashew::IString F64_REM; 49 extern cashew::IString F64_TO_INT; 50 extern cashew::IString F64_TO_UINT; 51 extern cashew::IString F64_TO_INT64; 52 extern cashew::IString F64_TO_UINT64; 53 extern cashew::IString F32_TO_INT; 54 extern cashew::IString F32_TO_UINT; 55 extern cashew::IString F32_TO_INT64; 56 extern cashew::IString F32_TO_UINT64; 57 extern cashew::IString I32S_DIV; 58 extern cashew::IString I32U_DIV; 59 extern cashew::IString I32S_REM; 60 extern cashew::IString I32U_REM; 61 extern cashew::IString GLOBAL_MATH; 62 extern cashew::IString ABS; 63 extern cashew::IString FLOOR; 64 extern cashew::IString CEIL; 65 extern cashew::IString SQRT; 66 extern cashew::IString POW; 67 extern cashew::IString I32_TEMP; 68 extern cashew::IString DEBUGGER; 69 extern cashew::IString BUFFER; 70 extern cashew::IString ENV; 71 extern cashew::IString STACKTOP; 72 extern cashew::IString STACK_MAX; 73 extern cashew::IString INSTRUMENT; 74 extern cashew::IString MATH_IMUL; 75 extern cashew::IString MATH_ABS; 76 extern cashew::IString MATH_CEIL; 77 extern cashew::IString MATH_CLZ32; 78 extern cashew::IString MATH_FLOOR; 79 extern cashew::IString MATH_TRUNC; 80 extern cashew::IString MATH_SQRT; 81 extern cashew::IString MATH_MIN; 82 extern cashew::IString MATH_MAX; 83 extern cashew::IString WASM_CTZ32; 84 extern cashew::IString WASM_CTZ64; 85 extern cashew::IString WASM_CLZ32; 86 extern cashew::IString WASM_CLZ64; 87 extern cashew::IString WASM_POPCNT32; 88 extern cashew::IString WASM_POPCNT64; 89 extern cashew::IString WASM_ROTL32; 90 extern cashew::IString WASM_ROTL64; 91 extern cashew::IString WASM_ROTR32; 92 extern cashew::IString WASM_ROTR64; 93 extern cashew::IString WASM_MEMORY_GROW; 94 extern cashew::IString WASM_MEMORY_SIZE; 95 extern cashew::IString WASM_FETCH_HIGH_BITS; 96 extern cashew::IString INT64_TO_32_HIGH_BITS; 97 extern cashew::IString WASM_NEAREST_F32; 98 extern cashew::IString WASM_NEAREST_F64; 99 extern cashew::IString WASM_TRUNC_F32; 100 extern cashew::IString WASM_TRUNC_F64; 101 extern cashew::IString WASM_I64_MUL; 102 extern cashew::IString WASM_I64_SDIV; 103 extern cashew::IString WASM_I64_UDIV; 104 extern cashew::IString WASM_I64_SREM; 105 extern cashew::IString WASM_I64_UREM; 106 // wasm2js constants 107 extern cashew::IString ASM_FUNC; 108 extern cashew::IString ABORT_FUNC; 109 extern cashew::IString FUNCTION_TABLE; 110 extern cashew::IString NO_RESULT; 111 extern cashew::IString EXPRESSION_RESULT; 112 } // namespace wasm 113 114 #endif // wasm_asmjs_shared_constants_h 115