| 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 507 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 518 Handle<Code> CompileLazy(Isolate* isolate); | 518 Handle<Code> CompileLazy(Isolate* isolate); | 
| 519 | 519 | 
| 520 // This class orchestrates the lazy compilation of wasm functions. It is | 520 // This class orchestrates the lazy compilation of wasm functions. It is | 
| 521 // triggered by the WasmCompileLazy builtin. | 521 // triggered by the WasmCompileLazy builtin. | 
| 522 // It contains the logic for compiling and specializing wasm functions, and | 522 // It contains the logic for compiling and specializing wasm functions, and | 
| 523 // patching the calling wasm code. | 523 // patching the calling wasm code. | 
| 524 // Once we support concurrent lazy compilation, this class will contain the | 524 // Once we support concurrent lazy compilation, this class will contain the | 
| 525 // logic to actually orchestrate parallel execution of wasm compilation jobs. | 525 // logic to actually orchestrate parallel execution of wasm compilation jobs. | 
| 526 // TODO(clemensh): Implement concurrent lazy compilation. | 526 // TODO(clemensh): Implement concurrent lazy compilation. | 
| 527 class LazyCompilationOrchestrator { | 527 class LazyCompilationOrchestrator { | 
| 528   void CompileFunction(Isolate*, Handle<WasmInstanceObject>, int func_index, | 528   void CompileFunction(Isolate*, Handle<WasmInstanceObject>, int func_index); | 
| 529                        Counters* counters); |  | 
| 530 | 529 | 
| 531  public: | 530  public: | 
| 532   Handle<Code> CompileLazy(Isolate*, Handle<WasmInstanceObject>, | 531   Handle<Code> CompileLazy(Isolate*, Handle<WasmInstanceObject>, | 
| 533                            Handle<Code> caller, int call_offset, | 532                            Handle<Code> caller, int call_offset, | 
| 534                            int exported_func_index, bool patch_caller); | 533                            int exported_func_index, bool patch_caller); | 
| 535 }; | 534 }; | 
| 536 | 535 | 
| 537 namespace testing { | 536 namespace testing { | 
| 538 void ValidateInstancesChain(Isolate* isolate, | 537 void ValidateInstancesChain(Isolate* isolate, | 
| 539                             Handle<WasmModuleObject> module_obj, | 538                             Handle<WasmModuleObject> module_obj, | 
| 540                             int instance_count); | 539                             int instance_count); | 
| 541 void ValidateModuleState(Isolate* isolate, Handle<WasmModuleObject> module_obj); | 540 void ValidateModuleState(Isolate* isolate, Handle<WasmModuleObject> module_obj); | 
| 542 void ValidateOrphanedInstance(Isolate* isolate, | 541 void ValidateOrphanedInstance(Isolate* isolate, | 
| 543                               Handle<WasmInstanceObject> instance); | 542                               Handle<WasmInstanceObject> instance); | 
| 544 }  // namespace testing | 543 }  // namespace testing | 
| 545 }  // namespace wasm | 544 }  // namespace wasm | 
| 546 }  // namespace internal | 545 }  // namespace internal | 
| 547 }  // namespace v8 | 546 }  // namespace v8 | 
| 548 | 547 | 
| 549 #endif  // V8_WASM_MODULE_H_ | 548 #endif  // V8_WASM_MODULE_H_ | 
| OLD | NEW | 
|---|