[svn:parrot] r39950 - in branches/ops_pct/compilers/opsc: . compiler op t
cotto at svn.parrot.org
cotto at svn.parrot.org
Wed Jul 8 08:48:46 UTC 2009
Author: cotto
Date: Wed Jul 8 08:48:46 2009
New Revision: 39950
URL: https://trac.parrot.org/parrot/changeset/39950
Log:
[opsc] fix failing tests by using Hash instead of RPA for op_flags, which is a simpler interface anyway
Modified:
branches/ops_pct/compilers/opsc/compiler/actions.pm
branches/ops_pct/compilers/opsc/op/op.pir
branches/ops_pct/compilers/opsc/opsc.pir
branches/ops_pct/compilers/opsc/t/03-past.t
Modified: branches/ops_pct/compilers/opsc/compiler/actions.pm
==============================================================================
--- branches/ops_pct/compilers/opsc/compiler/actions.pm Wed Jul 8 08:41:14 2009 (r39949)
+++ branches/ops_pct/compilers/opsc/compiler/actions.pm Wed Jul 8 08:48:46 2009 (r39950)
@@ -50,7 +50,7 @@
# Handling flags.
for $<op_flag> {
- $op.op_flags.push(~$_<identifier>);
+ $op<op_flags>{ ~$_<identifier> } := 1;
}
# Handling parameters.
Modified: branches/ops_pct/compilers/opsc/op/op.pir
==============================================================================
--- branches/ops_pct/compilers/opsc/op/op.pir Wed Jul 8 08:41:14 2009 (r39949)
+++ branches/ops_pct/compilers/opsc/op/op.pir Wed Jul 8 08:48:46 2009 (r39950)
@@ -41,8 +41,8 @@
res.'init'(children :flat, adverbs :flat :named)
# Initialize various attributes
- $P1 = new ['ResizableStringArray']
- res.'attr'('op_flags', $P1, 1)
+ #$P1 = new ['Hash']
+ #res.'attr'('op_flags', $P1, 1)
.return (res)
.end
@@ -53,9 +53,9 @@
=cut
-.sub 'op_flags' :method
- .tailcall self.'attr'('op_flags',0,0)
-.end
+#.sub 'op_flags' :method
+# .tailcall self.'attr'('op_flags',0,0)
+#.end
=head1 COPYRIGHT
Modified: branches/ops_pct/compilers/opsc/opsc.pir
==============================================================================
--- branches/ops_pct/compilers/opsc/opsc.pir Wed Jul 8 08:41:14 2009 (r39949)
+++ branches/ops_pct/compilers/opsc/opsc.pir Wed Jul 8 08:48:46 2009 (r39950)
@@ -3,7 +3,7 @@
.namespace [ 'Ops';'Compiler' ]
-.sub '__onload' :load :init
+.sub 'onload' :load :init
load_bytecode 'PCT.pbc'
load_bytecode 'compilers/nqp/nqp.pbc'
Modified: branches/ops_pct/compilers/opsc/t/03-past.t
==============================================================================
--- branches/ops_pct/compilers/opsc/t/03-past.t Wed Jul 8 08:41:14 2009 (r39949)
+++ branches/ops_pct/compilers/opsc/t/03-past.t Wed Jul 8 08:48:46 2009 (r39950)
@@ -43,7 +43,7 @@
is($S0, 'foo', "Name parsed")
# Check op flags
- $P1 = op['flags']
+ $P1 = op['op_flags']
$I0 = $P1['flow']
is(1, $I0, ':flow flag parsed')
@@ -51,7 +51,7 @@
is(1, $I0, ':deprecated flag parsed')
$I0 = $P1
- is($I0, 2, "And there is only 2 flags")
+ is($I0, 2, "And there are only 2 flags")
# Check op params
$P1 = op['parameters']
More information about the parrot-commits
mailing list