| OLD | NEW |
| 1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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 V8_WASM_MODULE_H_ | 5 #ifndef V8_WASM_MODULE_H_ |
| 6 #define V8_WASM_MODULE_H_ | 6 #define V8_WASM_MODULE_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "src/api.h" | 10 #include "src/api.h" |
| (...skipping 495 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 506 Handle<Code> CompileLazy(Isolate* isolate); | 506 Handle<Code> CompileLazy(Isolate* isolate); |
| 507 | 507 |
| 508 // This class orchestrates the lazy compilation of wasm functions. It is | 508 // This class orchestrates the lazy compilation of wasm functions. It is |
| 509 // triggered by the WasmCompileLazy builtin. | 509 // triggered by the WasmCompileLazy builtin. |
| 510 // It contains the logic for compiling and specializing wasm functions, and | 510 // It contains the logic for compiling and specializing wasm functions, and |
| 511 // patching the calling wasm code. | 511 // patching the calling wasm code. |
| 512 // Once we support concurrent lazy compilation, this class will contain the | 512 // Once we support concurrent lazy compilation, this class will contain the |
| 513 // logic to actually orchestrate parallel execution of wasm compilation jobs. | 513 // logic to actually orchestrate parallel execution of wasm compilation jobs. |
| 514 // TODO(clemensh): Implement concurrent lazy compilation. | 514 // TODO(clemensh): Implement concurrent lazy compilation. |
| 515 class LazyCompilationOrchestrator { | 515 class LazyCompilationOrchestrator { |
| 516 void CompileFunction(Isolate*, Handle<WasmInstanceObject>, int func_index, | 516 void CompileFunction(Isolate*, Handle<WasmInstanceObject>, int func_index); |
| 517 Counters* counters); | |
| 518 | 517 |
| 519 public: | 518 public: |
| 520 Handle<Code> CompileLazy(Isolate*, Handle<WasmInstanceObject>, | 519 Handle<Code> CompileLazy(Isolate*, Handle<WasmInstanceObject>, |
| 521 Handle<Code> caller, int call_offset, | 520 Handle<Code> caller, int call_offset, |
| 522 int exported_func_index, bool patch_caller); | 521 int exported_func_index, bool patch_caller); |
| 523 }; | 522 }; |
| 524 | 523 |
| 525 namespace testing { | 524 namespace testing { |
| 526 void ValidateInstancesChain(Isolate* isolate, | 525 void ValidateInstancesChain(Isolate* isolate, |
| 527 Handle<WasmModuleObject> module_obj, | 526 Handle<WasmModuleObject> module_obj, |
| 528 int instance_count); | 527 int instance_count); |
| 529 void ValidateModuleState(Isolate* isolate, Handle<WasmModuleObject> module_obj); | 528 void ValidateModuleState(Isolate* isolate, Handle<WasmModuleObject> module_obj); |
| 530 void ValidateOrphanedInstance(Isolate* isolate, | 529 void ValidateOrphanedInstance(Isolate* isolate, |
| 531 Handle<WasmInstanceObject> instance); | 530 Handle<WasmInstanceObject> instance); |
| 532 } // namespace testing | 531 } // namespace testing |
| 533 } // namespace wasm | 532 } // namespace wasm |
| 534 } // namespace internal | 533 } // namespace internal |
| 535 } // namespace v8 | 534 } // namespace v8 |
| 536 | 535 |
| 537 #endif // V8_WASM_MODULE_H_ | 536 #endif // V8_WASM_MODULE_H_ |
| OLD | NEW |