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
moar: falsey a num64 complains NYI #194
Comments
|
What code exactly triggers this error? |
|
Not sure, but it's from https://github.com/perl6/nqp/blob/master/src/vm/moar/NQP/Ops.nqp#L99, I'm trying to make such code.. |
|
This segment reproduce the NYI: my num $v := 1.0;
say('falsey: '~!$v); |
|
I'm trying to make a quick fix for my hacking, and thinking about converting num64 into int64, but don't know how ( elsif $val.result_kind == $MVM_reg_num64 {
my $not_reg := $regalloc.fresh_register($MVM_reg_int64);
my $ir := $regalloc.fresh_register($MVM_reg_int64);
my @ins := $val.instructions;
push_op(@ins, 'NUM64_TO_INT64', $ir, $val.result_reg);
push_op(@ins, 'not_i', $not_reg, $ir);
MAST::InstructionList.new(@ins, $not_reg, $MVM_reg_int64)
}But I believe it should have a better way to do a falsey on num64. |
|
Falsey is still not working with the following segment of code: my num $v := 1.0;
if $v {
say('bool: okay..');
}
if !$v {
say('falsey: ...');
}Runing this segment in |
|
This falsey is complained: |
The falsey op does not deal with num64, and it complains
This case of nqp falsey op NYIalways. (prefix:sym<!>)The text was updated successfully, but these errors were encountered: