Rename isRef() as isTypeIndex()
Categories
(Core :: JavaScript: WebAssembly, task, P3)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox73 | --- | fixed |
People
(Reporter: lth, Assigned: lth)
Details
Attachments
(1 file)
One of the fallouts from the RefType work was that we got RefType::TypeIndex to be the name of (ref T) types. It was always confusing to have both ValType::isReference() and ValType::isRef(), so we should rename the latter as ValType::isTypeIndex() to fit the improved naming scheme.
We should probably also introduce other predicates, isNull, isAny, etc.
Right now, TypeIndex only describes (ref T) where T is a struct type, but this will change with typed function references at least, and possibly with events and other things that reference function types in the type table. So when we change from isRef() to isTypeIndex() we should consider adding predicates or assertions at the locations of isRef() to test for struct-type, since that is usually what is expected. We don't want surprises later.
| Assignee | ||
Comment 1•6 years ago
|
||
Renames isRef() as isTypeIndex90 and slightly change some error
messages to distinguish indexed reference types from the more generic
ones.
Adds predicates on ValType to test various reference type subtypes,
this reduces clutter.
Slightly changes the code around existing uses of isRef to improve
error checking and provide resilience as we go forward toward other
reference types, by calling out struct types specifically when they
are the types we care about, and in one case changing from isRef() to
!isAnyRef(), since that was the intent when we only had those two
cases.
Updated•6 years ago
|
Comment 3•6 years ago
|
||
| bugherder | ||
Description
•