Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Get regex compiler using more attrs, less dynamics
Improves performance a bit further, since attribute lookups can be
far cheaper (and will JIT better).
  • Loading branch information
jnthn committed Jul 27, 2014
1 parent 4e02ce3 commit 957e862
Show file tree
Hide file tree
Showing 2 changed files with 382 additions and 373 deletions.
5 changes: 3 additions & 2 deletions src/vm/moar/QAST/QASTCompilerMAST.nqp
Expand Up @@ -1497,9 +1497,10 @@ my class MASTCompilerInstance {
}

multi method compile_node(QAST::Regex $node, :$want) {
my $rxcomp := QAST::MASTRegexCompiler.new(:qastcomp(self), :regalloc($*REGALLOC));
nqp::defined($want)
?? QAST::MASTRegexCompiler.new(:qastcomp(self)).as_mast($node, :want($want))
!! QAST::MASTRegexCompiler.new(:qastcomp(self)).as_mast($node)
?? $rxcomp.as_mast($node, :want($want))
!! $rxcomp.as_mast($node)
}

multi method compile_node($unknown, :$want) {
Expand Down

0 comments on commit 957e862

Please sign in to comment.