Author: leo
Date: Wed Oct 5 07:46:56 2005
New Revision: 9356
Modified:
trunk/DEPRECATED
trunk/imcc/t/syn/tail.t
trunk/ops/core.ops
trunk/ops/experimental.ops
trunk/ops/ops.num
trunk/t/pmc/exception.t
Log:
Deprecated 5 - die_hard renamed, die removed
* die_hard is now die
* die died
* for the original die, which called _exit(x) please use
.include "except_severity.pasm"
die .EXCEPT_DOOMED, x
Modified: trunk/DEPRECATED
==============================================================================
--- trunk/DEPRECATED (original)
+++ trunk/DEPRECATED Wed Oct 5 07:46:56 2005
@@ -30,12 +30,6 @@ intsave/intrestore/intdepth
use a ResizableIntegerPMC instead and standard keyed access
-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
- really nice. Therefore die_hard with be renamed to die, the 2 argument
- form of die survives.
-
String character class opcodes is_* find_* and API interfaces
The opcodes C<is_digit>, C<find_digit> et al and the according APIs are
Modified: trunk/imcc/t/syn/tail.t
==============================================================================
--- trunk/imcc/t/syn/tail.t (original)
+++ trunk/imcc/t/syn/tail.t Wed Oct 5 07:46:56 2005
@@ -52,7 +52,7 @@ pir_output_is(<<'CODE', <<'OUT', "tail c
if $I33 goto doit
bad_func:
printerr "_funcall: Bad function.\n"
- die
+ exit 0
doit:
set_args "(0x8)", argv
tailcall function
@@ -134,7 +134,7 @@ doit:
.pcc_tail_return
bad_func:
printerr "_funcall: Bad function.\n"
- die
+ exit 0
.end
## Return quotient and remainder as two integers.
@@ -214,7 +214,7 @@ pir_output_is(<<'CODE', <<'OUT', "tail c
if $I33 goto doit
bad_func:
printerr "_funcall: Bad function.\n"
- die
+ exit 0
doit:
function(argv :flatten)
.end
@@ -295,7 +295,7 @@ doit:
.pcc_end_return
bad_func:
printerr "_funcall: Bad function.\n"
- die
+ exit 0
.end
## Return the sum and the two arguments as three integers.
Modified: trunk/ops/core.ops
==============================================================================
--- trunk/ops/core.ops (original)
+++ trunk/ops/core.ops Wed Oct 5 07:46:56 2005
@@ -566,9 +566,10 @@ Throw the exception in $1.
Only valid inside an exception handler. Rethrow the exception $1.
-=item B<die_hard>(in INT, in INT)
+=item B<die>(in INT, in INT)
-Die with severity $1 and error $2.
+Die with severity $1 and error $2. If severity is .EXCEPT_DOOMED,
+call _exit($2). The latter isn't catchable.
=item B<exit>(in INT)
@@ -615,7 +616,7 @@ inline op rethrow(in PMC) {
goto ADDRESS(dest);
}
-inline op die_hard(in INT, in INT) {
+inline op die(in INT, in INT) {
if ($1 == EXCEPT_doomed)
_exit($2);
do_exception(interpreter, $1, $2);
Modified: trunk/ops/experimental.ops
==============================================================================
--- trunk/ops/experimental.ops (original)
+++ trunk/ops/experimental.ops Wed Oct 5 07:46:56 2005
@@ -133,28 +133,6 @@ inline op gcd(out INT, out INT, out INT,
=cut
-########################################
-
-=item B<die>()
-
-=item B<die>(in INT)
-
-Die. Hard. Calls _exit, and won't do any process cleanup
-
-TODO encode in existing die_hard opcode.
-
-=cut
-
-op die() :base_debug {
- _exit(0);
- goto NEXT();
-}
-
-op die(in INT) :base_debug {
- _exit($1);
- goto NEXT();
-}
-
=item B<new>(out PMC, in INT, in KEY)
XXX
Modified: trunk/ops/ops.num
==============================================================================
--- trunk/ops/ops.num (original)
+++ trunk/ops/ops.num Wed Oct 5 07:46:56 2005
@@ -271,10 +271,10 @@ delprop_p_s 240
delprop_p_sc 241
depth_i 242
deref_p_p 243
-die_hard_i_i 244
-die_hard_i_ic 245
-die_hard_ic_i 246
-die_hard_ic_ic 247
+die_i_i 244
+die_i_ic 245
+die_ic_i 246
+die_ic_ic 247
div_i_i 248
div_i_i_i 249
div_i_i_ic 250
Modified: trunk/t/pmc/exception.t
==============================================================================
--- trunk/t/pmc/exception.t (original)
+++ trunk/t/pmc/exception.t Wed Oct 5 07:46:56 2005
@@ -209,9 +209,9 @@ caught it in 1
something happend
OUTPUT
-output_is(<<'CODE', <<OUT, "die_hard");
+output_is(<<'CODE', <<OUT, "die");
push_eh _handler
- die_hard 3, 100
+ die 3, 100
print "not reached\n"
end
_handler:
@@ -221,9 +221,9 @@ CODE
caught it
OUT
-output_is(<<'CODE', <<OUT, "die_hard, error, severity");
+output_is(<<'CODE', <<OUT, "die, error, severity");
push_eh _handler
- die_hard 3, 100
+ die 3, 100
print "not reached\n"
end
_handler:
@@ -243,8 +243,8 @@ error 100
severity 3
OUT
-output_like(<<'CODE', <<OUT, "die_hard - no handler");
- die_hard 3, 100
+output_like(<<'CODE', <<OUT, "die - no handler");
+ die 3, 100
print "not reached\n"
end
_handler: