diff options
author | Alain Frisch <alain@frisch.fr> | 2013-10-23 14:28:31 +0000 |
---|---|---|
committer | Alain Frisch <alain@frisch.fr> | 2013-10-23 14:28:31 +0000 |
commit | 0f6f367ad4c2210bdf393ac60dbc0b6f7b8c796d (patch) | |
tree | 23038cc2fa16b7d37019e24012aaa22493ecd948 /byterun/printexc.c | |
parent | fe3afbdce8bbf5d1b959855aed4dec05f0ddba16 (diff) |
Change the representation of exception slots: instead of being represented as 'string ref', they are now blocks
of size 2, with tag = Object_tag, the first field being the pointer to the string, and second one being a unique id, generated
from the same sequence as for object values. Special case for predefined exceptions, represented with a negative id.
The unique id generator is moved from camlinternalOO to the C runtime system.
Also fix some bugs.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/raise_variants@14239 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'byterun/printexc.c')
-rw-r--r-- | byterun/printexc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/byterun/printexc.c b/byterun/printexc.c index b32109cc4..6e70d524c 100644 --- a/byterun/printexc.c +++ b/byterun/printexc.c @@ -53,7 +53,7 @@ CAMLexport char * caml_format_exception(value exn) buf.ptr = buf.data; buf.end = buf.data + sizeof(buf.data) - 1; - if (Wosize_val(exn) >= 2) { + if (Tag_val(exn) == 0) { add_string(&buf, String_val(Field(Field(exn, 0), 0))); /* Check for exceptions in the style of Match_failure and Assert_failure */ if (Wosize_val(exn) == 2 && |