Lines Matching defs:module

5 #include "src/wasm/module-instantiate.h"
20 #include "src/wasm/module-compiler.h"
25 #include "src/wasm/wasm-module.h"
142 Handle<Map> CreateStructMap(Isolate* isolate, const WasmModule* module,
145 const wasm::StructType* type = module->struct_type(struct_index);
169 Handle<Map> CreateArrayMap(Isolate* isolate, const WasmModule* module,
172 const wasm::ArrayType* type = module->array_type(array_index);
196 Handle<Map> CreateFuncRefMap(Isolate* isolate, const WasmModule* module,
213 void CreateMapForType(Isolate* isolate, const WasmModule* module,
221 module->isorecursive_canonical_type_ids[type_index];
240 uint32_t supertype = module->supertype(type_index);
244 CreateMapForType(isolate, module, supertype, instance, maps);
248 switch (module->types[type_index].kind) {
250 map = CreateStructMap(isolate, module, type_index, rtt_parent, instance);
253 map = CreateArrayMap(isolate, module, type_index, rtt_parent, instance);
256 map = CreateFuncRefMap(isolate, module, rtt_parent, instance);
267 // A helper class to simplify instantiating a module from a module object.
312 thrower_->TYPE("Import #%d module=\"%s\" function=\"%s\" error: %s", \
319 thrower_->TYPE("Import #%d module=\"%s\" error: %s", index, \
334 // asm.js module. This only performs non-observable lookups, which allows
336 // module instantiation fails.
391 // module's import_wrapper_cache.
443 module_(module_object->module()),
456 // Check that an imports argument was provided, if the module requires it.
519 // Actual wasm module must have either imported or created memory.
532 TRACE("New module instantiation for %p\n", native_module);
586 // module.
649 // Process the imports for the module.
705 // Process the initialization for the module's globals.
712 // that indirect function tables in this module are included in the updates
800 TRACE("Successfully built instance for module %p\n",
842 // a JSObject, if the module has imports.
844 // Look up the module first.
848 return ReportTypeError("module not found", index, module_name);
851 Handle<Object> module = result.ToHandleChecked();
853 // Look up the value in the module.
854 if (!module->IsJSReceiver()) {
855 return ReportTypeError("module is not an object or function", index,
859 result = Object::GetPropertyOrElement(isolate_, module, import_name);
936 decoder(zone, instance->module(), WasmFeatures::All(), &detected,
937 body, instance->module(), isolate, instance);
953 // asm.js module. This only performs non-observable lookups, which allows
955 // module instantiation fails.
1252 .module()
1257 // id, then the signature does not appear at all in this module,
1303 " than the module's declared maximum %u",
1312 ? WasmInstanceObject::cast(table_object->instance()).module()
1313 : instance->module();
1370 "module's declared maximum %u",
1397 ? WasmInstanceObject::cast(global_object->instance()).module()
1398 : instance->module();
1403 global_type_module, instance->module())
1405 instance->module());
1484 // We *should* never hit this case in the JS API, but the module should should
1735 // Allocate memory for a module instance as a new JSArrayBuffer.
1832 // should already be available if the module has memory, since we always
1940 const WasmModule* module = instance->module();
1941 const WasmFunction* function = &module->functions[func_index];
2009 DCHECK_LT(segment_index, instance->module()->elem_segments.size());
2010 auto& elem_segment = instance->module()->elem_segments[segment_index];
2024 IsSubtypeOf(table_object->type(), kWasmFuncRef, instance->module());
2051 auto& elem_segment = instance->module()->elem_segments[segment_index];