simon 01/09/10 10:30:29
Modified: . assemble.pl
Log:
"use strict" patch from Leon Brocard <[EMAIL PROTECTED]>. Hey, why wait
for a release...? :)
Revision Changes Path
1.5 +4 -2 parrot/assemble.pl
Index: assemble.pl
===================================================================
RCS file: /home/perlcvs/parrot/assemble.pl,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -w -r1.4 -r1.5
--- assemble.pl 2001/09/10 09:50:39 1.4
+++ assemble.pl 2001/09/10 17:30:29 1.5
@@ -2,8 +2,10 @@
#
# assemble.pl - take a parrot assembly file and spit out a bytecode file
-my %opcodes;
+use strict;
+my (%opcodes, %labels);
+
my %pack_type;
%pack_type = (i => 'l',
n => 'd',
@@ -73,7 +75,7 @@
print pack "l", $opcodes{$opcode}{CODE};
foreach (0..$#args) {
$args[$_] =~ s/^[INPS]?(\d+)$/$1/i;
- $type = $pack_type{$opcodes{$opcode}{TYPES}[$_]};
+ my $type = $pack_type{$opcodes{$opcode}{TYPES}[$_]};
print pack $type, $args[$_];
}
$pc += 1+@args;