Author: leo
Date: Tue Aug 9 05:14:19 2005
New Revision: 8884
Modified:
branches/leo-ctx5/include/parrot/inter_call.h
branches/leo-ctx5/src/inter_call.c
branches/leo-ctx5/src/inter_run.c
branches/leo-ctx5/t/op/calling.t
Log:
remove unused argument to pass_args_fromc; test OO calls
Modified: branches/leo-ctx5/include/parrot/inter_call.h
==============================================================================
--- branches/leo-ctx5/include/parrot/inter_call.h (original)
+++ branches/leo-ctx5/include/parrot/inter_call.h Tue Aug 9 05:14:19 2005
@@ -73,7 +73,7 @@ int parrot_check_tail_call(Interp*, stru
opcode_t * parrot_pass_args(Interp *, struct PackFile_ByteCode *seg,
struct parrot_regs_t *caller_regs, int what);
-opcode_t * parrot_pass_args_fromc(Interp *, const char *sig, INTVAL src_n,
+opcode_t * parrot_pass_args_fromc(Interp *, const char *sig,
opcode_t *dest, parrot_context_t * ctxp, va_list ap);
FLOATVAL set_retval_f(Interp*, int sig_ret,
struct PackFile_ByteCode *seg, struct parrot_regs_t *bp);
Modified: branches/leo-ctx5/src/inter_call.c
==============================================================================
--- branches/leo-ctx5/src/inter_call.c (original)
+++ branches/leo-ctx5/src/inter_call.c Tue Aug 9 05:14:19 2005
@@ -745,7 +745,7 @@ Prerequsits are like above.
*/
opcode_t *
-parrot_pass_args_fromc(Interp *interpreter, const char *sig, INTVAL src_n,
+parrot_pass_args_fromc(Interp *interpreter, const char *sig,
opcode_t *dest, parrot_context_t * old_ctxp, va_list ap)
{
int todo;
Modified: branches/leo-ctx5/src/inter_run.c
==============================================================================
--- branches/leo-ctx5/src/inter_run.c (original)
+++ branches/leo-ctx5/src/inter_run.c Tue Aug 9 05:14:19 2005
@@ -169,7 +169,7 @@ runops_args(Parrot_Interp interpreter, P
sig_p = new_sig;
}
if (*sig_p) {
- dest = parrot_pass_args_fromc(interpreter, sig_p, 0, dest,
+ dest = parrot_pass_args_fromc(interpreter, sig_p, dest,
&old_ctx, ap);
}
Modified: branches/leo-ctx5/t/op/calling.t
==============================================================================
--- branches/leo-ctx5/t/op/calling.t (original)
+++ branches/leo-ctx5/t/op/calling.t Tue Aug 9 05:14:19 2005
@@ -16,7 +16,7 @@ Tests Parrot calling conventions.
=cut
-use Parrot::Test tests => 34;
+use Parrot::Test tests => 35;
use Test::More;
output_is(<<'CODE', <<'OUTPUT', "set_args - parsing");
@@ -954,3 +954,40 @@ CODE
ok 1
ok 2
OUTPUT
+
+pir_output_is(<<'CODE', <<'OUTPUT', "OO argument passig");
+.sub main @MAIN
+ .local pmc cl, o, f
+ cl = newclass "Foo"
+ o = new "Foo"
+ o."bar"("ok 1\n")
+ f = find_global "Foo", "bar"
+ f(o, "ok 2\n")
+ o."baz"("ok 3\n")
+ f = find_global "Foo", "baz"
+ f(o, "ok 4\n")
+.end
+.namespace ["Foo"]
+.sub bar method
+ .param string s
+ print self
+ print " "
+ print s
+.end
+.sub baz
+ .param pmc self
+ .param string s
+ print self
+ print " "
+ print s
+.end
+.sub __get_string method
+ $S0 = typeof self
+ .return ($S0)
+.end
+CODE
+Foo ok 1
+Foo ok 2
+Foo ok 3
+Foo ok 4
+OUTPUT