Author: leo
Date: Wed Oct 5 07:16:45 2005
New Revision: 9352
Modified:
trunk/DEPRECATED
trunk/imcc/t/syn/pcc.t
trunk/ops/experimental.ops
trunk/t/op/hacks.t
trunk/t/pmc/coroutine.t
trunk/t/pmc/exception.t
trunk/t/pmc/io.t
trunk/t/pmc/object-meths.t
trunk/t/pmc/signal.t
trunk/t/pmc/sub.t
Log:
Deprecated 4 - set_eh removed
* use push_eh label instead
* adjust some tests
Modified: trunk/DEPRECATED
==============================================================================
--- trunk/DEPRECATED (original)
+++ trunk/DEPRECATED Wed Oct 5 07:16:45 2005
@@ -30,11 +30,6 @@ intsave/intrestore/intdepth
use a ResizableIntegerPMC instead and standard keyed access
-set_eh
-
- already dprecated
- use push_eh
-
die, die(in INT), die_hard(int INT, in INT)
die is a special case of die_hard, but the name of the latter isn't
Modified: trunk/imcc/t/syn/pcc.t
==============================================================================
--- trunk/imcc/t/syn/pcc.t (original)
+++ trunk/imcc/t/syn/pcc.t Wed Oct 5 07:16:45 2005
@@ -641,8 +641,7 @@ ret0:
## HERE IS where we want the try block to start ####
.local Sub handler
- newsub handler, .Exception_Handler, catch0
- set_eh handler
+ push_eh catch0
# now call the generator, until that throws 'StopIteration'
# protect against endless loops
Modified: trunk/ops/experimental.ops
==============================================================================
--- trunk/ops/experimental.ops (original)
+++ trunk/ops/experimental.ops Wed Oct 5 07:16:45 2005
@@ -135,21 +135,6 @@ inline op gcd(out INT, out INT, out INT,
########################################
-=item B<set_eh>(in PMC)
-
-Install $1 as an exception handler.
-
-=cut
-
-inline op set_eh(in PMC) {
- /* use push_eh */
- push_exception(interpreter, $1);
- goto NEXT();
-}
-
-
-########################################
-
=item B<die>()
=item B<die>(in INT)
Modified: trunk/t/op/hacks.t
==============================================================================
--- trunk/t/op/hacks.t (original)
+++ trunk/t/op/hacks.t Wed Oct 5 07:16:45 2005
@@ -33,8 +33,7 @@ SKIP: {
skip("no universal SIGFPE handling", 2);
output_is(<<'CODE', <<OUT, "catch a SIGFPE");
- newsub P0, .Exception_Handler, _handler
- set_eh P0
+ push_eh _handler
div I10, 0
print "not reached\n"
end
@@ -57,8 +56,7 @@ severity 0
OUT
output_is(<<'CODE', <<OUT, "catch a SIGFPE 2");
- newsub P0, .Exception_Handler, _handler
- set_eh P0
+ push_eh _handler
div I10, 0
print "not reached\n"
end
Modified: trunk/t/pmc/coroutine.t
==============================================================================
--- trunk/t/pmc/coroutine.t (original)
+++ trunk/t/pmc/coroutine.t Wed Oct 5 07:16:45 2005
@@ -316,8 +316,7 @@ output_is(<<'CODE', <<'OUTPUT', "Corouti
.include "interpinfo.pasm"
_main:
newsub P0, .Coroutine, _coro
- newsub P16, .Exception_Handler, _catchm
- set_eh P16
+ push_eh _catchm
new P16, .Integer
set P16, 2
store_global "i", P16
@@ -331,8 +330,7 @@ lp:
print "done\n"
end
_coro:
- newsub P16, .Exception_Handler, _catchc
- set_eh P16
+ push_eh _catchc
corolp:
find_global P17, "i"
dec P17
@@ -353,8 +351,7 @@ output_is(<<'CODE', <<'OUTPUT', "Corouti
.include "interpinfo.pasm"
_main:
newsub P0, .Coroutine, _coro
- newsub P16, .Exception_Handler, _catchm
- set_eh P16
+ push_eh _catchm
new P16, .Integer
set P16, 2
store_global "i", P16
@@ -367,8 +364,7 @@ lp:
print "done\n"
end
_coro:
- newsub P16, .Exception_Handler, _catchc
- set_eh P16
+ push_eh _catchc
corolp:
find_global P17, "i"
dec P17
@@ -390,8 +386,7 @@ output_is(<<'CODE', <<'OUTPUT', "Corouti
.include "interpinfo.pasm"
_main:
newsub P0, .Coroutine, _coro
- newsub P16, .Exception_Handler, _catchm
- set_eh P16
+ push_eh _catchm
new P16, .Integer
set P16, 2
store_global "i", P16
@@ -425,8 +420,7 @@ output_is(<<'CODE', <<'OUTPUT', "Corouti
.include "interpinfo.pasm"
_main:
newsub P0, .Coroutine, _coro
- newsub P16, .Exception_Handler, _catchm
- set_eh P16
+ push_eh _catchm
new P16, .Integer
set P16, 2
store_global "i", P16
@@ -439,8 +433,7 @@ lp:
print "done\n"
end
_coro:
- newsub P16, .Exception_Handler, _catchc
- set_eh P16
+ push_eh _catchc
corolp:
find_global P17, "i"
dec P17
Modified: trunk/t/pmc/exception.t
==============================================================================
--- trunk/t/pmc/exception.t (original)
+++ trunk/t/pmc/exception.t Wed Oct 5 07:16:45 2005
@@ -129,8 +129,7 @@ CODE
OUTPUT
output_like(<<'CODE', <<'OUTPUT', "throw - no handler, no message");
- newsub P20, .Exception_Handler, _handler
- set_eh P20
+ push_eh _handler
new P0, .Exception
clear_eh
throw P0
@@ -211,8 +210,7 @@ something happend
OUTPUT
output_is(<<'CODE', <<OUT, "die_hard");
- newsub P0, .Exception_Handler, _handler
- set_eh P0
+ push_eh _handler
die_hard 3, 100
print "not reached\n"
end
@@ -224,8 +222,7 @@ caught it
OUT
output_is(<<'CODE', <<OUT, "die_hard, error, severity");
- newsub P0, .Exception_Handler, _handler
- set_eh P0
+ push_eh _handler
die_hard 3, 100
print "not reached\n"
end
Modified: trunk/t/pmc/io.t
==============================================================================
--- trunk/t/pmc/io.t (original)
+++ trunk/t/pmc/io.t Wed Oct 5 07:16:45 2005
@@ -186,23 +186,20 @@ output_is(<<'CODE', <<'OUTPUT', "read on
ok1:
print "ok 1\n"
- newsub P20, .Exception_Handler, _readline_handler
- set_eh P20
+ push_eh _readline_handler
readline S0, P0 # Currently segfaults
print "not "
_readline_handler:
print "ok 2\n"
branch fin
- newsub P20, .Exception_Handler, _read_handler
- set_eh P20
+ push_eh _read_handler
read S0, P0, 1
print "not "
_read_handler:
print "ok 3\n"
- newsub P20, .Exception_Handler, _print_handler
- set_eh P20
+ push_eh _print_handler
print P0, "kill me now\n"
print "not "
_print_handler:
Modified: trunk/t/pmc/object-meths.t
==============================================================================
--- trunk/t/pmc/object-meths.t (original)
+++ trunk/t/pmc/object-meths.t Wed Oct 5 07:16:45 2005
@@ -159,8 +159,7 @@ output_is(<<'CODE', <<'OUTPUT', "specifi
set P0, "bar"
setprop P1, "BUILD", P0
- newsub P20, .Exception_Handler, _handler
- set_eh P20
+ push_eh _handler
find_type I1, "Foo"
new P3, I1
@@ -442,8 +441,7 @@ SKIP: {
skip("currently broken", 1);
output_is(<<'CODE', <<'OUTPUT', "exceptions and different runloops");
_main:
- newsub P0, .Exception_Handler, eh
- set_eh P0
+ push_eh eh
newclass P0, "Foo"
Modified: trunk/t/pmc/signal.t
==============================================================================
--- trunk/t/pmc/signal.t (original)
+++ trunk/t/pmc/signal.t Wed Oct 5 07:16:45 2005
@@ -120,8 +120,7 @@ SKIP: {
send_SIGHUP;
output_is(<<'CODE', <<'OUTPUT', "SIGHUP event - sleep, catch");
- newsub P20, .Exception_Handler, _handler
- set_eh P20
+ push_eh _handler
print "start\n"
sleep 2
print "never\n"
Modified: trunk/t/pmc/sub.t
==============================================================================
--- trunk/t/pmc/sub.t (original)
+++ trunk/t/pmc/sub.t Wed Oct 5 07:16:45 2005
@@ -1125,8 +1125,7 @@ pir_output_is(<<'CODE', <<'OUTPUT', "cal
print "Bar foo\n"
$P1 = getinterp
$I0 = 0
- newsub $P2, .Exception_Handler, tb_end
- set_eh $P2
+ push_eh tb_end
tb_loop:
$P0 = $P1["sub"; $I0]
print "caller "