cvsuser 04/10/08 03:21:31
Modified: examples/compilers japhc.c
examples/japh japh11.pasm japh15.pasm
src call_list.txt
t/pmc nci.t
Log:
fix nci tests; fix japhs
Revision Changes Path
1.3 +17 -13 parrot/examples/compilers/japhc.c
Index: japhc.c
===================================================================
RCS file: /cvs/public/parrot/examples/compilers/japhc.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -w -r1.2 -r1.3
--- japhc.c 11 Apr 2004 13:49:16 -0000 1.2
+++ japhc.c 8 Oct 2004 10:21:11 -0000 1.3
@@ -1,4 +1,4 @@
-/* $Id: japhc.c,v 1.2 2004/04/11 13:49:16 leo Exp $ */
+/* $Id: japhc.c,v 1.3 2004/10/08 10:21:11 leo Exp $ */
/*
* example compiler used by japh16.pasm
@@ -118,6 +118,10 @@
/* Update the constant count and reallocate */
k = ++consts->const_count;
+ if (consts->constants == NULL)
+ consts->constants = mem_sys_allocate(
+ k * sizeof(struct PackFile_Constant *));
+ else
consts->constants = mem_sys_realloc(consts->constants,
k * sizeof(struct PackFile_Constant *));
1.3 +4 -2 parrot/examples/japh/japh11.pasm
Index: japh11.pasm
===================================================================
RCS file: /cvs/public/parrot/examples/japh/japh11.pasm,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -w -r1.2 -r1.3
--- japh11.pasm 11 Apr 2004 13:49:19 -0000 1.2
+++ japh11.pasm 8 Oct 2004 10:21:17 -0000 1.3
@@ -47,6 +47,7 @@
set P2, 82
div P0, P1, P2
end
+.namespace ["Integer"]
.pcc_sub __divide:
set I3, P2
set I1, 5
@@ -64,11 +65,12 @@
branch I17
pack S0, 380, I0, I17
print S0
+.namespace [""]
_init:
dlfunc P0, P1, "mmd_register", "vIiiip"
dlvar P5, P1, "Parrot_delegate_divide"
- set I5, 3
- set I6, 14
+ set I5, 9
+ set I6, 31
set I7, I6
invoke
ret
1.2 +5 -9 parrot/examples/japh/japh15.pasm
Index: japh15.pasm
===================================================================
RCS file: /cvs/public/parrot/examples/japh/japh15.pasm,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -w -r1.1 -r1.2
--- japh15.pasm 19 Feb 2004 17:37:53 -0000 1.1
+++ japh15.pasm 8 Oct 2004 10:21:17 -0000 1.2
@@ -1,19 +1,15 @@
# a JapH compiler "_japhc" compiles this program:
- set S6, "pJ pa pP pH pn e "
+ set S5, "pJ pa pP pH pn e "
# into executable bytecode and runs it
- newsub P5, .Sub, _japhc
- # register compiler
- compreg "JaPH_Compiler", P5
- # get compiler
- compreg P1, "JaPH_Compiler"
+ find_global P0, "_japhc"
# compile program
- compile P0, P1, S6
+ invokecc
# run program
- invoke P0
+ invoke P5
end
# compile program in S5, return executable
-_japhc:
+.pcc_sub _japhc:
## print S5
## print "\n"
length I1, S5
1.44 +3 -0 parrot/src/call_list.txt
Index: call_list.txt
===================================================================
RCS file: /cvs/public/parrot/src/call_list.txt,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -w -r1.43 -r1.44
--- call_list.txt 4 Sep 2004 00:56:54 -0000 1.43
+++ call_list.txt 8 Oct 2004 10:21:22 -0000 1.44
@@ -242,3 +242,6 @@
# For python
i IPP
+
+# examples/japh/japh11.pasm
+v Iiiip
1.54 +4 -4 parrot/t/pmc/nci.t
Index: nci.t
===================================================================
RCS file: /cvs/public/parrot/t/pmc/nci.t,v
retrieving revision 1.53
retrieving revision 1.54
diff -u -w -r1.53 -r1.54
--- nci.t 1 Oct 2004 21:16:52 -0000 1.53
+++ nci.t 8 Oct 2004 10:21:29 -0000 1.54
@@ -1,7 +1,7 @@
#! perl -w
# Copyright: 2001-2003 The Perl Foundation. All Rights Reserved.
-# $Id: nci.t,v 1.53 2004/10/01 21:16:52 jrieks Exp $
+# $Id: nci.t,v 1.54 2004/10/08 10:21:29 leo Exp $
=head1 NAME
@@ -28,8 +28,8 @@
use Parrot::Config;
SKIP: {
-unless ( -e "runtime/parrot/dynext/libnci" . $PConfig{so} ) {
- skip( "Please make libnci$PConfig{so}",
+unless ( -e "runtime/parrot/dynext/libnci" . $PConfig{share_ext} ) {
+ skip( "Please make libnci$PConfig{share_ext}",
Test::Builder->expected_tests() );
}
@@ -110,7 +110,7 @@
print "\n"
.end
CODE
-libnci$PConfig{so} was successfully loaded
+libnci$PConfig{share_ext} was successfully loaded
OUTPUT