Permalink
Browse files

Fix all tests which failed in zeroargs_subs_checking branch

  • Loading branch information...
1 parent 1c33c8f commit 81b0439853acb4dc1cfabc3cbf404e5ca260d901 @Kristaba Kristaba committed Jan 5, 2011
@@ -26,8 +26,8 @@ lab:
ex:
.end
.sub alligator
- get_params "0", $P0
- invokecc $P0
+ .param pmc foo
+ invokecc foo
.end
CODE
Hi
@@ -511,8 +511,13 @@ OUT
my $too_many_args = <<'CODE';
.sub main :main
+ push_eh eh
'foo'(_ARGS_)
+ goto no_eh
+eh:
+ pop_eh
say "didn't segfault"
+no_eh:
.end
.sub foo
@@ -121,10 +121,12 @@ test flags on PIR subs
.end
.sub 'xyz' :multi(Integer) :subid('above')
+ .param pmc lure
.return('xyz above')
.end
.sub 'xyz' :multi(String) :subid('below')
+ .param pmc lure
.return('xyz below')
.end
@@ -48,9 +48,8 @@ pir_output_is( <<'CODE', <<'OUT', "tail call optimization, final position" );
.end
.sub _funcall
- .local pmc function
- .local pmc argv
- get_params "0,0x20", function, argv
+ .param pmc function
+ .param pmc argv :slurpy
print "[doing _funcall]\n"
$I33 = defined function
if $I33 goto doit
@@ -64,9 +63,8 @@ doit:
## Return quotient and remainder as two integers.
.sub _floor
- .local pmc arg1
- .local pmc arg2
- get_params "0,0", arg1, arg2
+ .param pmc arg1
+ .param pmc arg2
$P1 = new 'Integer'
$P1 = arg1 / arg2
## truncate.
@@ -80,9 +78,8 @@ doit:
## Return the sum and the two arguments as three integers.
.sub _fib_step
- .local pmc arg1
- .local pmc arg2
- get_params "0,0", arg1, arg2
+ .param pmc arg1
+ .param pmc arg2
$P1 = new 'Integer'
$P1 = arg1 + arg2
set_returns "0,0,0", $P1, arg1, arg2
View
@@ -46,12 +46,14 @@ Tests role composition in the OO implementation.
.return('Snake!')
.end
.sub fire
+ .param pmc self
.return("You're FIRED!")
.end
.sub fire2
.return('BURNINATION!')
.end
.sub give_payrise
+ .param pmc self
.return('You all get a pay rise of 0.0005%.')
.end
View
@@ -263,11 +263,13 @@ Tests the object/class subsystem.
.end
.sub sayFoo31
+ .param pmc self
ok( 1, 'called method added before creating obj' )
.end
.namespace ['Bar31']
.sub sayBar31
+ .param pmc self
ok( 1, 'called method added after created obj' )
.end
@@ -1638,38 +1640,40 @@ end:
# set(obj: Pvalue, Iattr_idx)
.sub Foo54__set
- get_params "0,0", $P5, $S4
+ .param pmc arg1
+ .param string arg2
ok( 1, "in Foo54__set" )
interpinfo $P2, .INTERPINFO_CURRENT_OBJECT
- setattribute $P2, $S4, $P5
+ setattribute $P2, arg2, arg1
set_returns ""
returncc
.end
# Pattr = get(obj: Iattr_idx)
.sub Foo54__get
- get_params "0", $S4
+ .param string arg
ok( 1, "in Foo54__get" )
interpinfo $P2, .INTERPINFO_CURRENT_OBJECT
- getattribute $P5, $P2, $S4
+ getattribute $P5, $P2, arg
set_returns "0", $P5
returncc
.end
.sub Bar54__set
- get_params "0,0", $P5, $S4
+ .param pmc arg1
+ .param string arg2
interpinfo $P2, .INTERPINFO_CURRENT_OBJECT
ok( 1, "in Bar54__set" )
- setattribute $P2, $S4, $P5
+ setattribute $P2, arg2, arg1
set_returns ""
returncc
.end
.sub Bar54__get
- get_params "0", $S4
+ .param string arg
ok( 1, "in Bar54__get" )
interpinfo $P2, .INTERPINFO_CURRENT_OBJECT
- getattribute $P5, $P2, $S4
+ getattribute $P5, $P2, arg
set_returns "0", $P5
returncc
.end
@@ -1757,18 +1761,21 @@ end:
# set(obj: Pvalue, SClass, Sattr)
.sub set
- get_params "0,0,0", $P5, $S4, $S5
+ .param pmc value
+ .param string classname
+ .param string attrname
interpinfo $P2, .INTERPINFO_CURRENT_OBJECT
- setattribute $P2, $S5, $P5
+ setattribute $P2, attrname, value
set_returns ""
returncc
.end
# Pattr = get(obj: SClass, Sattr)
.sub get
- get_params "0,0", $S4, $S5
+ .param string classname
+ .param string attrname
interpinfo $P2, .INTERPINFO_CURRENT_OBJECT
- getattribute $P5, $P2, $S5
+ getattribute $P5, $P2, attrname
set_returns "0", $P5
returncc
.end
Oops, something went wrong.

0 comments on commit 81b0439

Please sign in to comment.