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