[svn:parrot] r40047 - in branches/ops_pct: compilers/opsc config/gen/makefiles
bacek at svn.parrot.org
bacek at svn.parrot.org
Mon Jul 13 11:42:21 UTC 2009
Author: bacek
Date: Mon Jul 13 11:42:21 2009
New Revision: 40047
URL: https://trac.parrot.org/parrot/changeset/40047
Log:
[opsc] Split opsc.pir into 2 parts for simplify testing.
Added:
branches/ops_pct/compilers/opsc/opsc_core.pir
- copied, changed from r40046, branches/ops_pct/compilers/opsc/opsc.pir
Modified:
branches/ops_pct/compilers/opsc/opsc.pir
branches/ops_pct/config/gen/makefiles/opsc.in
Modified: branches/ops_pct/compilers/opsc/opsc.pir
==============================================================================
--- branches/ops_pct/compilers/opsc/opsc.pir Mon Jul 13 11:41:42 2009 (r40046)
+++ branches/ops_pct/compilers/opsc/opsc.pir Mon Jul 13 11:42:21 2009 (r40047)
@@ -4,58 +4,18 @@
.namespace [ 'Ops';'Compiler' ]
.sub 'onload' :load :init
+ # opsc_core.pir don't load NQP to avoid clash in nqp-based tests.
load_bytecode 'PCT.pbc'
load_bytecode 'compilers/nqp/nqp.pbc'
-
- .local pmc p6meta
- p6meta = new 'P6metaclass'
-
- p6meta.'new_class'('Ops::Compiler', 'parent'=>'PCT::HLLCompiler')
-
- # Register grammar and action
- $P0 = new [ 'Ops';'Compiler' ]
- $P0.'language'('Ops')
- $P0.'parsegrammar'('Ops::Grammar')
- $P0.'parseactions'('Ops::Grammar::Actions')
-
- #these stages aren't currently used, although generate_files exits before
- #they can be called anyway
- $P0.'removestage'('post')
- $P0.'removestage'('pir')
- $P0.'removestage'('evalpmc')
- $P0.'addstage'('exit', 'after'=>'past')
-
.end
-.sub 'exit' :method
- .param pmc past
- .param pmc adverbs :slurpy :named
-
- exit 0
-.end
-
-
.sub 'main' :main
.param pmc args
$P0 = compreg 'Ops'
.tailcall $P0.'command_line'(args, 'encoding'=>'utf8', 'transcode'=>'ascii')
.end
-
-.include 'builtins.pir'
-.include 'compiler/gen_grammar.pir'
-.include 'compiler/gen_actions.pir'
-.include 'ops/op.pir'
-.include 'ops/gen_op.pir'
-.include 'ops/oplib.pir'
-.include 'ops/gen_oplib.pir'
-
-.include 'runcore/gen_base.pir'
-.include 'runcore/gen_c.pir'
-.include 'runcore/gen_cgoto.pir'
-.include 'runcore/gen_cprederef.pir'
-.include 'runcore/gen_cgp.pir'
-.include 'runcore/gen_cswitch.pir'
+.include 'opsc_core.pir'
# Local Variables:
# mode: pir
Copied and modified: branches/ops_pct/compilers/opsc/opsc_core.pir (from r40046, branches/ops_pct/compilers/opsc/opsc.pir)
==============================================================================
--- branches/ops_pct/compilers/opsc/opsc.pir Mon Jul 13 11:41:42 2009 (r40046, copy source)
+++ branches/ops_pct/compilers/opsc/opsc_core.pir Mon Jul 13 11:42:21 2009 (r40047)
@@ -4,9 +4,6 @@
.namespace [ 'Ops';'Compiler' ]
.sub 'onload' :load :init
- load_bytecode 'PCT.pbc'
- load_bytecode 'compilers/nqp/nqp.pbc'
-
.local pmc p6meta
p6meta = new 'P6metaclass'
@@ -35,13 +32,6 @@
.end
-.sub 'main' :main
- .param pmc args
- $P0 = compreg 'Ops'
- .tailcall $P0.'command_line'(args, 'encoding'=>'utf8', 'transcode'=>'ascii')
-.end
-
-
.include 'builtins.pir'
.include 'compiler/gen_grammar.pir'
.include 'compiler/gen_actions.pir'
Modified: branches/ops_pct/config/gen/makefiles/opsc.in
==============================================================================
--- branches/ops_pct/config/gen/makefiles/opsc.in Mon Jul 13 11:41:42 2009 (r40046)
+++ branches/ops_pct/config/gen/makefiles/opsc.in Mon Jul 13 11:42:21 2009 (r40047)
@@ -12,10 +12,11 @@
PARROT_LIBRARY := @build_dir@/runtime/parrot/library
PGE_LIBRARY := @build_dir@/runtime/parrot/library/PGE
-all: opsc.pbc
+all: opsc.pbc opsc_core.pbc
SOURCES := \
opsc.pir \
+ opsc_core.pir \
builtins.pir \
ops/op.pir \
ops/gen_op.pir \
@@ -34,6 +35,9 @@
opsc.pbc: $(PARROT) $(PGE_LIBRARY)/Perl6Grammar.pir $(SOURCES)
$(PARROT) -o opsc.pbc opsc.pir
+opsc_core.pbc: $(PARROT) $(PGE_LIBRARY)/Perl6Grammar.pir $(SOURCES)
+ $(PARROT) -o opsc_core.pbc opsc_core.pir
+
compiler/gen_grammar.pir: $(PGE_LIBRARY) compiler/grammar.pg
$(PARROT) $(PARROT_ARGS) $(PGE_LIBRARY)/Perl6Grammar.pir \
--output=compiler/gen_grammar.pir compiler/grammar.pg
More information about the parrot-commits
mailing list