Skip to content

Commit

Permalink
Default-int fixes for zef and Inline::Perl5
Browse files Browse the repository at this point in the history
  • Loading branch information
MasterDuke17 committed Jul 5, 2019
1 parent 669a3b9 commit cf6f6d9
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion lib/NativeCall.pm6
Expand Up @@ -389,7 +389,7 @@ our role Native[Routine $r, $libname where Str|Callable|List|IO::Path|Distributi
QAST::Var.new(:scope<local>, :name($lowered_name)),
$_.type ~~ Str ?? Str
!! $_.type ~~ Int ?? QAST::IVal.new(:value(0))
!! $_.type ~~ Num ?? QAST::NVal.new(:value(0))
!! $_.type ~~ Num ?? QAST::NVal.new(:value(0e0))
!! QAST::IVal.new(:value(0))
),
);
Expand Down
10 changes: 5 additions & 5 deletions src/Perl6/Actions.nqp
Expand Up @@ -10914,7 +10914,7 @@ class Perl6::RegexActions is QRegex::P6Regex::Actions does STDActions {
QAST::SVal.new( :value('INTERPOLATE') ),
$varast,
QAST::IVal.new( :value(%*RX<i> && %*RX<m> ?? 3 !! %*RX<m> ?? 2 !! %*RX<i> ?? 1 !! 0) ),
QAST::IVal.new( :value(monkey_see_no_eval($/)) ),
QAST::IVal.new( :value(monkey_see_no_eval($/) ?? 1 !! 0) ),
QAST::IVal.new( :value($*SEQ ?? 1 !! 0) ),
QAST::IVal.new( :value(0) ),
QAST::Op.new( :op<callmethod>, :name<new>,
Expand All @@ -10930,7 +10930,7 @@ class Perl6::RegexActions is QRegex::P6Regex::Actions does STDActions {
QAST::SVal.new( :value('INTERPOLATE_ASSERTION') ),
$<codeblock>.ast,
QAST::IVal.new( :value(%*RX<i> && %*RX<m> ?? 3 !! %*RX<m> ?? 2 !! %*RX<i> ?? 1 !! 0) ),
QAST::IVal.new( :value(monkey_see_no_eval($/)) ),
QAST::IVal.new( :value(monkey_see_no_eval($/) ?? 1 !! 0) ),
QAST::IVal.new( :value($*SEQ ?? 1 !! 0) ),
QAST::IVal.new( :value(1) ),
QAST::Op.new( :op<callmethod>, :name<new>,
Expand Down Expand Up @@ -10968,7 +10968,7 @@ class Perl6::RegexActions is QRegex::P6Regex::Actions does STDActions {
QAST::SVal.new( :value('INTERPOLATE_ASSERTION') ),
wanted($<var>.ast, 'assertvar2'),
QAST::IVal.new( :value(%*RX<i> && %*RX<m> ?? 3 !! %*RX<m> ?? 2 !! %*RX<i> ?? 1 !! 0) ),
QAST::IVal.new( :value(monkey_see_no_eval($/)) ),
QAST::IVal.new( :value(monkey_see_no_eval($/) ?? 1 !! 0) ),
QAST::IVal.new( :value($*SEQ ?? 1 !! 0) ),
QAST::IVal.new( :value(1) ),
QAST::Op.new( :op<callmethod>, :name<new>,
Expand Down Expand Up @@ -11130,7 +11130,7 @@ class Perl6::P5RegexActions is QRegex::P5Regex::Actions does STDActions {
QAST::SVal.new( :value($*INTERPOLATION ?? 'INTERPOLATE_ASSERTION' !! 'INTERPOLATE') ),
$<codeblock>.ast,
QAST::IVal.new( :value(%*RX<i> ?? 1 !! 0) ),
QAST::IVal.new( :value(monkey_see_no_eval($/)) ),
QAST::IVal.new( :value(monkey_see_no_eval($/) ?? 1 !! 0) ),
QAST::IVal.new( :value($*SEQ ?? 1 !! 0) ),
QAST::IVal.new( :value($*INTERPOLATION ?? 1 !! 0) ),
QAST::Op.new( :op<callmethod>, :name<new>,
Expand All @@ -11146,7 +11146,7 @@ class Perl6::P5RegexActions is QRegex::P5Regex::Actions does STDActions {
QAST::SVal.new( :value($*INTERPOLATION ?? 'INTERPOLATE_ASSERTION' !! 'INTERPOLATE') ),
wanted($<var>.ast, 'p5var'),
QAST::IVal.new( :value(%*RX<i> ?? 1 !! 0) ),
QAST::IVal.new( :value(monkey_see_no_eval($/)) ),
QAST::IVal.new( :value(monkey_see_no_eval($/) ?? 1 !! 0) ),
QAST::IVal.new( :value($*SEQ ?? 1 !! 0) ),
QAST::IVal.new( :value($*INTERPOLATION ?? 1 !! 0) ),
QAST::Op.new( :op<callmethod>, :name<new>,
Expand Down
2 changes: 1 addition & 1 deletion src/Perl6/World.nqp
Expand Up @@ -3051,7 +3051,7 @@ class Perl6::World is HLL::World {
QAST::SVal.new( :value($r) )
}
elsif nqp::isint($r) {
QAST::IVal.new( :value($r) )
QAST::IVal.new( :value(nqp::isconcrete($r) ?? $r !! 0) )
}
else {
self.add_object_if_no_sc($r);
Expand Down

0 comments on commit cf6f6d9

Please sign in to comment.