[Webkit-unassigned] [Bug 247454] New: Reduce aliasing of Wasm::Type type index field

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Nov 3 12:58:47 PDT 2022


https://bugs.webkit.org/show_bug.cgi?id=247454

            Bug ID: 247454
           Summary: Reduce aliasing of Wasm::Type type index field
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Enhancement
          Priority: P2
         Component: WebAssembly
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: d_degazio at apple.com
                CC: d_degazio at apple.com,
                    webkit-bug-importer at group.apple.com

The Wasm::Type data structure generated in JavaScriptCore/wasm/generateWasmOpsHeader.py contains a TypeIndex field, which is currently used to store any of the following:
 - TypeDefinition::invalidIndex, for simple/primitive types
 - A TypeKind, specifically Funcref or Externref, used to implement those types when typed function references are enabled
 - A pointer to a TypeDefinition, for compound types like functions or structs

We currently lose 7/16 bytes of Wasm::Type to padding, so it'd be nice to use some of that space (or maybe refactor Wasm::Type in general) to separate these values out into other fields or a union type so we aren't reinterpreting this uintptr_t all the time.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20221103/79554d02/attachment.htm>


More information about the webkit-unassigned mailing list