develooper Front page | perl.cvs.parrot | Postings from December 2008

[svn:parrot] r34606 - branches/rvar/languages/perl6/src/pmc

From:
pmichaud
Date:
December 29, 2008 19:31
Subject:
[svn:parrot] r34606 - branches/rvar/languages/perl6/src/pmc
Message ID:
20081230033105.24CBCCB9FA@x12.develooper.com
Author: pmichaud
Date: Mon Dec 29 19:31:04 2008
New Revision: 34606

Modified:
   branches/rvar/languages/perl6/src/pmc/objectref_pmc.template

Log:
[rakudo]:  ObjectRef automatically intializes to Object proto.


Modified: branches/rvar/languages/perl6/src/pmc/objectref_pmc.template
==============================================================================
--- branches/rvar/languages/perl6/src/pmc/objectref_pmc.template	(original)
+++ branches/rvar/languages/perl6/src/pmc/objectref_pmc.template	Mon Dec 29 19:31:04 2008
@@ -23,8 +23,10 @@
     ATTR PMC *cached_type;
 
     VTABLE void init() {
-        /* Initialize with a null PMC for properties. */
-        STATICSELF.init_pmc(PMCNULL);
+        PMC * const hll_ns    = Parrot_get_ctx_HLL_namespace(INTERP);
+        STRING * const s_obj  = string_from_literal(INTERP, "Object");
+        PMC * const objectpmc = Parrot_find_global_n(INTERP, hll_ns, s_obj);
+        STATICSELF.init_pmc(objectpmc);
     }
 
     VTABLE void init_pmc(PMC *value) {



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About