Skip to content

Commit ddf5def

Browse files
committed
[js] Don't emit an unnecessary cast from an integer attribute to an integer.
1 parent cb2b853 commit ddf5def

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/vm/js/RegexCompiler.nqp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -295,10 +295,10 @@ class RegexCompiler {
295295

296296
method get_cursor_attr($cursor, $attr) {
297297
if $!has_cursor_type {
298-
"nqp.toInt({self.cursor_attr($cursor, $attr)}, $*CTX)";
298+
"{self.cursor_attr($cursor, $attr)}";
299299
}
300300
else {
301-
"nqp.toInt($cursor.\$\$getattr($!cursor_type_runtime, {quote_string($attr)}), $*CTX)";
301+
"$cursor.\$\$getattr($!cursor_type_runtime, {quote_string($attr)})";
302302
}
303303
}
304304

0 commit comments

Comments
 (0)