[svn:parrot] r47654 - branches/dynop_mapping/compilers/imcc
plobsing at svn.parrot.org
plobsing at svn.parrot.org
Wed Jun 16 06:04:24 UTC 2010
Author: plobsing
Date: Wed Jun 16 06:04:23 2010
New Revision: 47654
URL: https://trac.parrot.org/parrot/changeset/47654
Log:
store active HLL for subs in stead of rellying on interp to carry it around for us
Modified:
branches/dynop_mapping/compilers/imcc/pbc.c
branches/dynop_mapping/compilers/imcc/symreg.c
branches/dynop_mapping/compilers/imcc/unit.h
Modified: branches/dynop_mapping/compilers/imcc/pbc.c
==============================================================================
--- branches/dynop_mapping/compilers/imcc/pbc.c Wed Jun 16 06:02:44 2010 (r47653)
+++ branches/dynop_mapping/compilers/imcc/pbc.c Wed Jun 16 06:04:23 2010 (r47654)
@@ -1442,7 +1442,7 @@
sub->namespace_name = ns_pmc;
sub->start_offs = offs;
sub->end_offs = end;
- sub->HLL_id = Parrot_pcc_get_HLL(interp, CURRENT_CONTEXT(interp));
+ sub->HLL_id = unit->hll_id;
for (i = 0; i < 4; ++i)
sub->n_regs_used[i] = unit->n_regs_used[i];
Modified: branches/dynop_mapping/compilers/imcc/symreg.c
==============================================================================
--- branches/dynop_mapping/compilers/imcc/symreg.c Wed Jun 16 06:02:44 2010 (r47653)
+++ branches/dynop_mapping/compilers/imcc/symreg.c Wed Jun 16 06:04:23 2010 (r47654)
@@ -407,7 +407,7 @@
=item C<void add_namespace(PARROT_INTERP, IMC_Unit *unit)>
-Add the current namespace to a sub declaration.
+Add the current namespace (and HLL id) to a sub declaration.
=cut
@@ -419,6 +419,8 @@
ASSERT_ARGS(add_namespace)
SymReg * const ns = IMCC_INFO(interp)->cur_namespace;
+ unit->hll_id = Parrot_pcc_get_HLL(interp, CURRENT_CONTEXT(interp));
+
if (!ns)
return;
Modified: branches/dynop_mapping/compilers/imcc/unit.h
==============================================================================
--- branches/dynop_mapping/compilers/imcc/unit.h Wed Jun 16 06:02:44 2010 (r47653)
+++ branches/dynop_mapping/compilers/imcc/unit.h Wed Jun 16 06:04:23 2010 (r47654)
@@ -69,8 +69,8 @@
char *vtable_name; /* vtable name, if any */
char *method_name; /* method name, if any */
char *ns_entry_name; /* ns entry name, if any */
- char *instance_of; /* PMC or class this is an instance of
- * if any */
+ char *instance_of; /* PMC or class this is an instance of if any */
+ INTVAL hll_id; /* HLL ID for this sub */
SymReg *subid; /* Unique subroutine id */
struct imcc_ostat ostat;
More information about the parrot-commits
mailing list