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

List.init vs js_of_ocaml #7764

Closed
vicuna opened this issue Apr 5, 2018 · 3 comments
Closed

List.init vs js_of_ocaml #7764

vicuna opened this issue Apr 5, 2018 · 3 comments
Assignees

Comments

@vicuna
Copy link

vicuna commented Apr 5, 2018

Original bug ID: 7764
Reporter: @damiendoligez
Assigned to: @gasche
Status: resolved (set by @gasche on 2018-04-05T20:18:00Z)
Resolution: fixed
Priority: normal
Severity: minor
Version: 4.07.0+dev/beta2/rc1/rc2
Fixed in version: 4.07.0+dev/beta2/rc1/rc2
Category: standard library
Monitored by: @nojb @hhugo

Bug description

The threshold used by List.init to switch between recursive to tail-rec implementations will cause problems on js_of_ocaml. See #1034 (review) for the original report.

@vicuna
Copy link
Author

vicuna commented Apr 5, 2018

Comment author: @gasche

I thought first of using Sys.backend_type to detect non-standard backends, but in fact js_of_ocaml works with the normal bytecode pipeline first, so I don't think we can distinguish it that way. What about using Sys.runtime_parameters at List-module-initialization-time to check for the stack limit, and define a module-level boolean from this that List.init checks at runtime?

@vicuna
Copy link
Author

vicuna commented Apr 5, 2018

Comment author: @hhugo

Backend_type is [Other "js_of_ocaml"] with js_of_ocaml ocaml.
see GPR #1697

@vicuna
Copy link
Author

vicuna commented Apr 5, 2018

Comment author: @gasche

I believe that merging Hugo's PR above fixed the issue.

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