Skip to content

Commit

Permalink
[js] Fix bug in serialization of NFAs.
Browse files Browse the repository at this point in the history
  • Loading branch information
pmurias committed Dec 31, 2016
1 parent eece127 commit 799d160
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/vm/js/nqp-runtime/reprs.js
Expand Up @@ -859,7 +859,7 @@ class NFA extends REPR {
/* Write state graph. */

for (let i = 0; i < obj.states.length; i++) {
for (let j = 0; j < obj.states[j].length; j++) {
for (let j = 0; j < obj.states[i].length; j++) {
let edge = obj.states[i][j];

cursor.varint(edge.act);
Expand Down
4 changes: 4 additions & 0 deletions src/vm/moar/QAST/QASTOperationsMAST.nqp
Expand Up @@ -2928,4 +2928,8 @@ sub push_ilist(@dest, $src) is export {
nqp::splice(@dest, $src.instructions, +@dest, 0);
}

QAST::MASTOperations.add_core_op('js', -> $qastcomp, $op {
$qastcomp.as_mast(QAST::Op.new( :op('die'), QAST::SVal.new( :value('Running JS NYI on MoarVM') )))
});

# vim: ft=perl6 expandtab sw=4

0 comments on commit 799d160

Please sign in to comment.