[svn:parrot] r43155 - in branches/context_unify3: src/call t/oo

bacek at svn.parrot.org bacek at svn.parrot.org
Sat Dec 19 11:28:50 UTC 2009


Author: bacek
Date: Sat Dec 19 11:28:49 2009
New Revision: 43155
URL: https://trac.parrot.org/parrot/changeset/43155

Log:
Don't reset interp->current_object in invoke_from_sigobject.

Modified:
   branches/context_unify3/src/call/pcc.c
   branches/context_unify3/t/oo/new.t

Modified: branches/context_unify3/src/call/pcc.c
==============================================================================
--- branches/context_unify3/src/call/pcc.c	Sat Dec 19 10:34:19 2009	(r43154)
+++ branches/context_unify3/src/call/pcc.c	Sat Dec 19 11:28:49 2009	(r43155)
@@ -309,7 +309,7 @@
     opcode_t    *dest;
     PMC * const  ret_cont = new_ret_continuation_pmc(interp, NULL);
 
-    Parrot_pcc_prepare_call(interp, call_object, ret_cont, NULL);
+    Parrot_pcc_prepare_call(interp, call_object, ret_cont, interp->current_object);
 
     /* Invoke the function */
     dest = VTABLE_invoke(interp, sub_obj, NULL);

Modified: branches/context_unify3/t/oo/new.t
==============================================================================
--- branches/context_unify3/t/oo/new.t	Sat Dec 19 10:34:19 2009	(r43154)
+++ branches/context_unify3/t/oo/new.t	Sat Dec 19 11:28:49 2009	(r43155)
@@ -19,7 +19,7 @@
 .sub main :main
     .include 'except_types.pasm'
     .include 'test_more.pir'
-    plan(111)
+    plan(112)
 
     instantiate_from_class_object()
     manually_create_anonymous_class_object()
@@ -44,6 +44,7 @@
     get_class_retrieves_a_proxy_class_object()
     get_class_retrieves_a_class_object_that_doesnt_exist()
     instantiate_class_from_invalid_key()
+    current_object_set()
 .end
 
 
@@ -479,6 +480,20 @@
     is(message, "Class '[ 'Foo' ; 'Bar' ; 'Baz' ]' not found", 'Class not found')
 .end
 
+.namespace [ "Foo13" ]
+.sub 'init' :vtable
+.include "interpinfo.pasm"
+    interpinfo $P2, .INTERPINFO_CURRENT_OBJECT
+    $I0 = isa $P2, 'Foo13'
+    ok( $I0, ".INTERPINFO_CURRENT_OBJECT set properly")
+    .return ()
+.end
+
+.namespace []
+.sub current_object_set
+    newclass $P1, "Foo13"
+    new $P3, "Foo13"
+.end
 
 # Local Variables:
 #   mode: pir


More information about the parrot-commits mailing list