Author: jonathan
Date: Fri Dec  5 10:38:41 2008
New Revision: 33518

Modified:
   trunk/runtime/parrot/library/P6object.pir

Log:
[p6object] The last change to p6object missed a subtle detail. You might have 
the proto-object for the thing that inherits from String rather than something 
you want treated as a string and looked up as a name, so if we find we've got a 
thing that is a proto for a string type, we treat it as a proto, not a string.

Modified: trunk/runtime/parrot/library/P6object.pir
==============================================================================
--- trunk/runtime/parrot/library/P6object.pir   (original)
+++ trunk/runtime/parrot/library/P6object.pir   Fri Dec  5 10:38:41 2008
@@ -500,10 +500,10 @@
     $S0 = typeof x
     if $S0 == 'Class' goto done
     if $S0 == 'PMCProxy' goto done
-    $I0 = isa x, 'P6object'
-    if $I0 goto x_p6object
     $I0 = isa x, 'String'
     if $I0 goto x_string
+    $I0 = isa x, 'P6object'
+    if $I0 goto x_p6object
     $P0 = typeof x
     .return ($P0)
   x_p6object:
@@ -511,6 +511,8 @@
     parrotclass = getattribute $P0, 'parrotclass'
     .return (parrotclass)
   x_string:
+    $I0 = isa x, 'P6protoobject'
+    if $I0 goto x_p6object
     parrotclass = get_class x
     unless null parrotclass goto done
     $S0 = x

Reply via email to