aboutsummaryrefslogtreecommitdiff
path: root/lpcode.c
diff options
context:
space:
mode:
Diffstat (limited to 'lpcode.c')
-rw-r--r--lpcode.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/lpcode.c b/lpcode.c
index a2d08f7..78c6566 100644
--- a/lpcode.c
+++ b/lpcode.c
@@ -535,16 +535,18 @@ static int addoffsetinst (CompileState *compst, Opcode op) {
535 535
536/* labeled failure */ 536/* labeled failure */
537static void codethrow (CompileState *compst, TTree *throw) { 537static void codethrow (CompileState *compst, TTree *throw) {
538 int recov, aux; 538 int recov, aux, n;
539 if (throw->u.ps != 0) { 539 if (throw->u.ps != 0) {
540 recov = addoffsetinst(compst, IThrowRec); 540 recov = addoffsetinst(compst, IThrowRec);
541 assert(sib1(sib2(throw))->tag == TXInfo); 541 assert(sib1(sib2(throw))->tag == TXInfo);
542 n = sib1(sib2(throw))->u.n;
542 } else { 543 } else {
543 recov = addinstruction(compst, IThrow, 0); 544 recov = addinstruction(compst, IThrow, 0);
545 n = -1;
544 } 546 }
545 aux = nextinstruction(compst); 547 aux = nextinstruction(compst);
546 getinstr(compst, aux).i.key = throw->key; /* next instruction keeps only rule name */ 548 getinstr(compst, aux).i.key = throw->key; /* next instruction keeps only rule name */
547 getinstr(compst, recov).i.key = sib1(sib2(throw))->u.n; /* rule number */ 549 getinstr(compst, recov).i.key = n; /* rule number */
548} 550}
549/* labeled failure */ 551/* labeled failure */
550 552