[svn:parrot] r38412 - in branches/pmc_pct/compilers/pmc: src src/parser t t/data
bacek at svn.parrot.org
bacek at svn.parrot.org
Wed Apr 29 22:38:26 UTC 2009
Author: bacek
Date: Wed Apr 29 22:38:25 2009
New Revision: 38412
URL: https://trac.parrot.org/parrot/changeset/38412
Log:
Handle parameters during parsing and emitting
Modified:
branches/pmc_pct/compilers/pmc/src/parser/actions.pm
branches/pmc_pct/compilers/pmc/src/pmc_emitter.pir
branches/pmc_pct/compilers/pmc/t/04-header.t
branches/pmc_pct/compilers/pmc/t/data/class07.pmc
Modified: branches/pmc_pct/compilers/pmc/src/parser/actions.pm
==============================================================================
--- branches/pmc_pct/compilers/pmc/src/parser/actions.pm Wed Apr 29 22:38:05 2009 (r38411)
+++ branches/pmc_pct/compilers/pmc/src/parser/actions.pm Wed Apr 29 22:38:25 2009 (r38412)
@@ -71,6 +71,7 @@
:inline(~$<c_body>)
)
);
+ $past<parameters> := join(', ', $<c_signature><c_arguments><c_argument>);
make $past;
}
Modified: branches/pmc_pct/compilers/pmc/src/pmc_emitter.pir
==============================================================================
--- branches/pmc_pct/compilers/pmc/src/pmc_emitter.pir Wed Apr 29 22:38:05 2009 (r38411)
+++ branches/pmc_pct/compilers/pmc/src/pmc_emitter.pir Wed Apr 29 22:38:25 2009 (r38412)
@@ -93,8 +93,8 @@
push $P1, '_'
push $P1, vtable_name
push $P1, '(PARROT_INTERP, '
- #$S0 = entry.'parameters'()
- #push $P1, $S0
+ $S0 = entry['parameters']
+ push $P1, $S0
push $P1, ");\n"
$S0 = join '', $P1
Modified: branches/pmc_pct/compilers/pmc/t/04-header.t
==============================================================================
--- branches/pmc_pct/compilers/pmc/t/04-header.t Wed Apr 29 22:38:05 2009 (r38411)
+++ branches/pmc_pct/compilers/pmc/t/04-header.t Wed Apr 29 22:38:25 2009 (r38412)
@@ -19,7 +19,7 @@
filename = 'compilers/pmc/t/data/class07.pmc'
$S0 = _slurp(filename)
- check_one_header(filename, $S0, "'Parrot_Integer_instantiate'", "VTable method generated")
+ check_one_header(filename, $S0, "'PMC* Parrot_Integer_instantiate(PARROT_INTERP, PMC *sig, PMC* init)'", "VTable method generated")
.end
@@ -40,6 +40,7 @@
emitter = new $P1
emitter.'set_filename'(name)
$S0 = emitter.'generate_h_file'($P0)
+ #say $S0
like($S0, pattern, message)
.end
Modified: branches/pmc_pct/compilers/pmc/t/data/class07.pmc
==============================================================================
--- branches/pmc_pct/compilers/pmc/t/data/class07.pmc Wed Apr 29 22:38:05 2009 (r38411)
+++ branches/pmc_pct/compilers/pmc/t/data/class07.pmc Wed Apr 29 22:38:25 2009 (r38412)
@@ -1,6 +1,6 @@
pmclass Integer extends scalar provides integer provides scalar {
- VTABLE PMC *instantiate(PMC *sig) {
+ VTABLE PMC *instantiate(PMC *sig, PMC* init) {
}
}
More information about the parrot-commits
mailing list