Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(426)

Unified Diff: src/wasm/wasm-objects.h

Issue 2731523005: [wasm] Lazy compilation for asm.js (Closed)
Patch Set: [wasm] Lazy compilation for asm.js Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/wasm/wasm-module.cc ('k') | src/wasm/wasm-objects.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
« no previous file with comments | « src/wasm/wasm-module.cc ('k') | src/wasm/wasm-objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698