cvsuser 03/02/07 06:06:52
Modified: lib/Parrot/OpTrans CGP.pm CGoto.pm
Log:
fix for invoke returning 0 and CGoto/CGP
Revision Changes Path
1.3 +4 -2 parrot/lib/Parrot/OpTrans/CGP.pm
Index: CGP.pm
===================================================================
RCS file: /cvs/public/parrot/lib/Parrot/OpTrans/CGP.pm,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -w -r1.2 -r1.3
--- CGP.pm 6 Feb 2003 15:18:34 -0000 1.2
+++ CGP.pm 7 Feb 2003 14:06:52 -0000 1.3
@@ -6,7 +6,7 @@
#
# Author: leo
#
-# $Id: CGP.pm,v 1.2 2003/02/06 15:18:34 leo Exp $
+# $Id: CGP.pm,v 1.3 2003/02/07 14:06:52 leo Exp $
#
use strict;
@@ -58,7 +58,9 @@
if ($addr eq '0') {
return "return (0);"
} else {
- return "goto *ops_addr[*(cur_opcode = (opcode_t *)
+ return "if ((opcode_t *) $addr == 0)
+ return 0;
+ goto *ops_addr[*(cur_opcode = (opcode_t *)
opcode_to_prederef(interpreter, $addr))]";
}
}
1.19 +4 -2 parrot/lib/Parrot/OpTrans/CGoto.pm
Index: CGoto.pm
===================================================================
RCS file: /cvs/public/parrot/lib/Parrot/OpTrans/CGoto.pm,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -w -r1.18 -r1.19
--- CGoto.pm 6 Feb 2003 09:38:09 -0000 1.18
+++ CGoto.pm 7 Feb 2003 14:06:52 -0000 1.19
@@ -1,7 +1,7 @@
#
# CGoto.pm
#
-# $Id: CGoto.pm,v 1.18 2003/02/06 09:38:09 leo Exp $
+# $Id: CGoto.pm,v 1.19 2003/02/07 14:06:52 leo Exp $
#
use strict;
@@ -87,7 +87,9 @@
if ($addr eq '0') {
return "return (0);"
} else {
- return "goto *ops_addr[*(cur_opcode = (opcode_t *)$addr)]";
+ return "if ((opcode_t *) $addr == 0)
+ return 0;
+ goto *ops_addr[*(cur_opcode = (opcode_t *)$addr)]";
}
}