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 546 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
557 | 557 |
558 Handle<Code> Compile() { | 558 Handle<Code> Compile() { |
559 InitializeDescriptor(); | 559 InitializeDescriptor(); |
560 CallDescriptor* desc = descriptor_; | 560 CallDescriptor* desc = descriptor_; |
561 if (kPointerSize == 4) { | 561 if (kPointerSize == 4) { |
562 desc = testing_module_->GetI32WasmCallDescriptor(this->zone(), desc); | 562 desc = testing_module_->GetI32WasmCallDescriptor(this->zone(), desc); |
563 } | 563 } |
564 CompilationInfo info(debug_name_, this->isolate(), this->zone(), | 564 CompilationInfo info(debug_name_, this->isolate(), this->zone(), |
565 Code::ComputeFlags(Code::WASM_FUNCTION)); | 565 Code::ComputeFlags(Code::WASM_FUNCTION)); |
566 std::unique_ptr<CompilationJob> job(Pipeline::NewWasmCompilationJob( | 566 std::unique_ptr<CompilationJob> job(Pipeline::NewWasmCompilationJob( |
567 &info, graph(), desc, &source_position_table_)); | 567 &info, &jsgraph, desc, &source_position_table_)); |
568 if (job->ExecuteJob() != CompilationJob::SUCCEEDED || | 568 if (job->ExecuteJob() != CompilationJob::SUCCEEDED || |
569 job->FinalizeJob() != CompilationJob::SUCCEEDED) | 569 job->FinalizeJob() != CompilationJob::SUCCEEDED) |
570 return Handle<Code>::null(); | 570 return Handle<Code>::null(); |
571 | 571 |
572 Handle<Code> code = info.code(); | 572 Handle<Code> code = info.code(); |
573 | 573 |
574 // Length is always 2, since usually <wasm_obj, func_index> is stored in | 574 // Length is always 2, since usually <wasm_obj, func_index> is stored in |
575 // the deopt data. Here, we only store the function index. | 575 // the deopt data. Here, we only store the function index. |
576 DCHECK(code->deoptimization_data() == nullptr || | 576 DCHECK(code->deoptimization_data() == nullptr || |
577 code->deoptimization_data()->length() == 0); | 577 code->deoptimization_data()->length() == 0); |
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
794 // interpreter. | 794 // interpreter. |
795 #define WASM_EXEC_TEST(name) \ | 795 #define WASM_EXEC_TEST(name) \ |
796 void RunWasm_##name(WasmExecutionMode execution_mode); \ | 796 void RunWasm_##name(WasmExecutionMode execution_mode); \ |
797 TEST(RunWasmCompiled_##name) { RunWasm_##name(kExecuteCompiled); } \ | 797 TEST(RunWasmCompiled_##name) { RunWasm_##name(kExecuteCompiled); } \ |
798 TEST(RunWasmInterpreted_##name) { RunWasm_##name(kExecuteInterpreted); } \ | 798 TEST(RunWasmInterpreted_##name) { RunWasm_##name(kExecuteInterpreted); } \ |
799 void RunWasm_##name(WasmExecutionMode execution_mode) | 799 void RunWasm_##name(WasmExecutionMode execution_mode) |
800 | 800 |
801 } // namespace | 801 } // namespace |
802 | 802 |
803 #endif | 803 #endif |
OLD | NEW |