Steve Fink:
> The assembler needs to be taught about the PMC constants:

I disagree. Once you start adding assembler functions to make it easier 
for humans to use, you won't stop. I consider the assembler a tool for
machines to use. But if you want to do it, here's a patch.

--- newasm~     Mon Apr 29 19:31:42 2002
+++ newasm      Mon Apr 29 19:32:35 2002
@@ -9,6 +9,7 @@
 use strict;
 use Parrot::OpLib::core;
 use Parrot::Types;
+use Parrot::PMC qw(%pmc_types);
 
 my %ops;
 my %fullops;
@@ -121,6 +122,8 @@
         if ($arg_t eq "label") {
             if (defined $labels{$arg}) {
                 push @args, $labels{$arg} - $ops_pc;
+            } elsif (exists $pmc_types{$arg}) {
+                push @args, $pmc_types{$arg};
             } else {
                 die "Undefined label $arg used at line $lineno\n";
             }

-- 
Be not anxious about what you have, but about what you are.
                -- Pope St. Gregory I

Reply via email to