2 # Copyright (C) 2001-2009, Parrot Foundation.
7 use lib qw( . lib ../lib ../../lib );
10 use Parrot::Test tests => 8;
14 t/op/interp.t - Running the Interpreter
22 Tests the old and new styles of running the Parrot interpreter and the
27 # we probably shouldn't just run a label, but this catches a potential seggie
28 pasm_output_is( <<'CODE', <<'OUTPUT', "runinterp - new style" );
29 new P0, 'ParrotInterpreter'
45 pir_output_is( <<'CODE', <<'OUTPUT', 'runinterp - works with printing' );
48 .local pmc test_interp
49 test_interp = new 'ParrotInterpreter'
54 runinterp test_interp, pasm
68 # Need to disable GC while trace is on, as there's a non-zero chance that a
69 # GC sweep would occur, causing a bonus "GC mark" line in the output, which makes
72 <<'CODE', <<'OUTPUT', "restart trace" );
89 pasm_output_is( <<'CODE', 'nada:', 'interp - warnings' );
99 pasm_output_is( <<'CODE', <<'OUTPUT', "getinterp" );
100 .include "interpinfo.pasm"
103 set I0, P0[.INTERPINFO_ACTIVE_PMCS]
104 interpinfo I1, .INTERPINFO_ACTIVE_PMCS
115 pasm_output_is( <<'CODE', <<'OUTPUT', "access argv" );
117 .include "iglobals.pasm"
119 set P2, P1[.IGLOBALS_ARGV_LIST]
138 pasm_output_is( <<'CODE', <<'OUTPUT', "check_events" );
149 pir_output_is( <<'CODE', <<'OUTPUT', "interpinfo & getinterp: current runcore" );
150 .include 'interpinfo.pasm'
151 .include 'interpcores.pasm'
154 $I0 = interpinfo .INTERPINFO_CURRENT_RUNCORE
155 if $I0 == .PARROT_FUNCTION_CORE goto ok1
156 if $I0 == .PARROT_FAST_CORE goto ok1
157 if $I0 == .PARROT_SWITCH_CORE goto ok1
158 if $I0 == .PARROT_CGOTO_CORE goto ok1
159 if $I0 == .PARROT_CGP_CORE goto ok1
160 if $I0 == .PARROT_EXEC_CORE goto ok1
161 if $I0 == .PARROT_GC_DEBUG_CORE goto ok1
167 $I1 = $P0[.INTERPINFO_CURRENT_RUNCORE]
168 if $I0 == $I1 goto ok2
180 # cperl-indent-level: 4
183 # vim: expandtab shiftwidth=4: