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
Sized arrays can now handle infinite ranges and :map #217
Conversation
…rdingly This will now also properly notice invalid combinations, and unknown named params.
This should bring complete [] and {} adverb support using sub calls rather than
method calls to nom. Possible adverbs are:
:delete :exists :kv :p :k :v
and many combinations of these (see S02:2525 for a list). Other adverbs will
cause an exception, as will combinations that are not supported.
curry *.[] and *.{} again
buildplan operations for native attributes
|
Thank you for your work! Sorry for taking so long to review this change, somehow I get lots of merge conflicts. Could you please merge latest nom into your branch and resolve the conflicts? I've tried my hands on it myself, but had no success so far. |
do not discard the desired minimum version so early
This provides support for giving threads names, getting a thread ID, provides a sensible stringification and enables $*THREAD as a way to get a Thread instance for the currently executing thread (including making it work on the initial thread, so that isn't a special case).
Conflicts: src/Perl6/Grammar.nqp src/Perl6/Metamodel/BOOTSTRAP.nqp src/core/Array.pm src/vm/jvm/runtime/org/perl6/rakudo/RakOps.java
|
Sorry for the mess. I'm not sure how to keep everyone else's commits from showing up. |
|
I think I've figured it out, no worries. I'll test it, and merge if it works on my machine. |
|
Ok, my tests found: it doesn't work like this. There is no attribute $!shape, and thus the patch doesn't compile. Sorry. |
|
That's very odd. I just freshly cloned it and it worked on my computer, so I have no idea what's going wrong. |
|
I've tried it every way I can think of, and I'm still not able to reproduce your issue. Is it perhaps an issue with your copy? Or are you trying it on MoarVM (if this is the case, it definitely won't work right now)? |
|
Try cherry-picking commit 0099b25 to a current version of rakudo/nom. The problem is that there doesn't seem to be a |
|
moritz: this PR is against the sized-arrays branch... Here you can see that this one has the $!shape: I checked out this PR, merged nom into it, and will run a spectest... |
Sized arrays can now handle infinite ranges and :map
|
Parrot: |
|
JVM: |
|
Some of these might fail in nom too, so you'd have to compare to get the actual regressions. |
This lets statements such as
my @array[10] = 1..*;work properly (where properly means the array now contains the first 10 elements in the range 1..*). Additionally, when assigning a parcel to a shaped array that is too small, the parcel will be truncated during assignment. The :map argument is also now supported.