cvsuser 03/10/09 12:46:20
Modified: . object.ops
Log:
Code to call methods on an object, when calling conventions are properly set,
is now in.
Revision Changes Path
1.10 +12 -0 parrot/object.ops
Index: object.ops
===================================================================
RCS file: /cvs/public/parrot/object.ops,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -w -r1.9 -r1.10
--- object.ops 5 Oct 2003 13:49:42 -0000 1.9
+++ object.ops 9 Oct 2003 19:46:20 -0000 1.10
@@ -41,6 +41,18 @@
=cut
+op callmeth() {
+ PMC *method_pmc;
+ opcode_t *dest;
+ method_pmc = VTABLE_find_method(interpreter, REG_PMC(2), REG_STR(0));
+ if (NULL == method_pmc) {
+ /* Pitch a fit */
+ }
+ REG_PMC(0) = method_pmc;
+ dest = (opcode_t *)REG_PMC(0)->vtable->invoke(interpreter, REG_PMC(0), expr
NEXT());
+ goto ADDRESS(dest);
+}
+
=item B<can>(out INT, in PMC, in STR)