| 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 362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 373 | 373 |
| 374 ptrdiff_t pc = result.error_pc - result.start; | 374 ptrdiff_t pc = result.error_pc - result.start; |
| 375 ptrdiff_t pt = result.error_pt - result.start; | 375 ptrdiff_t pt = result.error_pt - result.start; |
| 376 std::ostringstream str; | 376 std::ostringstream str; |
| 377 str << "Verification failed: " << result.error_code << " pc = +" << pc; | 377 str << "Verification failed: " << result.error_code << " pc = +" << pc; |
| 378 if (result.error_pt) str << ", pt = +" << pt; | 378 if (result.error_pt) str << ", pt = +" << pt; |
| 379 str << ", msg = " << result.error_msg.get(); | 379 str << ", msg = " << result.error_msg.get(); |
| 380 FATAL(str.str().c_str()); | 380 FATAL(str.str().c_str()); |
| 381 } | 381 } |
| 382 builder.Int64LoweringForTesting(); | 382 builder.Int64LoweringForTesting(); |
| 383 if (!CpuFeatures::SupportsSimd128()) { | 383 if (!CpuFeatures::SupportsWasmSimd128()) { |
| 384 builder.SimdScalarLoweringForTesting(); | 384 builder.SimdScalarLoweringForTesting(); |
| 385 } | 385 } |
| 386 } | 386 } |
| 387 | 387 |
| 388 class WasmFunctionWrapper : private GraphAndBuilders { | 388 class WasmFunctionWrapper : private GraphAndBuilders { |
| 389 public: | 389 public: |
| 390 explicit WasmFunctionWrapper(Zone* zone, int num_params) | 390 explicit WasmFunctionWrapper(Zone* zone, int num_params) |
| 391 : GraphAndBuilders(zone), inner_code_node_(nullptr), signature_(nullptr) { | 391 : GraphAndBuilders(zone), inner_code_node_(nullptr), signature_(nullptr) { |
| 392 // One additional parameter for the pointer to the return value memory. | 392 // One additional parameter for the pointer to the return value memory. |
| 393 Signature<MachineType>::Builder sig_builder(zone, 1, num_params + 1); | 393 Signature<MachineType>::Builder sig_builder(zone, 1, num_params + 1); |
| (...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 849 void RunWasm_##name(WasmExecutionMode execution_mode) | 849 void RunWasm_##name(WasmExecutionMode execution_mode) |
| 850 | 850 |
| 851 #define WASM_EXEC_COMPILED_TEST(name) \ | 851 #define WASM_EXEC_COMPILED_TEST(name) \ |
| 852 void RunWasm_##name(WasmExecutionMode execution_mode); \ | 852 void RunWasm_##name(WasmExecutionMode execution_mode); \ |
| 853 TEST(RunWasmCompiled_##name) { RunWasm_##name(kExecuteCompiled); } \ | 853 TEST(RunWasmCompiled_##name) { RunWasm_##name(kExecuteCompiled); } \ |
| 854 void RunWasm_##name(WasmExecutionMode execution_mode) | 854 void RunWasm_##name(WasmExecutionMode execution_mode) |
| 855 | 855 |
| 856 } // namespace | 856 } // namespace |
| 857 | 857 |
| 858 #endif | 858 #endif |
| OLD | NEW |