cvsuser     02/04/23 12:31:43

  Modified:    .        core.ops
               lib/Parrot OpsFile.pm
               t/op     string.t
  Log:
  set S0, S1 just copies pointers now, like it should. For a copy, use clone.
  
  Revision  Changes    Path
  1.126     +11 -1     parrot/core.ops
  
  Index: core.ops
  ===================================================================
  RCS file: /home/perlcvs/parrot/core.ops,v
  retrieving revision 1.125
  retrieving revision 1.126
  diff -u -w -r1.125 -r1.126
  --- core.ops  23 Apr 2002 17:19:19 -0000      1.125
  +++ core.ops  23 Apr 2002 19:31:39 -0000      1.126
  @@ -541,7 +541,12 @@
     goto NEXT();
   }
   
  -inline op set(out STR, in STR) {
  +inline op set(out STR, invar STR) {
  +  $1 = $2;
  +  goto NEXT();
  +}
  +
  +inline op set(out STR, inconst STR) {
     $1 = string_copy(interpreter, $2);
     goto NEXT();
   }
  @@ -553,6 +558,11 @@
   
   inline op set(out STR, in NUM) {
     $1 = Parrot_sprintf_c(interpreter, "%f", $2);
  +  goto NEXT();
  +}
  +
  +inline op set(out PMC, in PMC) {
  +  $1 = $2;
     goto NEXT();
   }
   
  
  
  
  1.21      +5 -1      parrot/lib/Parrot/OpsFile.pm
  
  Index: OpsFile.pm
  ===================================================================
  RCS file: /home/perlcvs/parrot/lib/Parrot/OpsFile.pm,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -w -r1.20 -r1.21
  --- OpsFile.pm        22 Apr 2002 02:40:59 -0000      1.20
  +++ OpsFile.pm        23 Apr 2002 19:31:41 -0000      1.21
  @@ -173,7 +173,7 @@
         my @temp = ();
   
         foreach my $arg (@args) {
  -     my ($use, $type) = $arg =~ m/^(in|out|inout|inconst)\s+(INT|NUM|STR|PMC)$/i;
  +     my ($use, $type) = $arg =~ 
m/^(in|out|inout|inconst|invar)\s+(INT|NUM|STR|PMC)$/i;
   
           die "Unrecognized arg format '$arg' in '$_'!" unless defined($use) and 
defined($type);
   
  @@ -183,6 +183,10 @@
             push @temp, ($type eq 'p') ? 'p' : "$type|${type}c";
             push @argdirs, 'i';
           }
  +     elsif ($use eq 'invar') {
  +       push @temp, $type;
  +       push @argdirs, 'i';
  +     }
           elsif ($use eq 'inconst') {
          die "Parrot::OpsFile: Arg format 'inconst PMC' is not allowed!"
                if $type eq 'p';
  
  
  
  1.21      +5 -5      parrot/t/op/string.t
  
  Index: string.t
  ===================================================================
  RCS file: /home/perlcvs/parrot/t/op/string.t,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -w -r1.20 -r1.21
  --- string.t  17 Apr 2002 21:19:49 -0000      1.20
  +++ string.t  23 Apr 2002 19:31:43 -0000      1.21
  @@ -33,7 +33,7 @@
   output_is( <<'CODE', <<OUTPUT, "chopn_s_i|ic" );
        set     S4, "JAPHxyzw"
        set     S5, "japhXYZW"
  - set S3, S4
  +        clone     S3, S4
        set     S1, "\n"
        set     I1, 4
        chopn   S4, 3
  
  
  


Reply via email to