| OLD | NEW |
| 1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef WASM_RUN_UTILS_H | 5 #ifndef WASM_RUN_UTILS_H |
| 6 #define WASM_RUN_UTILS_H | 6 #define WASM_RUN_UTILS_H |
| 7 | 7 |
| 8 #include <setjmp.h> | 8 #include <setjmp.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 #include <stdlib.h> | 10 #include <stdlib.h> |
| (...skipping 809 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 820 #define WASM_EXEC_TEST(name) \ | 820 #define WASM_EXEC_TEST(name) \ |
| 821 void RunWasm_##name(WasmExecutionMode execution_mode); \ | 821 void RunWasm_##name(WasmExecutionMode execution_mode); \ |
| 822 TEST(RunWasmCompiled_##name) { RunWasm_##name(kExecuteCompiled); } \ | 822 TEST(RunWasmCompiled_##name) { RunWasm_##name(kExecuteCompiled); } \ |
| 823 TEST(RunWasmInterpreted_##name) { RunWasm_##name(kExecuteInterpreted); } \ | 823 TEST(RunWasmInterpreted_##name) { RunWasm_##name(kExecuteInterpreted); } \ |
| 824 void RunWasm_##name(WasmExecutionMode execution_mode) | 824 void RunWasm_##name(WasmExecutionMode execution_mode) |
| 825 | 825 |
| 826 #define WASM_EXEC_TEST_WITH_TRAP(name) \ | 826 #define WASM_EXEC_TEST_WITH_TRAP(name) \ |
| 827 void RunWasm_##name(WasmExecutionMode execution_mode); \ | 827 void RunWasm_##name(WasmExecutionMode execution_mode); \ |
| 828 TEST(RunWasmCompiled_##name) { RunWasm_##name(kExecuteCompiled); } \ | 828 TEST(RunWasmCompiled_##name) { RunWasm_##name(kExecuteCompiled); } \ |
| 829 void RunWasm_##name(WasmExecutionMode execution_mode); \ | 829 void RunWasm_##name(WasmExecutionMode execution_mode); \ |
| 830 TEST(RunWasmCompiledWithoutTrapIf_##name) { \ | 830 TEST(RunWasmCompiledWithTrapIf_##name) { \ |
| 831 bool trap_if = FLAG_wasm_trap_if; \ | 831 bool trap_if = FLAG_wasm_trap_if; \ |
| 832 FLAG_wasm_trap_if = false; \ | 832 FLAG_wasm_trap_if = true; \ |
| 833 RunWasm_##name(kExecuteCompiled); \ | 833 RunWasm_##name(kExecuteCompiled); \ |
| 834 FLAG_wasm_trap_if = trap_if; \ | 834 FLAG_wasm_trap_if = trap_if; \ |
| 835 } \ | 835 } \ |
| 836 TEST(RunWasmInterpreted_##name) { RunWasm_##name(kExecuteInterpreted); } \ | 836 TEST(RunWasmInterpreted_##name) { RunWasm_##name(kExecuteInterpreted); } \ |
| 837 void RunWasm_##name(WasmExecutionMode execution_mode) | 837 void RunWasm_##name(WasmExecutionMode execution_mode) |
| 838 | 838 |
| 839 #define WASM_EXEC_COMPILED_TEST(name) \ | 839 #define WASM_EXEC_COMPILED_TEST(name) \ |
| 840 void RunWasm_##name(WasmExecutionMode execution_mode); \ | 840 void RunWasm_##name(WasmExecutionMode execution_mode); \ |
| 841 TEST(RunWasmCompiled_##name) { RunWasm_##name(kExecuteCompiled); } \ | 841 TEST(RunWasmCompiled_##name) { RunWasm_##name(kExecuteCompiled); } \ |
| 842 void RunWasm_##name(WasmExecutionMode execution_mode) | 842 void RunWasm_##name(WasmExecutionMode execution_mode) |
| 843 | 843 |
| 844 } // namespace | 844 } // namespace |
| 845 | 845 |
| 846 #endif | 846 #endif |
| OLD | NEW |