From c30a6232df03e1efbd9f3b226777b07e087a1122 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Mon, 12 Oct 2020 14:27:29 +0200 Subject: BASELINE: Update Chromium to 85.0.4183.140 Change-Id: Iaa42f4680837c57725b1344f108c0196741f6057 Reviewed-by: Allan Sandfeld Jensen --- chromium/v8/src/wasm/wasm-objects.h | 88 ++++++++++--------------------------- 1 file changed, 22 insertions(+), 66 deletions(-) (limited to 'chromium/v8/src/wasm/wasm-objects.h') diff --git a/chromium/v8/src/wasm/wasm-objects.h b/chromium/v8/src/wasm/wasm-objects.h index 217bd50d154..f8ead0fe3e7 100644 --- a/chromium/v8/src/wasm/wasm-objects.h +++ b/chromium/v8/src/wasm/wasm-objects.h @@ -42,7 +42,6 @@ class BreakPoint; class JSArrayBuffer; class SeqOneByteString; class WasmCapiFunction; -class WasmDebugInfo; class WasmExceptionTag; class WasmExportedFunction; class WasmExternalFunction; @@ -67,7 +66,7 @@ class Managed; // - object = target instance, if a Wasm function, tuple if imported // - sig_id = signature id of function // - target = entrypoint to Wasm code or import wrapper code -class IndirectFunctionTableEntry { +class V8_EXPORT_PRIVATE IndirectFunctionTableEntry { public: inline IndirectFunctionTableEntry(Handle, int table_index, int entry_index); @@ -76,9 +75,8 @@ class IndirectFunctionTableEntry { int entry_index); void clear(); - V8_EXPORT_PRIVATE void Set(int sig_id, - Handle target_instance, - int target_func_index); + void Set(int sig_id, Handle target_instance, + int target_func_index); void Set(int sig_id, Address call_target, Object ref); Object object_ref() const; @@ -324,16 +322,16 @@ class WasmGlobalObject : public JSObject { DECL_ACCESSORS(untagged_buffer, JSArrayBuffer) DECL_ACCESSORS(tagged_buffer, FixedArray) DECL_INT32_ACCESSORS(offset) - DECL_INT_ACCESSORS(flags) + DECL_INT_ACCESSORS(raw_type) DECL_PRIMITIVE_ACCESSORS(type, wasm::ValueType) - DECL_BOOLEAN_ACCESSORS(is_mutable) + // TODO(7748): Once we improve the encoding of mutability/type, turn this back + // into a boolean accessor. + DECL_INT_ACCESSORS(is_mutable) // Dispatched behavior. DECL_PRINTER(WasmGlobalObject) DECL_VERIFIER(WasmGlobalObject) - DEFINE_TORQUE_GENERATED_WASM_GLOBAL_OBJECT_FLAGS() - DEFINE_FIELD_OFFSET_CONSTANTS(JSObject::kHeaderSize, TORQUE_GENERATED_WASM_GLOBAL_OBJECT_FIELDS) @@ -354,8 +352,7 @@ class WasmGlobalObject : public JSObject { inline void SetI64(int64_t value); inline void SetF32(float value); inline void SetF64(double value); - inline void SetAnyRef(Handle value); - inline bool SetNullRef(Handle value); + inline void SetExternRef(Handle value); inline bool SetFuncRef(Isolate* isolate, Handle value); private: @@ -368,7 +365,7 @@ class WasmGlobalObject : public JSObject { }; // Representation of a WebAssembly.Instance JavaScript-level object. -class WasmInstanceObject : public JSObject { +class V8_EXPORT_PRIVATE WasmInstanceObject : public JSObject { public: DECL_CAST(WasmInstanceObject) @@ -379,7 +376,6 @@ class WasmInstanceObject : public JSObject { DECL_OPTIONAL_ACCESSORS(untagged_globals_buffer, JSArrayBuffer) DECL_OPTIONAL_ACCESSORS(tagged_globals_buffer, FixedArray) DECL_OPTIONAL_ACCESSORS(imported_mutable_globals_buffers, FixedArray) - DECL_OPTIONAL_ACCESSORS(debug_info, WasmDebugInfo) DECL_OPTIONAL_ACCESSORS(tables, FixedArray) DECL_OPTIONAL_ACCESSORS(indirect_function_tables, FixedArray) DECL_ACCESSORS(imported_function_refs, FixedArray) @@ -441,7 +437,6 @@ class WasmInstanceObject : public JSObject { V(kUntaggedGlobalsBufferOffset, kTaggedSize) \ V(kTaggedGlobalsBufferOffset, kTaggedSize) \ V(kImportedMutableGlobalsBuffersOffset, kTaggedSize) \ - V(kDebugInfoOffset, kTaggedSize) \ V(kTablesOffset, kTaggedSize) \ V(kIndirectFunctionTablesOffset, kTaggedSize) \ V(kManagedNativeAllocationsOffset, kTaggedSize) \ @@ -480,7 +475,6 @@ class WasmInstanceObject : public JSObject { kUntaggedGlobalsBufferOffset, kTaggedGlobalsBufferOffset, kImportedMutableGlobalsBuffersOffset, - kDebugInfoOffset, kTablesOffset, kIndirectFunctionTablesOffset, kManagedNativeAllocationsOffset, @@ -488,21 +482,15 @@ class WasmInstanceObject : public JSObject { kWasmExternalFunctionsOffset, kManagedObjectMapsOffset}; - V8_EXPORT_PRIVATE const wasm::WasmModule* module(); + const wasm::WasmModule* module(); - V8_EXPORT_PRIVATE static bool EnsureIndirectFunctionTableWithMinimumSize( + static bool EnsureIndirectFunctionTableWithMinimumSize( Handle instance, int table_index, uint32_t minimum_size); - V8_EXPORT_PRIVATE void SetRawMemory(byte* mem_start, size_t mem_size); - - // Get the debug info associated with the given wasm object. - // If no debug info exists yet, it is created automatically. - V8_EXPORT_PRIVATE static Handle GetOrCreateDebugInfo( - Handle); + void SetRawMemory(byte* mem_start, size_t mem_size); - V8_EXPORT_PRIVATE static Handle New( - Isolate*, Handle); + static Handle New(Isolate*, Handle); Address GetCallTarget(uint32_t func_index); @@ -536,10 +524,9 @@ class WasmInstanceObject : public JSObject { // cache of the given {instance}, or creates a new {WasmExportedFunction} if // it does not exist yet. The new {WasmExportedFunction} is added to the // cache of the {instance} immediately. - V8_EXPORT_PRIVATE static Handle - GetOrCreateWasmExternalFunction(Isolate* isolate, - Handle instance, - int function_index); + static Handle GetOrCreateWasmExternalFunction( + Isolate* isolate, Handle instance, + int function_index); static void SetWasmExternalFunction(Isolate* isolate, Handle instance, @@ -578,6 +565,11 @@ class WasmInstanceObject : public JSObject { Handle, uint32_t memory_index); + // Get the name of a table in the given instance by index. + static MaybeHandle GetTableNameOrNull(Isolate*, + Handle, + uint32_t table_index); + OBJECT_CONSTRUCTORS(WasmInstanceObject, JSObject); private: @@ -619,7 +611,7 @@ class WasmExceptionObject : public JSObject { }; // A Wasm exception that has been thrown out of Wasm code. -class WasmExceptionPackage : public JSReceiver { +class V8_EXPORT_PRIVATE WasmExceptionPackage : public JSReceiver { public: static Handle New( Isolate* isolate, Handle exception_tag, @@ -812,42 +804,6 @@ class WasmJSFunctionData : public Struct { OBJECT_CONSTRUCTORS(WasmJSFunctionData, Struct); }; -// Debug info used for wasm debugging in the interpreter. For Liftoff debugging, -// all information is held off-heap in {wasm::DebugInfo}. -class WasmDebugInfo : public Struct { - public: - NEVER_READ_ONLY_SPACE - DECL_ACCESSORS(wasm_instance, WasmInstanceObject) - DECL_ACCESSORS(interpreter_handle, Object) // Foreign or undefined - DECL_ACCESSORS(interpreter_reference_stack, Cell) - DECL_OPTIONAL_ACCESSORS(c_wasm_entries, FixedArray) - DECL_OPTIONAL_ACCESSORS(c_wasm_entry_map, Managed) - - DECL_CAST(WasmDebugInfo) - - // Dispatched behavior. - DECL_PRINTER(WasmDebugInfo) - DECL_VERIFIER(WasmDebugInfo) - - // Layout description. - DEFINE_FIELD_OFFSET_CONSTANTS(HeapObject::kHeaderSize, - TORQUE_GENERATED_WASM_DEBUG_INFO_FIELDS) - - static Handle New(Handle); - - // Setup a WasmDebugInfo with an existing WasmInstance struct. - // Returns a pointer to the interpreter instantiated inside this - // WasmDebugInfo. - // Use for testing only. - V8_EXPORT_PRIVATE static wasm::WasmInterpreter* SetupForTesting( - Handle); - - V8_EXPORT_PRIVATE static Handle GetCWasmEntry(Handle, - const wasm::FunctionSig*); - - OBJECT_CONSTRUCTORS(WasmDebugInfo, Struct); -}; - class WasmScript : public AllStatic { public: // Set a breakpoint on the given byte position inside the given module. -- cgit v1.2.1