-
Notifications
You must be signed in to change notification settings - Fork 421
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dyno resolve tuple 'this' #25006
Dyno resolve tuple 'this' #25006
Conversation
PRIM_GET_SVEC_MEMBER*
in Dyno4ed2380
to
814c975
Compare
814c975
to
6326fac
Compare
4513cac
to
7d8f70a
Compare
57aba2e
to
26253c6
Compare
f776f2e
to
9b9ecfa
Compare
Signed-off-by: Anna Rift <anna.rift@hpe.com>
Signed-off-by: Anna Rift <anna.rift@hpe.com>
Signed-off-by: Anna Rift <anna.rift@hpe.com>
Signed-off-by: Anna Rift <anna.rift@hpe.com>
Signed-off-by: Anna Rift <anna.rift@hpe.com>
Signed-off-by: Anna Rift <anna.rift@hpe.com>
Signed-off-by: Anna Rift <anna.rift@hpe.com>
Signed-off-by: Anna Rift <anna.rift@hpe.com>
Signed-off-by: Anna Rift <anna.rift@hpe.com>
In favor of solution from chapel-lang#25190 Signed-off-by: Anna Rift <anna.rift@hpe.com>
Signed-off-by: Anna Rift <anna.rift@hpe.com>
9b9ecfa
to
37c6775
Compare
Signed-off-by: Anna Rift <anna.rift@hpe.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That we can lookup methods just by hooking up the module _tuple
ID is too cool!
@riftEmber : I have a potentially naive question, with the caveat that I haven't been following this effort in any detail. When you say:
Is this for homogeneous tuples only? I ask because when indexing a heterogeneous tuple with a non-param value, it seems like we wouldn't be able to get far since we wouldn't know what type it was. E.g., const tup = (1, 2.3, "four");
const idx = genRandInt(0..<tup.size);
f(tup(idx)); // can't determine argument type of f()
proc f(x: int) { … }
proc f(x: real) { … }
proc f(x: string) { … } |
Yes it is, I could have been more specific. For a heterogeneous tuple |
Resolve tuple
this
calls (with non-param index values) in Dyno.This is implemented by wiring up Dyno's
TupleType
toChapelTuple._tuple
in the bundled modules. The module implementation of_tuple.size
(called bythis
) is technically used but its param value is computed by dyno, since in production it is only set later during generic instantiation.Depends on: #25007, #25102, #25231, #25315.
Resolves https://github.com/Cray/chapel-private/issues/6104.
[reviewer info placeholder]
Testing: