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
Prepare RakuAST branch to become main #5123
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Multi-dispatch failure due to attempt of dispatching over a non-puned role.
…regression Fix a regression where coercing into a role didn't work
Inspired by https://stackoverflow.com/questions/72809469/in-raku-how-does-one-write-the-equivalent-of-haskells-span-function Changed the name from "span" to "snip" because of slightly extended functionality from "span" because the condition can also be a List of conditions (in the sub case), or just have multiple conditions (in the method case). A "snip" in the provided Iterable will occur whenever a smartmatch with the given value returns False. It will then go on to the next condition (if any). If no other conditions are given, will produce the rest of the Iterable. .say for snip * < 10, 2, 2, 2, 5, 5, 7, 13, 9, 6, 2, 20, 4; (2 2 2 5 5 7) (13 9 6 2 20 4) .say for snip (* < 10, * < 20), 2, 2, 2, 5, 5, 7, 13, 9, 6, 2, 20, 4; (2 2 2 5 5 7) (13 9 6 2) (20 4) .say for (2, 2, 2, 5, 5, 7, 13, 9, 6, 2, 20, 4).snip( * < 5, * < 10 ); (2 2 2) (5 5 7) (13 9 6 2 20 4) .say for (2, 2, 2, 5, 5, "a", "b", "c").snip: Int; (2 2 2 5 5) (a b c) .say snip Int, 2, 2, 2, 5, 5, "a", "b", "c"); (2 2 2 5 5) (a b c) This implements both the method (on Any-iterable, as well as on Supply) and the sub version of "snip". Span documentation: https://hackage.haskell.org/package/base-4.16.1.0/docs/Prelude.html#v:span
This makes: my str $a = "foo bar baz"; my int $f = 4; my int $c = 2; say substr $a, $f; # bar baz say substr $a, $f, $c; # ba about 2.8x as fast.
This changes the behaviour of .hyper/.race when given an undefined value for :batch / :degree. Before, this was an error. With this commit, it will assume the default values. This makes it much easier to let e.g. CLI's manage defaults for :degree and :batch, without needing to know what the defaults actually are. Just accept --degree and --batch without default values, and pass them on.
Solaris always returns 0 in max-rss. According to the NOTE in getrusage(3C): The ru_maxrss, ru_ixrss, ru_idrss, and ru_isrss members of the rusage structure are set to 0 in this implementation.
Apply only when a method is added to a HOW capable of doing fallbacks which is currently ClassHOW only. Fixes rakudo#4983
Implement lazy 'handles' trait application for methods
If the method is delegating then metamodel invokes `apply_handles` for each its copy in the method table causing 'method is already defined' error for delegations. For now it is only `Method::Also` is known which does this kind of duplication. The fix is implemented with an additional `:$handles` argument. If true then no attempt to call `apply_handles` is done. Until `Method::Also` incorporates support for this argument a workaround step is done where we make sure that the method object hasn't been previously installed in the table. This step is to be eliminated as soon as use of `:!handles` argument is ensured where necessary. Also added support for using `handles` on multi-candidates. For the moment this support is also suceptible to the method object duplication problem. But there is no simple fix for this, so just hoping for `:!handles` again.
Get around a problem where a module duplicates method objects
This resulted in an execution error: my %*SUB-MAIN-OPTS = :named-anywhere; sub MAIN(|) { }; @*ARGS = "-" Without :named-anywhere, the lone "-" was already considered a positional argument.
- The dispatcher itself never expects a containerized coercer, but it was possible for the metamodel to bypass a container - The scalar case of value was considerd, but `Proxy` has been overlooked; if there be any other kind of container it should be handled appropriately too
It was part of the old return value coercion implementation.
Fix some cases of coercion over containerized values
This reverts commit 50025c1. In response to rakudo#4949, will revisit this at a later time, most likely post RakuAST merge
Fixes DateTime(Str).ACCEPTS(True), which was the new reason why the code of rakudo#4278 failed.
For `6.c/d` name-based `self."$delegator"()."$delegation"()` is used.
Make code object based delegation 6.e feature
This reverts commit 4fc3d45. I've come to the conclusion that the problem described in rakudo#4949 exists before and after the revert. Since the revert appears to cause a new issue, I'm reverting the revert. So now we're at a version back again with a CUR::Staging with its own "candidates" method.
Release 2022.07
This makes ++$a about 40% faster when $a is a native uint
Add instructions on how to call set-env.sh from .bash_profile and similar. Introduce `--quiet` flag to make the script quiet.
Prepare for rakudo#4993.
The following will now produce correct true output: subset Foo of Int(); say Foo:D.^archetypes.coercive; Also note the use of `.^archetypes` notation. The target is achieved by parameterizing definites with an additional argument and adding optional `$obj` positional parameter, akin to many other user-land accessible methods invoked via `.^` notation. The additional parameterization argument is an index built from definite's base type `coercive` and `generic` values by considering them as bits and doiing `($coercive +< 1) +| $generic`. The index is then pulled from the typeobject parameterization arguments and used to choose the right archetypes instance from a list of predefined `Perl6::Metamodel::Archetype` instances. In particular, this commit fixes a case like the following: role R[::T, $default] { has T:D $.a = $default; } class C does R[Int, 42] { } Prior this was failing due to `T:D` was not instantiated a was failing type check. Many other cases of using definite generics are supposedely to be fixed too.
This reverts commit 64317c4. In response to rakudo#5050
It was a stupid error of doing one-way type check because if, say, we ask if a `Real`-typed entity can be `Int` then the answer is 'yes' because eventually it can. But the same applies to an `IntStr`-typed entity because, in fact, it is already `Int`.
Fixes a regression discussed on #raku-dev https://irclogs.raku.org/raku-dev/2022-11-11.html#08:39 my %h = a => 1, b => 2; EVAL("say %h ~~ :2b"); # No such method 'b' for invocant of type 'Hash'
Fix smartmatch in EVAL regression
Thanks to the work of Daniel Green++, NQP now has a nqp::chown op that can be used to change owner and group of a given path. Both the subroutine as well as the method version take a :uid and a :gid named argument that should be specified with the integer value of the uid/gid to change. The default for :uid and :gid are the current setting of the path (aka, omitting will not change the value for that aspect of the file). IO::Path.chown will throw a new X::IO::Chown exception if failed. chown() will just return the paths of which the chown succeeded, in correspondence with the other IO::Pathy subs.
…" (rakudo#5086) This reverts commit 4d43bbf.
They proved to be unclaimed. Besides, if needed, they can be replaced with new-disp implementations. That is likely to be even more efficient. Therefore it makes sense to spare some memory by getting rid of the ops.
Remove nqp::p6client* ops
This fixes the presumption that .words is like .comb(/ \S+ /).
Fix a regression detected in rakudo#5109
If we're assigning to an '@' or '%' sigiled container, mention that the problem is with an element of the container. Potentially addresses rakudo#5110 so now something like `my Map %m = "abc", "def";` says `Type check failed in assignment to an element of %m; expected Map but got Str ("def")` instead of just `Type check failed in assignment to %m; expected Map but got Str ("def")`.
Get some more digits for the case when denominator length is smaller than expected. Fixes rakudo#5108
For container assignment type errors, change the message from: "Type check failed in assignment to an element of <symbol>; expected <type> but got <type> (<value>)" to "Type check failed for an element of <symbol>; expected <type> but got <type> (<value>)". This removes possible confusion about assignment syntax. Possibly resolves rakudo#5110.
In response to rakudo#5116 infix:<eqv> falls back to the calling .raku if two objects are of the same type. This makes sure that WhateverCode.raku will produce different strings for different WhateverCode objects.
Avoid loss in precision on FatRat .Str conversion
This reverts commit 6cded78. Appears that WhateverCode checks were broken, which will need further investigation, so revert to let 2022.12 release go through
Deliberately not logged: [683ddf4][49e04c6][36b0a63][8500d2a][ff90a24][0953b4a][0ccbd88] [90709d5][4a51b15][792418b][02a28de][f35759b][b75545d][82d4c17] [32af3db][d9059e3][ef83561][a98f1ca][fa2f35e][bfc6f6d][f264784] [83ffeca][556bf98][9b13a55][dc180bd][2c1e1bf][6c948e0][4f519c2] [f66d576][0432dbd][5a6344f][71f5c50][7342d9d][30a9d3a][3b36d55] [8cd5768][f403fef][c704d97][5e1f092][a9d9c13][17062c3][6cded78] [15ce612]
Release 2022.12
Safety `$*CTXSAVE` declaration wasn't available to the runtime of compiled code.
lizmat
approved these changes
Dec 9, 2022
My current plan for this:
|
Congrats! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR merges master and fixes a regression in
EVAL
to make spectests passing.Addresses