Bug 247454
| Summary: | Reduce aliasing of Wasm::Type type index field | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | David Degazio <d_degazio> |
| Component: | WebAssembly | Assignee: | David Degazio <d_degazio> |
| Status: | NEW | ||
| Severity: | Enhancement | CC: | d_degazio, webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
David Degazio
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.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/101926680>