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 /stdlib/callback.ml | |
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 'stdlib/callback.ml')
-rw-r--r-- | stdlib/callback.ml | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/stdlib/callback.ml b/stdlib/callback.ml index c9cf062bf..6e4f9481e 100644 --- a/stdlib/callback.ml +++ b/stdlib/callback.ml @@ -21,5 +21,5 @@ let register name v = let register_exception name (exn : exn) = let exn = Obj.repr exn in - let slot = if Obj.size exn = 1 then exn else Obj.field exn 1 in + let slot = if Obj.tag exn = Obj.object_tag then exn else Obj.field exn 0 in register_named_value name slot |