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 397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
408 | 408 |
409 rep_builder.AddReturn(MachineRepresentation::kWord32); | 409 rep_builder.AddReturn(MachineRepresentation::kWord32); |
410 for (int i = 0; i < WASM_RUNNER_MAX_NUM_PARAMETERS + 1; i++) { | 410 for (int i = 0; i < WASM_RUNNER_MAX_NUM_PARAMETERS + 1; i++) { |
411 rep_builder.AddParam(MachineRepresentation::kWord32); | 411 rep_builder.AddParam(MachineRepresentation::kWord32); |
412 } | 412 } |
413 Int64Lowering r(graph(), machine(), common(), zone(), | 413 Int64Lowering r(graph(), machine(), common(), zone(), |
414 rep_builder.Build()); | 414 rep_builder.Build()); |
415 r.LowerGraph(); | 415 r.LowerGraph(); |
416 } | 416 } |
417 | 417 |
418 CompilationInfo info(ArrayVector("testing"), isolate, graph()->zone()); | 418 CompilationInfo info(ArrayVector("testing"), isolate, graph()->zone(), |
| 419 Code::ComputeFlags(Code::STUB)); |
419 code_ = | 420 code_ = |
420 Pipeline::GenerateCodeForTesting(&info, descriptor, graph(), nullptr); | 421 Pipeline::GenerateCodeForTesting(&info, descriptor, graph(), nullptr); |
421 CHECK(!code_.is_null()); | 422 CHECK(!code_.is_null()); |
422 #ifdef ENABLE_DISASSEMBLER | 423 #ifdef ENABLE_DISASSEMBLER |
423 if (FLAG_print_opt_code) { | 424 if (FLAG_print_opt_code) { |
424 OFStream os(stdout); | 425 OFStream os(stdout); |
425 code_->Disassemble("wasm wrapper", os); | 426 code_->Disassemble("wasm wrapper", os); |
426 } | 427 } |
427 #endif | 428 #endif |
428 } | 429 } |
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
774 // interpreter. | 775 // interpreter. |
775 #define WASM_EXEC_TEST(name) \ | 776 #define WASM_EXEC_TEST(name) \ |
776 void RunWasm_##name(WasmExecutionMode execution_mode); \ | 777 void RunWasm_##name(WasmExecutionMode execution_mode); \ |
777 TEST(RunWasmCompiled_##name) { RunWasm_##name(kExecuteCompiled); } \ | 778 TEST(RunWasmCompiled_##name) { RunWasm_##name(kExecuteCompiled); } \ |
778 TEST(RunWasmInterpreted_##name) { RunWasm_##name(kExecuteInterpreted); } \ | 779 TEST(RunWasmInterpreted_##name) { RunWasm_##name(kExecuteInterpreted); } \ |
779 void RunWasm_##name(WasmExecutionMode execution_mode) | 780 void RunWasm_##name(WasmExecutionMode execution_mode) |
780 | 781 |
781 } // namespace | 782 } // namespace |
782 | 783 |
783 #endif | 784 #endif |
OLD | NEW |