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

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

Issue 2305903002: [wasm] reuse the first compiled module (Closed)
Patch Set: use HeapNumber for storing mem size Created 4 years, 3 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
Index: src/wasm/wasm-module.h
diff --git a/src/wasm/wasm-module.h b/src/wasm/wasm-module.h
index f3b9b8c15c68784dfabd493e0ee7826a6ce0234e..4d97f6ca99d43dde4edb4623045ca077632d2ec8 100644
--- a/src/wasm/wasm-module.h
+++ b/src/wasm/wasm-module.h
@@ -415,6 +415,10 @@ MaybeHandle<JSObject> CreateModuleObjectFromBytes(Isolate* isolate,
// was collected, or the instance object owning the Code object
Object* GetOwningWasmInstance(Object* undefined, Code* code);
+MaybeHandle<JSArrayBuffer> GetInstanceMemory(Isolate* isolate,
+ Handle<JSObject> instance);
+void SetInstanceMemory(Handle<JSObject> instance, JSArrayBuffer* buffer);
+
namespace testing {
// Decode, verify, and run the function labeled "main" in the
@@ -425,6 +429,12 @@ int32_t CompileAndRunWasmModule(Isolate* isolate, const byte* module_start,
int32_t CallFunction(Isolate* isolate, Handle<JSObject> instance,
ErrorThrower* thrower, const char* name, int argc,
Handle<Object> argv[], bool asm_js = false);
+
+void ValidateInstancesChain(Isolate* isolate, Handle<JSObject> module_obj,
+ int instance_count);
+void ValidateModuleState(Isolate* isolate, Handle<JSObject> module_obj);
+void ValidateOrphanedInstance(Isolate* isolate, Handle<JSObject> instance);
+
} // namespace testing
} // namespace wasm
} // namespace internal

Powered by Google App Engine
This is Rietveld 408576698