-
-
Save timo/67bd469e5a2317046856 to your computer and use it in GitHub Desktop.
what is this i don't even ...
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
QAST::Operations.add_core_op('bindattr_i', -> $qastcomp, $op { | |
if +@($op) != 4 { | |
nqp::die('bindattr_i requires four operands'); | |
} | |
if $op[1].has_compile_time_value && $op[2].has_compile_time_value { | |
my $hint := -1; | |
$hint := pir::repr_hint_for__IPs($op[1].compile_time_value, $op[2].compile_time_value); | |
QAST::VM.new( | |
:pirop<repr_bind_attr_int__0PPSii>, | |
$op[0], | |
$op[1], | |
$op[2], | |
$op[3], | |
QAST::IVal(:value($hint)) | |
); | |
$ops; | |
} else { | |
$qastcomp.as_post(QAST::VM.new( | |
:pirop<repr_bind_attr_int__0PPSi>, | |
$op[0], | |
$op[1], | |
$op[2], | |
$op[3] | |
)) | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment