Skip to content
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

turn Wval to Want after compile-time-evaluating pure ops #125

Merged
merged 5 commits into from Apr 15, 2013

Conversation

@timo
Copy link
Member

commented Apr 14, 2013

At the moment, the optimizer turns literals like -5 into a WVal(-5), which is better than the previous call to prefix:<-> + Want(5), but now it's no longer a Want and cannot be used to dispatch to subs that take native values.

This branch creates a Want for Int, Num and Str results of compile-time evaluation in the Optimizer.

The changes have passed spectests on my machine, but then i re-arranged some commits and pulled in some recent changes, so i'll run the spectests again.

@timo

This comment has been minimized.

Copy link
Member Author

commented Apr 14, 2013

the spectests all succeed.

@@ -396,6 +410,25 @@ class Perl6::Optimizer {
if $op.named {
$wval.named($op.named);

This comment has been minimized.

Copy link
@timo

timo Apr 14, 2013

Author Member

Do I want to move this down to after return $want? Or is it okay to have the .named on the WVal as well as the Want that contains it?

@moritz moritz merged commit 21d7a95 into rakudo:nom Apr 15, 2013

@timo timo deleted the timo:wval_to_want branch Dec 13, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.