GetFunctionCode(uint32_t index) { DCHECK_NOT_NULL(instance); return instance->function_code[index]; } static compiler::CallDescriptor* GetWasmCallDescriptor(Zone* zone, FunctionSig* sig); static compiler::CallDescriptor* GetI32WasmCallDescriptor( Zone* zone, compiler::CallDescriptor* descriptor); static compiler::CallDescriptor* GetI32WasmCallDescriptorForSimd( Zone* zone, compiler::CallDescriptor* descriptor); }; // A helper for printing out the names of functions. struct WasmFunctionName { const WasmFunction* function_; const WasmModule* module_; WasmFunctionName(const WasmFunction* function, const ModuleEnv* menv) : function_(function), module_(menv ? menv->module : nullptr) {} }; std::ostream& operator<<(std::ostream& os, const WasmModule& module); std::ostream& operator<<(std::ostream& os, const WasmFunction& function); std::ostream& operator<<(std::ostream& os, const WasmFunctionName& name); // Extract a function name from the given wasm instance. // Returns "" if no instance is passed, the function is unnamed or // the name is not a valid UTF-8 string. // TODO(5620): Refactor once we always get a wasm instance. Handle GetWasmFunctionName(Isolate* isolate, Handle instance, uint32_t func_index); // Return the binary source bytes of a wasm module. Handle GetWasmBytes(Handle wasm); // Get the debug info associated with the given wasm object. // If no debug info exists yet, it is created automatically. Handle GetDebugInfo(Handle wasm); // Return the number of functions in the given wasm object. int GetNumberOfFunctions(Handle wasm); // Create and export JSFunction Handle WrapExportCodeAsJSFunction(Isolate* isolate, Handle export_code, Handle name, FunctionSig* sig, int func_index, Handle instance); // Check whether the given object represents a WebAssembly.Instance instance. // This checks the number and type of internal fields, so it's not 100 percent // secure. If it turns out that we need more complete checks, we could add a // special marker as internal field, which will definitely never occur anywhere // else. bool IsWasmInstance(Object* instance); // Return the compiled module object for this WASM instance. WasmCompiledModule* GetCompiledModule(Object* wasm_instance); // Check whether the wasm module was generated from asm.js code. bool WasmIsAsmJs(Object* instance, Isolate* isolate); // Get the script of the wasm module. If the origin of the module is asm.js, the // returned Script will be a JavaScript Script of Script::TYPE_NORMAL, otherwise // it's of type TYPE_WASM. Handle 登录后可以享受更多权益 您还没有登录,登录后您可以: 收藏Android系统代码 收藏喜欢的文章 多个平台共享账号 去登录 首次使用?从这里 注册
export_code, Handle name, FunctionSig* sig, int func_index, Handle instance); // Check whether the given object represents a WebAssembly.Instance instance. // This checks the number and type of internal fields, so it's not 100 percent // secure. If it turns out that we need more complete checks, we could add a // special marker as internal field, which will definitely never occur anywhere // else. bool IsWasmInstance(Object* instance); // Return the compiled module object for this WASM instance. WasmCompiledModule* GetCompiledModule(Object* wasm_instance); // Check whether the wasm module was generated from asm.js code. bool WasmIsAsmJs(Object* instance, Isolate* isolate); // Get the script of the wasm module. If the origin of the module is asm.js, the // returned Script will be a JavaScript Script of Script::TYPE_NORMAL, otherwise // it's of type TYPE_WASM. Handle 登录后可以享受更多权益 您还没有登录,登录后您可以: 收藏Android系统代码 收藏喜欢的文章 多个平台共享账号 去登录 首次使用?从这里 注册
您还没有登录,登录后您可以:
首次使用?从这里 注册