Skip to content

Commit

Permalink
Changes
Browse files Browse the repository at this point in the history
  • Loading branch information
hhugo committed Jul 22, 2024
1 parent ad1514f commit 467366e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 3 additions & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
## Features/Changes
* Misc: update testsuite to OCmaml 5.2
* Misc: CI uses opam.2.2 and no longer use sunset repo
* Runtime: change Sys.os_type on windows (Cygwin -> Win32)
* Compiler: speedup global_flow/global_deadcode pass on large bytecode
* Runtime: change Sys.os_type on windows (Cygwin -> Win32)
* Runtime: backtraces are really expensive, they need to be be explicitly
requested at compile time (--enable with-js-error) or at startup (OCAMLRUNPARAM=b=1)

## Bug fixes
* Runtime: fix parsing of unsigned integers (0u2147483648)
Expand Down
4 changes: 4 additions & 0 deletions runtime/jslib.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,10 @@ function caml_wrap_exception(e) {
//Requires: caml_record_backtrace_env_flag
//Requires: caml_record_backtrace_runtime_flag
function caml_maybe_attach_backtrace(exn, force) {
// Backtraces are very expensive, we only enable them when explicitly requested
// at compile-time (--enable with-js-error) or at startup with OCAMLRUNPARAM=b=1.
// Libraries such as Base unconditionally enable backtraces (programmatically) but
// it's way to slow. Here, we force the end-user to opt-in to backtraces.
if(caml_record_backtrace_env_flag && caml_record_backtrace_runtime_flag)
return caml_exn_with_js_backtrace(exn, force);
else return exn
Expand Down

0 comments on commit 467366e

Please sign in to comment.