Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose a Obj.last_variant_tag constant #6834

Closed
vicuna opened this issue Apr 8, 2015 · 1 comment
Closed

Expose a Obj.last_variant_tag constant #6834

vicuna opened this issue Apr 8, 2015 · 1 comment
Assignees

Comments

@vicuna
Copy link

vicuna commented Apr 8, 2015

Original bug ID: 6834
Reporter: @gasche
Assigned to: @mshinwell
Status: closed (set by @xavierleroy on 2016-12-07T10:49:15Z)
Resolution: fixed
Priority: low
Severity: tweak
Category: standard library
Monitored by: @diml

Bug description

It would be nice to advertise the value of the last-usable-tag (for non-constant constructors). Currently people just assume it is Obj.lazy_tag - 1, but this limit is not currently specified anywhere.

Additional information

This was prompted by Benjamin Grégoire changes in the vm_compute mechanism of Coq, after Maxime Dénès remarked the lack of check for out-of-bound tags.

@vicuna
Copy link
Author

vicuna commented May 6, 2015

Comment author: @mshinwell

This is such a small change that it seems reasonable to add it to 4.02.2. I added two new values:

Obj.first_non_constant_constructor_tag
Obj.last_non_constant_constructor_tag

These should suffice for bounds checks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants