cvsuser 02/06/10 17:53:57
Modified: . assemble.pl core.ops
lib/Parrot Types.pm
Log:
Adding the ability to call operators with 'KEY' parameters.
The assembler was slightly modified to change the key type from '_r' to '_k',
and core.ops had the set(out PMC, in KEY, in INT) operator modified from the
original. No interior code has been added, but there will soon be code to do
this, and kickstart the joys of multidimensional arrays.
lib/Parrot/Types.pm had the 'K' type commented out as it isn't needed yet.
Revision Changes Path
1.68 +2 -2 parrot/assemble.pl
Index: assemble.pl
===================================================================
RCS file: /cvs/public/parrot/assemble.pl,v
retrieving revision 1.67
retrieving revision 1.68
diff -u -w -r1.67 -r1.68
--- assemble.pl 10 Jun 2002 23:56:33 -0000 1.67
+++ assemble.pl 11 Jun 2002 00:53:55 -0000 1.68
@@ -718,8 +718,8 @@
# XXX of the string, so we can nip off another argument.
#
elsif($temp=~s/^\[k:($reg_re)/\[k/) {
- $suffixes .= "_r";
- push @{$_->[0]}, ['r',$1];
+ $suffixes .= "_k";
+ push @{$_->[0]}, ['k',$1];
}
elsif($temp=~s/^\[(S\d+)\]//) { # The only key register should be Sn
$suffixes .= "_s";
1.154 +2 -2 parrot/core.ops
Index: core.ops
===================================================================
RCS file: /cvs/public/parrot/core.ops,v
retrieving revision 1.153
retrieving revision 1.154
diff -u -w -r1.153 -r1.154
--- core.ops 10 Jun 2002 08:07:23 -0000 1.153
+++ core.ops 11 Jun 2002 00:53:55 -0000 1.154
@@ -849,7 +849,7 @@
Not implemented yet, working on it
-=item B<set>(out PMC, inconst KEY, inconst INT)
+=item B<set>(out PMC, in KEY, in INT)
=cut
@@ -858,7 +858,7 @@
goto NEXT();
}
-inline op set(out PMC, inconst KEY, inconst INT) {
+inline op set(out PMC, in KEY, in INT) {
fprintf(stderr,"*** calling keyed set\n");
goto NEXT();
}
1.2 +2 -2 parrot/lib/Parrot/Types.pm
Index: Types.pm
===================================================================
RCS file: /cvs/public/parrot/lib/Parrot/Types.pm,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -w -r1.1 -r1.2
--- Types.pm 24 May 2002 06:34:05 -0000 1.1
+++ Types.pm 11 Jun 2002 00:53:57 -0000 1.2
@@ -56,8 +56,8 @@
n => $pack_type{op},
S => $pack_type{op},
s => $pack_type{op},
- K => $pack_type{op},
- k => $pack_type{op},
+# K => $pack_type{op},
+ r => $pack_type{op},
D => $pack_type{op},
op => $pack_type{op},
byte => $pack_type{b},