[svn:parrot] r44729 - in branches/ops_pct/compilers/opsc: src/Ops/Trans t

bacek at svn.parrot.org bacek at svn.parrot.org
Sun Mar 7 08:25:32 UTC 2010


Author: bacek
Date: Sun Mar  7 08:25:29 2010
New Revision: 44729
URL: https://trac.parrot.org/parrot/changeset/44729

Log:
Fix generating ops funcs names

Modified:
   branches/ops_pct/compilers/opsc/src/Ops/Trans/C.pm
   branches/ops_pct/compilers/opsc/t/06-emitter.t

Modified: branches/ops_pct/compilers/opsc/src/Ops/Trans/C.pm
==============================================================================
--- branches/ops_pct/compilers/opsc/src/Ops/Trans/C.pm	Sun Mar  7 08:09:23 2010	(r44728)
+++ branches/ops_pct/compilers/opsc/src/Ops/Trans/C.pm	Sun Mar  7 08:25:29 2010	(r44729)
@@ -49,7 +49,7 @@
 
     for $ops_file.ops -> $op {
         #say("# preparing " ~ $op);
-        my $func_name := self.suffix ~ $op.full_name;
+        my $func_name := $op.func_name( self );
         my $definition := "opcode_t *\n$func_name (opcode_t *cur_opcode, PARROT_INTERP)";
         my $prototype := $emitter.sym_export
                 ~ "opcode_t * $func_name (opcode_t *cur_opcode, PARROT_INTERP);\n";

Modified: branches/ops_pct/compilers/opsc/t/06-emitter.t
==============================================================================
--- branches/ops_pct/compilers/opsc/t/06-emitter.t	Sun Mar  7 08:09:23 2010	(r44728)
+++ branches/ops_pct/compilers/opsc/t/06-emitter.t	Sun Mar  7 08:25:29 2010	(r44729)
@@ -3,7 +3,7 @@
 pir::load_bytecode("compilers/opsc/opsc.pbc");
 pir::load_bytecode("nqp-settings.pbc");
 
-plan(19);
+plan(20);
 
 my $trans := Ops::Trans::C.new();
 
@@ -40,6 +40,7 @@
 ok($header ~~ /endif/, 'Close guard generated');
 ok($header ~~ /DO \s NOT \s EDIT \s THIS \s FILE/, 'Preamble generated');
 ok($header ~~ /Parrot_DynOp_core_ \d+ _ \d+ _ \d+/, '... and contains init_func');
+ok($header ~~ /Parrot_sysinfo_s_i/, 'We have proper names of ops functions');
 
 # Testing C emitting.
 #$emitter.print_c_source_file();


More information about the parrot-commits mailing list