Kmeakin opened PR #9610 from Kmeakin:km/isle/int-types
to bytecodealliance:main
:
Follow up to https://github.com/bytecodealliance/wasmtime/pull/9593, adding all the built-in integer types (
u8
..u128
,i8
..i128
).Integer literal expressions and patterns are still allowed to type-check against primitive types, because there are a lot of places in the lowering/optimization code that uses
(type Foo (primitive Foo))
whereFoo
is declared as a type alias of an integer type in Rust code. Not sure what to do about this. Perhaps it would be clearer to rename "primitive" types to "opaque" or "extern" types (and also have a mechanism for declaring transparent type aliases in ISLE)?Closes https://github.com/bytecodealliance/wasmtime/issues/5431
Kmeakin requested abrown for a review on PR #9610.
Kmeakin requested wasmtime-compiler-reviewers for a review on PR #9610.
Kmeakin edited PR #9610:
Follow up to https://github.com/bytecodealliance/wasmtime/pull/9593, adding all the built-in integer types (
u8
..u128
,i8
..i128
plususize
andisize
).Integer literal expressions and patterns are still allowed to type-check against primitive types, because there are a lot of places in the lowering/optimization code that uses
(type Foo (primitive Foo))
whereFoo
is declared as a type alias of an integer type in Rust code. Not sure what to do about this. Perhaps it would be clearer to rename "primitive" types to "opaque" or "extern" types (and also have a mechanism for declaring transparent type aliases in ISLE)?Closes https://github.com/bytecodealliance/wasmtime/issues/5431
Kmeakin edited PR #9610:
Follow up to https://github.com/bytecodealliance/wasmtime/pull/9593, adding all the built-in integer types (
u8
..u128
,i8
..i128
plususize
andisize
).Integer literal expressions and patterns are still allowed to type-check against primitive types, because there are a lot of places in the lowering/optimization code that uses
(type Foo (primitive Foo))
whereFoo
is declared as a type alias of an integer type in Rust code. Not sure what to do about this. Perhaps it would be clearer to rename "primitive" types to "opaque" or "extern" types (and also have a mechanism for declaring transparent type aliases in ISLE)?Closes https://github.com/bytecodealliance/wasmtime/issues/5431 and https://github.com/bytecodealliance/wasmtime/issues/3573
Kmeakin updated PR #9610.
github-actions[bot] commented on PR #9610:
Subscribe to Label Action
cc @cfallin, @fitzgen
<details>
This issue or pull request has been labeled: "cranelift", "isle"Thus the following users have been cc'd because of the following labels:
- cfallin: isle
- fitzgen: isle
To subscribe or unsubscribe from this label, edit the <code>.github/subscribe-to-label.json</code> configuration file.
Learn more.
</details>
cfallin submitted PR review:
Thanks! Some comments below but nothing major. This is a nice refactor and makes the language semantically a little cleaner; I like it.
cfallin created PR review comment:
I'm not sure I like this rename -- semantically I think of interning as the action of getting the existing ID, or creating a new one -- that is, "to intern" covers both cases; and
intern_mut
indicates we're permitting new cases to update the table, vs.intern
that only looks up existing cases.(To see this another way, consider
intern
below -- it should be renamed to something else if we take this rename, because this rename implies that adding to the table is the "intern" bit, which is exactly the bit that the non-mut version below does not do.)
cfallin created PR review comment:
Can we write a
match
with explicit arms for all types here? I'd prefer that so we are forced to think about any new types we add explicitly. The pattern as written makes that easy to miss...
Kmeakin updated PR #9610.
cfallin submitted PR review.
cfallin commented on PR #9610:
Something is broken in the build in CI; once it's green I'm happy to merge.
Kmeakin updated PR #9610.
Kmeakin updated PR #9610.
cfallin merged PR #9610.
Last updated: Dec 23 2024 at 12:05 UTC