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

Unified Diff: src/wasm/module-compiler.cc

Issue 2964943002: [wasm] Introduce instance types for WebAssembly.* objects. (Closed)
Patch Set: Address rossberg comments. Created 3 years, 5 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/value-serializer.cc ('k') | src/wasm/wasm-debug.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/wasm/module-compiler.cc
diff --git a/src/wasm/module-compiler.cc b/src/wasm/module-compiler.cc
index 4196645cd0c60cead31f772dc9e54d6e7e76075a..69f24e6b2071ad8043d30af0e593acfb0eb3496e 100644
--- a/src/wasm/module-compiler.cc
+++ b/src/wasm/module-compiler.cc
@@ -1022,7 +1022,7 @@ MaybeHandle<WasmInstanceObject> InstanceBuilder::Build() {
//--------------------------------------------------------------------------
// Add instance to Memory object
//--------------------------------------------------------------------------
- DCHECK(wasm::IsWasmInstance(*instance));
+ DCHECK(instance->IsWasmInstanceObject());
if (instance->has_memory_object()) {
instance->memory_object()->AddInstance(isolate_, instance);
}
@@ -1074,7 +1074,7 @@ MaybeHandle<WasmInstanceObject> InstanceBuilder::Build() {
compiled_module_->set_weak_wasm_module(
original.ToHandleChecked()->weak_wasm_module());
}
- module_object_->SetEmbedderField(0, *compiled_module_);
+ module_object_->set_compiled_module(*compiled_module_);
compiled_module_->set_weak_owning_instance(link_to_owning_instance);
GlobalHandles::MakeWeak(
global_handle.location(), global_handle.location(),
@@ -1398,7 +1398,7 @@ int InstanceBuilder::ProcessImports(Handle<FixedArray> code_table,
auto memory = Handle<WasmMemoryObject>::cast(value);
DCHECK(WasmJs::IsWasmMemoryObject(isolate_, memory));
instance->set_memory_object(*memory);
- memory_ = Handle<JSArrayBuffer>(memory->buffer(), isolate_);
+ memory_ = Handle<JSArrayBuffer>(memory->array_buffer(), isolate_);
uint32_t imported_cur_pages = static_cast<uint32_t>(
memory_->byte_length()->Number() / WasmModule::kPageSize);
if (imported_cur_pages < module_->min_mem_pages) {
@@ -1668,7 +1668,6 @@ void InstanceBuilder::ProcessExports(
} else {
memory_object =
Handle<WasmMemoryObject>(instance->memory_object(), isolate_);
- DCHECK(WasmJs::IsWasmMemoryObject(isolate_, memory_object));
memory_object->ResetInstancesLink(isolate_);
}
« no previous file with comments | « src/value-serializer.cc ('k') | src/wasm/wasm-debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698