| Index: src/wasm/wasm-objects.h
|
| diff --git a/src/wasm/wasm-objects.h b/src/wasm/wasm-objects.h
|
| index c526a909b1ed2720cc70d6d040315911415f2b34..49f5789917a800af84a472dfb8138b5a63f45548 100644
|
| --- a/src/wasm/wasm-objects.h
|
| +++ b/src/wasm/wasm-objects.h
|
| @@ -164,6 +164,7 @@ class WasmSharedModuleData : public FixedArray {
|
| kScript,
|
| kAsmJsOffsetTable,
|
| kBreakPointInfos,
|
| + kLazyCompilationOrchestrator,
|
| kFieldCount
|
| };
|
|
|
| @@ -192,6 +193,12 @@ class WasmSharedModuleData : public FixedArray {
|
|
|
| static void SetBreakpointsOnNewInstance(Handle<WasmSharedModuleData>,
|
| Handle<WasmInstanceObject>);
|
| +
|
| + static void PrepareForLazyCompilation(Handle<WasmSharedModuleData>);
|
| +
|
| + private:
|
| + DECLARE_OPTIONAL_GETTER(lazy_compilation_orchestrator, Foreign);
|
| + friend class WasmCompiledModule;
|
| };
|
|
|
| class WasmCompiledModule : public FixedArray {
|
| @@ -400,6 +407,19 @@ class WasmCompiledModule : public FixedArray {
|
| // FixedArray with all hit breakpoint objects.
|
| MaybeHandle<FixedArray> CheckBreakPoints(int position);
|
|
|
| + // Compile lazily the function called in the given caller code object at the
|
| + // given offset.
|
| + // If the called function cannot be termined from the caller (indirect call /
|
| + // exported function), func_index must be set.
|
| + // If patch_caller is set, then at least the given all call site in the caller
|
| + // will be patched, potentially more call sites are updated.
|
| + // Returns the Code to be called at the given callsite, or an empty Handle if
|
| + // an error occured during lazy compilation. In this case, an exception has
|
| + // been set on the isolate.
|
| + static MaybeHandle<Code> CompileLazy(Isolate*, Handle<WasmInstanceObject>,
|
| + Handle<Code> caller, int offset,
|
| + int func_index, bool patch_caller);
|
| +
|
| private:
|
| void InitId();
|
|
|
|
|