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 <stdint.h> | 8 #include <stdint.h> |
9 #include <stdlib.h> | 9 #include <stdlib.h> |
10 #include <string.h> | 10 #include <string.h> |
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
293 | 293 |
294 ptrdiff_t pc = result.error_pc - result.start; | 294 ptrdiff_t pc = result.error_pc - result.start; |
295 ptrdiff_t pt = result.error_pt - result.start; | 295 ptrdiff_t pt = result.error_pt - result.start; |
296 std::ostringstream str; | 296 std::ostringstream str; |
297 str << "Verification failed: " << result.error_code << " pc = +" << pc; | 297 str << "Verification failed: " << result.error_code << " pc = +" << pc; |
298 if (result.error_pt) str << ", pt = +" << pt; | 298 if (result.error_pt) str << ", pt = +" << pt; |
299 str << ", msg = " << result.error_msg.get(); | 299 str << ", msg = " << result.error_msg.get(); |
300 FATAL(str.str().c_str()); | 300 FATAL(str.str().c_str()); |
301 } | 301 } |
302 builder.Int64LoweringForTesting(); | 302 builder.Int64LoweringForTesting(); |
| 303 builder.SimdScalarLoweringForTesting(); |
303 if (FLAG_trace_turbo_graph) { | 304 if (FLAG_trace_turbo_graph) { |
304 OFStream os(stdout); | 305 OFStream os(stdout); |
305 os << AsRPO(*jsgraph->graph()); | 306 os << AsRPO(*jsgraph->graph()); |
306 } | 307 } |
307 } | 308 } |
308 | 309 |
309 template <typename ReturnType> | 310 template <typename ReturnType> |
310 class WasmFunctionWrapper : public HandleAndZoneScope, | 311 class WasmFunctionWrapper : public HandleAndZoneScope, |
311 private GraphAndBuilders { | 312 private GraphAndBuilders { |
312 public: | 313 public: |
(...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
783 // interpreter. | 784 // interpreter. |
784 #define WASM_EXEC_TEST(name) \ | 785 #define WASM_EXEC_TEST(name) \ |
785 void RunWasm_##name(WasmExecutionMode execution_mode); \ | 786 void RunWasm_##name(WasmExecutionMode execution_mode); \ |
786 TEST(RunWasmCompiled_##name) { RunWasm_##name(kExecuteCompiled); } \ | 787 TEST(RunWasmCompiled_##name) { RunWasm_##name(kExecuteCompiled); } \ |
787 TEST(RunWasmInterpreted_##name) { RunWasm_##name(kExecuteInterpreted); } \ | 788 TEST(RunWasmInterpreted_##name) { RunWasm_##name(kExecuteInterpreted); } \ |
788 void RunWasm_##name(WasmExecutionMode execution_mode) | 789 void RunWasm_##name(WasmExecutionMode execution_mode) |
789 | 790 |
790 } // namespace | 791 } // namespace |
791 | 792 |
792 #endif | 793 #endif |
OLD | NEW |