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

[svn:parrot] r34681 - in branches/rvar/languages/perl6: src/builtins src/pmc t/pmc

From:
pmichaud
Date:
December 30, 2008 17:29
Subject:
[svn:parrot] r34681 - in branches/rvar/languages/perl6: src/builtins src/pmc t/pmc
Message ID:
20081231012926.EF0E4CB9FA@x12.develooper.com
Author: pmichaud
Date: Tue Dec 30 17:29:26 2008
New Revision: 34681

Modified:
   branches/rvar/languages/perl6/src/builtins/globals.pir
   branches/rvar/languages/perl6/src/pmc/objectref_pmc.template
   branches/rvar/languages/perl6/t/pmc/objectref.t

Log:
[rakudo]:  "my $a" produces an undef() instead of Object.


Modified: branches/rvar/languages/perl6/src/builtins/globals.pir
==============================================================================
--- branches/rvar/languages/perl6/src/builtins/globals.pir	(original)
+++ branches/rvar/languages/perl6/src/builtins/globals.pir	Tue Dec 30 17:29:26 2008
@@ -75,6 +75,10 @@
     config = interp[.IGLOBALS_CONFIG_HASH]
     vm['config'] = config
     set_hll_global "%VM", vm
+
+    ## the default value for new ObjectRefs
+    $P0 = 'undef'()
+    set_hll_global '$!OBJECTREF', $P0
 .end
 
 

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	Tue Dec 30 17:29:26 2008
@@ -24,7 +24,7 @@
 
     VTABLE void init() {
         PMC * const hll_ns    = Parrot_get_ctx_HLL_namespace(INTERP);
-        STRING * const s_obj  = string_from_literal(INTERP, "Object");
+        STRING * const s_obj  = string_from_literal(INTERP, "!$OBJECTREF");
         PMC * const objectpmc = Parrot_find_global_n(INTERP, hll_ns, s_obj);
         STATICSELF.init_pmc(objectpmc);
     }

Modified: branches/rvar/languages/perl6/t/pmc/objectref.t
==============================================================================
--- branches/rvar/languages/perl6/t/pmc/objectref.t	(original)
+++ branches/rvar/languages/perl6/t/pmc/objectref.t	Tue Dec 30 17:29:26 2008
@@ -35,7 +35,7 @@
     # ObjectRef is initialized to contain an undef.
     $P1 = new "ObjectRef"
     $S1 = typeof $P1
-    is($S1, 'Object', 'typeof newclass retval')
+    is($S1, 'Undef', 'typeof newclass retval')
 .end
 
 



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