Skip to content

Commit

Permalink
Fix tests by renaming functions there as well
Browse files Browse the repository at this point in the history
  • Loading branch information
Bilal Akhtar committed Dec 4, 2011
1 parent 946b989 commit 20f3d0f
Show file tree
Hide file tree
Showing 24 changed files with 174 additions and 174 deletions.
4 changes: 2 additions & 2 deletions include/parrot/interpreter.h
Expand Up @@ -496,7 +496,7 @@ Interp * Parrot_intep_get_from_pmc(ARGIN(PMC * interp_pmc))
__attribute__nonnull__(1);

PARROT_EXPORT
void Parrot_mark_method_writes(PARROT_INTERP,
void Parrot_interp_mark_method_writes(PARROT_INTERP,
int type,
ARGIN(const char *name))
__attribute__nonnull__(1)
Expand Down Expand Up @@ -597,7 +597,7 @@ void register_nci_method(PARROT_INTERP,
#define ASSERT_ARGS_Parrot_intep_get_from_pmc \
__attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp_pmc))
#define ASSERT_ARGS_Parrot_mark_method_writes __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
#define ASSERT_ARGS_Parrot_interp_mark_method_writes __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(name))
#define ASSERT_ARGS_Parrot_interp_set_compiler __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
Expand Down
2 changes: 1 addition & 1 deletion lib/Parrot/Pmc2c/PMC.pm
Expand Up @@ -1184,7 +1184,7 @@ EOC
EOC
if ( $method->{attrs}{write} ) {
$cout .= <<"EOC";
Parrot_mark_method_writes(interp, entry, "$symbol_name");
Parrot_interp_mark_method_writes(interp, entry, "$symbol_name");
EOC
}
}
Expand Down
12 changes: 6 additions & 6 deletions t/oo/objects.t
Expand Up @@ -1640,7 +1640,7 @@ end:
.sub Foo54__set
get_params "0,0", $P5, $S4
ok( 1, "in Foo54__set" )
interpinfo $P2, .INTERPINFO_CURRENT_OBJECT
Parrot_interp_info $P2, .INTERPINFO_CURRENT_OBJECT
setattribute $P2, $S4, $P5
set_returns ""
returncc
Expand All @@ -1650,15 +1650,15 @@ end:
.sub Foo54__get
get_params "0", $S4
ok( 1, "in Foo54__get" )
interpinfo $P2, .INTERPINFO_CURRENT_OBJECT
Parrot_interp_info $P2, .INTERPINFO_CURRENT_OBJECT
getattribute $P5, $P2, $S4
set_returns "0", $P5
returncc
.end
.sub Bar54__set
get_params "0,0", $P5, $S4
interpinfo $P2, .INTERPINFO_CURRENT_OBJECT
Parrot_interp_info $P2, .INTERPINFO_CURRENT_OBJECT
ok( 1, "in Bar54__set" )
setattribute $P2, $S4, $P5
set_returns ""
Expand All @@ -1668,7 +1668,7 @@ end:
.sub Bar54__get
get_params "0", $S4
ok( 1, "in Bar54__get" )
interpinfo $P2, .INTERPINFO_CURRENT_OBJECT
Parrot_interp_info $P2, .INTERPINFO_CURRENT_OBJECT
getattribute $P5, $P2, $S4
set_returns "0", $P5
returncc
Expand Down Expand Up @@ -1758,7 +1758,7 @@ end:
# set(obj: Pvalue, SClass, Sattr)
.sub set
get_params "0,0,0", $P5, $S4, $S5
interpinfo $P2, .INTERPINFO_CURRENT_OBJECT
Parrot_interp_info $P2, .INTERPINFO_CURRENT_OBJECT
setattribute $P2, $S5, $P5
set_returns ""
returncc
Expand All @@ -1767,7 +1767,7 @@ end:
# Pattr = get(obj: SClass, Sattr)
.sub get
get_params "0,0", $S4, $S5
interpinfo $P2, .INTERPINFO_CURRENT_OBJECT
Parrot_interp_info $P2, .INTERPINFO_CURRENT_OBJECT
getattribute $P5, $P2, $S5
set_returns "0", $P5
returncc
Expand Down
2 changes: 1 addition & 1 deletion t/op/calling.t
Expand Up @@ -1602,7 +1602,7 @@ pir_output_is( <<'CODE', <<'OUTPUT', "set_args via continuation -> results" );
.param string s
.local pmc cc
.include 'interpinfo.pasm'
cc = interpinfo .INTERPINFO_CURRENT_CONT
cc = Parrot_interp_info .INTERPINFO_CURRENT_CONT
bar(cc, s)
.end
Expand Down
4 changes: 2 additions & 2 deletions t/op/gc-active-buffers.t
Expand Up @@ -24,7 +24,7 @@ TT1603 - http://trac.parrot.org/parrot/ticket/1603
plan(1)

sweep 1
$I0 = interpinfo .INTERPINFO_ACTIVE_BUFFERS
$I0 = Parrot_interp_info .INTERPINFO_ACTIVE_BUFFERS

.local int count
count= 1000
Expand All @@ -45,7 +45,7 @@ TT1603 - http://trac.parrot.org/parrot/ticket/1603
done:

sweep 1
$I1 = interpinfo .INTERPINFO_ACTIVE_BUFFERS
$I1 = Parrot_interp_info .INTERPINFO_ACTIVE_BUFFERS

$I2 = $I1 - $I0
$S0 = $I2
Expand Down
12 changes: 6 additions & 6 deletions t/op/gc-leaky-box.t
Expand Up @@ -25,7 +25,7 @@ TT1465 - http://trac.parrot.org/parrot/ticket/1465 .
.include 'test_more.pir'
$S0 = interpinfo .INTERPINFO_GC_SYS_NAME
$S0 = Parrot_interp_info .INTERPINFO_GC_SYS_NAME
if $S0 == "inf" goto dont_run_hanging_tests
plan(3)
Expand All @@ -50,22 +50,22 @@ TT1465 - http://trac.parrot.org/parrot/ticket/1465 .
inc counter
if counter < 1e7 goto loop
$I1 = interpinfo.INTERPINFO_GC_COLLECT_RUNS
$I1 = Parrot_interp_info.INTERPINFO_GC_COLLECT_RUNS
if $I1 goto done
dec cycles
if cycles > 0 goto cycle
done:
$I2 = interpinfo.INTERPINFO_GC_MARK_RUNS
$S0 = interpinfo .INTERPINFO_GC_SYS_NAME
$I2 = Parrot_interp_info.INTERPINFO_GC_MARK_RUNS
$S0 = Parrot_interp_info .INTERPINFO_GC_SYS_NAME
if $S0 == "gms" goto last_alloc
$I3 = interpinfo.INTERPINFO_TOTAL_MEM_ALLOC
$I3 = Parrot_interp_info.INTERPINFO_TOTAL_MEM_ALLOC
goto test
last_alloc:
$I3 = interpinfo.INTERPINFO_MEM_ALLOCS_SINCE_COLLECT
$I3 = Parrot_interp_info.INTERPINFO_MEM_ALLOCS_SINCE_COLLECT
test:
Expand Down
12 changes: 6 additions & 6 deletions t/op/gc-leaky-call.t
Expand Up @@ -22,7 +22,7 @@ function calls.
.include 'test_more.pir'


$S0 = interpinfo .INTERPINFO_GC_SYS_NAME
$S0 = Parrot_interp_info .INTERPINFO_GC_SYS_NAME
if $S0 == "inf" goto dont_run_hanging_tests

diag($S0)
Expand All @@ -49,24 +49,24 @@ function calls.
inc counter
if counter < 1e6 goto loop

$I1 = interpinfo.INTERPINFO_GC_COLLECT_RUNS
$I1 = Parrot_interp_info.INTERPINFO_GC_COLLECT_RUNS
if $I1 goto done

dec cycles
if cycles > 0 goto cycle

done:

$I2 = interpinfo.INTERPINFO_GC_MARK_RUNS
$I2 = Parrot_interp_info.INTERPINFO_GC_MARK_RUNS

$S0 = interpinfo .INTERPINFO_GC_SYS_NAME
$S0 = Parrot_interp_info .INTERPINFO_GC_SYS_NAME
if $S0 == "gms" goto last_alloc

$I3 = interpinfo.INTERPINFO_TOTAL_MEM_ALLOC
$I3 = Parrot_interp_info.INTERPINFO_TOTAL_MEM_ALLOC
goto test

last_alloc:
$I3 = interpinfo.INTERPINFO_MEM_ALLOCS_SINCE_COLLECT
$I3 = Parrot_interp_info.INTERPINFO_MEM_ALLOCS_SINCE_COLLECT

test:
$S1 = $I1
Expand Down
38 changes: 19 additions & 19 deletions t/op/gc.t
Expand Up @@ -50,18 +50,18 @@ GC related bugs.
.end

.sub sweep_1
$I1 = interpinfo .INTERPINFO_GC_MARK_RUNS # How many GC mark runs have we done already?
$I1 = Parrot_interp_info .INTERPINFO_GC_MARK_RUNS # How many GC mark runs have we done already?
sweep 1
$I2 = interpinfo .INTERPINFO_GC_MARK_RUNS # Should be one more now
$I2 = Parrot_interp_info .INTERPINFO_GC_MARK_RUNS # Should be one more now
$I3 = $I2 - $I1
is($I3,1, "sweep_1")
.end


.sub sweep_0
$I1 = interpinfo .INTERPINFO_GC_MARK_RUNS # How many GC mark runs have we done already?
$I1 = Parrot_interp_info .INTERPINFO_GC_MARK_RUNS # How many GC mark runs have we done already?
sweep 0
$I2 = interpinfo .INTERPINFO_GC_MARK_RUNS # Should be same
$I2 = Parrot_interp_info .INTERPINFO_GC_MARK_RUNS # Should be same
$I3 = $I2 - $I1
is($I3,0, "sweep_0")
.end
Expand All @@ -70,10 +70,10 @@ GC related bugs.
# sweep 0, with object that needs destroy/destroy
.sub sweep_0_need_destroy_obj
$P0 = new 'Undef'
$I1 = interpinfo .INTERPINFO_GC_MARK_RUNS # How many GC mark runs have we done already?
$I1 = Parrot_interp_info .INTERPINFO_GC_MARK_RUNS # How many GC mark runs have we done already?
needs_destroy $P0
sweep 0
$I2 = interpinfo .INTERPINFO_GC_MARK_RUNS # Should be one more now
$I2 = Parrot_interp_info .INTERPINFO_GC_MARK_RUNS # Should be one more now
$I3 = $I2 - $I1
is($I3,1, "sweep_0_need_destroy_obj")
.end
Expand All @@ -83,57 +83,57 @@ GC related bugs.
.sub sweep_0_need_destroy_destroy_obj
$P0 = new 'Undef'
needs_destroy $P0
$I1 = interpinfo .INTERPINFO_GC_MARK_RUNS # How many GC mark runs have we done already?
$I1 = Parrot_interp_info .INTERPINFO_GC_MARK_RUNS # How many GC mark runs have we done already?
$P0 = new 'Undef' #kill object
sweep 0
$I2 = interpinfo .INTERPINFO_GC_MARK_RUNS # Should be one more now
$I2 = Parrot_interp_info .INTERPINFO_GC_MARK_RUNS # Should be one more now
$I3 = $I2 - $I1
sweep 0
$I4 = interpinfo .INTERPINFO_GC_MARK_RUNS # Should be same as last
$I4 = Parrot_interp_info .INTERPINFO_GC_MARK_RUNS # Should be same as last
$I5 = $I4 - $I2
is($I3,1, "sweep_0_need_destroy_destroy_obj")
is($I5,0, "sweep_0_need_destroy_destroy_obj")
.end


.sub collect_count
$I1 = interpinfo .INTERPINFO_GC_COLLECT_RUNS # How many garbage collections have we done already?
$I1 = Parrot_interp_info .INTERPINFO_GC_COLLECT_RUNS # How many garbage collections have we done already?
collect
$I2 = interpinfo .INTERPINFO_GC_COLLECT_RUNS # Should be one more now
$I2 = Parrot_interp_info .INTERPINFO_GC_COLLECT_RUNS # Should be one more now
$I3 = $I2 - $I1
is($I3,1, "collect_count")
.end


.sub collect_toggle
$I1 = interpinfo .INTERPINFO_GC_COLLECT_RUNS
$I1 = Parrot_interp_info .INTERPINFO_GC_COLLECT_RUNS
collectoff
collect
$I2 = interpinfo .INTERPINFO_GC_COLLECT_RUNS
$I2 = Parrot_interp_info .INTERPINFO_GC_COLLECT_RUNS
$I3 = $I2 - $I1
is($I3,0, "collect_toggle")

collecton
collect
$I4 = interpinfo .INTERPINFO_GC_COLLECT_RUNS
$I4 = Parrot_interp_info .INTERPINFO_GC_COLLECT_RUNS
$I6 = $I4 - $I2
is($I6,1, "collect_toggle")
.end


.sub collect_toggle_nested
$I1 = interpinfo .INTERPINFO_GC_COLLECT_RUNS
$I1 = Parrot_interp_info .INTERPINFO_GC_COLLECT_RUNS
collectoff
collectoff
collecton
collect # This shouldn't do anything... #'
$I2 = interpinfo .INTERPINFO_GC_COLLECT_RUNS
$I2 = Parrot_interp_info .INTERPINFO_GC_COLLECT_RUNS
$I3 = $I2 - $I1
is($I3,0, "collect_toggle_nested")

collecton
collect # ... but this should
$I4 = interpinfo .INTERPINFO_GC_COLLECT_RUNS
$I4 = Parrot_interp_info .INTERPINFO_GC_COLLECT_RUNS
$I6 = $I4 - $I2
is($I6,1, "collect_toggle_nested")

Expand All @@ -146,10 +146,10 @@ GC related bugs.
sweep 1
collect

$I0 = interpinfo .INTERPINFO_ACTIVE_PMCS
$I0 = Parrot_interp_info .INTERPINFO_ACTIVE_PMCS
ok($I0, "Got non-zero number of active PMCs")

$I1 = interpinfo .INTERPINFO_TOTAL_PMCS
$I1 = Parrot_interp_info .INTERPINFO_TOTAL_PMCS
ok($I0, "Got non-zero number of total PMCs")

$I2 = $I0 < $I1
Expand Down
6 changes: 3 additions & 3 deletions t/op/interp.t
Expand Up @@ -101,7 +101,7 @@ pasm_output_is( <<'CODE', <<'OUTPUT', "getinterp" );
getinterp P0
print "ok 1\n"
set I0, P0[.INTERPINFO_ACTIVE_PMCS]
interpinfo I1, .INTERPINFO_ACTIVE_PMCS
Parrot_interp_info I1, .INTERPINFO_ACTIVE_PMCS
eq I0, I1, ok2
print "not "
ok2:
Expand Down Expand Up @@ -148,12 +148,12 @@ after
OUTPUT


pir_output_is( <<'CODE', <<'OUTPUT', "interpinfo & getinterp: current runcore" );
pir_output_is( <<'CODE', <<'OUTPUT', "Parrot_interp_info & getinterp: current runcore" );
.include 'interpinfo.pasm'
.include 'interpcores.pasm'
.sub 'test' :main
$I0 = interpinfo .INTERPINFO_CURRENT_RUNCORE
$I0 = Parrot_interp_info .INTERPINFO_CURRENT_RUNCORE
if $I0 == .PARROT_FUNCTION_CORE goto ok1
if $I0 == .PARROT_FAST_CORE goto ok1
if $I0 == .PARROT_EXEC_CORE goto ok1
Expand Down
12 changes: 6 additions & 6 deletions t/op/lexicals.t
Expand Up @@ -108,7 +108,7 @@ pir_output_is( <<'CODE', <<'OUTPUT', 'api parsing' );
print "ok\n"
.include 'interpinfo.pasm'
load_bytecode 'pcore.pbc' # TODO autoload/preload
interpinfo $P1, .INTERPINFO_CURRENT_SUB
Parrot_interp_info $P1, .INTERPINFO_CURRENT_SUB
$P2 = $P1.'get_lexinfo'()
$P2 = $P1.'get_lexenv'()
print "ok\n"
Expand All @@ -123,7 +123,7 @@ pir_output_is( <<'CODE', <<'OUTPUT', 'get_lexinfo' );
.lex '$a', $P0
.lex '$b', $P9
.include "interpinfo.pasm"
interpinfo $P1, .INTERPINFO_CURRENT_SUB
Parrot_interp_info $P1, .INTERPINFO_CURRENT_SUB
$P2 = $P1.'get_lexinfo'()
$S0 = typeof $P2
print $S0
Expand All @@ -138,7 +138,7 @@ OUTPUT
pir_output_is( <<'CODE', <<'OUTPUT', 'get_lexinfo - no lexicals' );
.sub main :main
.include "interpinfo.pasm"
interpinfo $P1, .INTERPINFO_CURRENT_SUB
Parrot_interp_info $P1, .INTERPINFO_CURRENT_SUB
$P2 = $P1.'get_lexinfo'()
if null $P2 goto ok
print "LexInfo not NULL\n"
Expand Down Expand Up @@ -371,7 +371,7 @@ pir_output_is( <<'CODE', <<'OUTPUT', 'get_outer' );
.end
.sub foo :outer('main')
.include "interpinfo.pasm"
interpinfo $P1, .INTERPINFO_CURRENT_SUB
Parrot_interp_info $P1, .INTERPINFO_CURRENT_SUB
$P2 = $P1."get_outer"()
print $P2
print "\n"
Expand All @@ -389,7 +389,7 @@ pir_output_is( <<'CODE', <<'OUTPUT', 'get_outer 2' );
.end
.sub bar :outer('foo')
.include "interpinfo.pasm"
interpinfo $P1, .INTERPINFO_CURRENT_SUB
Parrot_interp_info $P1, .INTERPINFO_CURRENT_SUB
$P2 = $P1."get_outer"()
print $P2
print "\n"
Expand Down Expand Up @@ -596,7 +596,7 @@ the_end:
#print "In choose\n"
old_fail = find_lex "fail"
.include "interpinfo.pasm"
$P1 = interpinfo .INTERPINFO_CURRENT_CONT
$P1 = Parrot_interp_info .INTERPINFO_CURRENT_CONT
store_lex "cc", $P1
.const 'Sub' tr_sub = "_try"
newclosure our_try, tr_sub
Expand Down

0 comments on commit 20f3d0f

Please sign in to comment.