Skip to content

Releases: ocsigen/js_of_ocaml

5.4.0

06 Jul 09:09
Compare
Choose a tag to compare

CHANGES:

Bug fixes

  • Runtime: Fix recursive modules on ocaml < 4.13 (#1485)
  • Runtime: fix hashing of NaN (#1475)
  • Runtime: float rounding should resolve tie away from zero (#1475)
  • Runtime: fix Gc.stat, Gc.quick_stat, Gc.get (#1475)
  • Compiler: fix some miscompilation, probably introduced in jsoo 5.0.0,
    revealed by OCaml 5.0

5.3.0

21 Jun 08:38
7b2929f
Compare
Choose a tag to compare

CHANGES:

Features/Changes

  • Misc: Bump magic number for ocaml 5.1
  • Misc: changes to stay compatible with the next version of ppx_expect
  • Runtime: support conversion of Uint8ClampedArray typed arrays to bigarrays (#1472)

Bug fixes

  • Compiler: fix location for parsing errors when last token is a virtual semicolon
  • Compiler: fix variable renaming with nested const/let decl with identical names
  • Compiler: fix variable renaming inside js method
  • Compiler: consise body should allow any expression but object literals
  • Compiler: preserve [new] without arguments [new C] (vs [new C()]
  • Compiler: remove invalid rewriting of js (#1471, #1469)
  • Runtime: fix int32 values returned from bigarrays when wrapping Uint32Array objects (#1472)

5.2.0

28 Apr 10:25
Compare
Choose a tag to compare

CHANGES:

Features/Changes

  • Compiler: jsoo link archive with -a (#1428)

Bug fixes

  • Compiler: put custom header at the top of the output file (fix #1441)
  • Compiler (js parser): fix parsing of js labels (fix #1440)
  • Compiler: fix simplification of js with let and const
  • Compiler: reduce memory consumption when parsing js
  • Compiler: parsing js can return a list of token, the list was sometime incorrect
  • Sourcemap: stop producing sourcemaps mappings with negative lines or columns
  • Runtime: fix marshalling with sharing and string (use-js-string)

5.1.1

15 Mar 14:21
Compare
Choose a tag to compare

CHANGES:

Bug fixes

  • Compiler: fix jsoo link in presence of --disable use-js-string (#1430)

5.1.0

07 Mar 11:05
Compare
Choose a tag to compare

CHANGES:

Features/Changes

  • Lib: Added support for KeyboardEvent.getModifierState
  • Misc: bump min ocaml version to 4.08
  • Misc: remove some old runtime files to support some external libs
  • Misc: switch to dune 3.7
  • Effects: partial CPS transformation, resulting in much better performances, lower compilation time and smaller generated code
  • Compiler: separate compilation can now drops unused units when linking (similar to ocamlc). (#1378)
  • Compiler: specialize string to js-string conversion for all valid utf8 strings (previously just ascii)
  • Compiler: JavaScript files generated by js_of_ocaml are now UTF-8 encoded.
  • Compiler: use identifier for object literals when possible
  • Compiler: Cache function arity (the length prop of a function is slow with v8)
  • Compiler: The js lexer is now utf8 aware, recognize and emit utf8 ident
  • Compiler: Update the js lexer with new number literal syntax
  • Compiler: update js parser to support most es6 feature (#1391)
  • Compiler: stop parsing the builtin js runtime if not necessary
  • Compiler: improve js pretty printer (#1405)
  • Compiler: improve debug location and speedup compilation (#1407)
  • Toplevel: Enable separate compilation of toplevels
  • Runtime: js backtrace recording controled by OCAMLRUNPARAM
  • Runtime: support for zstd decompression of marshalled data (ocaml.5.1) (#12006)
  • Runtime: stub out custom runtime events symbols for OCaml 5.1 (#1414)

Bug fixes

  • Effects: fix Js.export and Js.export_all to work with functions (#1417,#1377)
  • Sourcemap: fix incorrect sourcemap with separate compilation
  • Compiler: fix control flow analysis; some annotions were wrong in the runtime
  • Compiler: js backtrace recording respected in the js runtime and when using effects
  • Compiler: no longer fail on invalid source file (when the file is a directory)
  • Runtime: fix the compilation of some mutually recursive functions

5.0.1

20 Dec 08:37
Compare
Choose a tag to compare

CHANGES:

Features/Changes

Bug fixes

Runtime: fix caml_read_file_content

5.0.0

19 Dec 23:12
Compare
Choose a tag to compare

CHANGES:

Features/Changes

  • Compiler: add support for effect handlers (--enable=effects)
  • Compiler: small refactoring in code generation
  • Compiler: check build info compatibility when linking js file.
  • Misc: fix and update benchmarks
  • Misc: upgrade CI
  • Toplevel: recover more names when generating code during toplevel evaluation
  • Runtime: wrapping exception or not is now controled in the runtime.

Bug fixes

  • Runime: Gc.finalise_last should not be eliminated
  • Tyxml: reactive dom needed a fix after #1268 (#1353)
  • Toplevel: Make sure the toplevel uses the correct memory representaion for strings
  • Compiler: fix minifier, missing constraint on try-catch blocks.
  • Compiler: Miscompilation of code involving references and exceptions (#1354, #1356)

4.1.0

15 Nov 10:01
Compare
Choose a tag to compare

CHANGES:

Features/Changes

  • Compiler: initial support for OCaml 5 (#1265,#1303)
  • Compiler: bump magic number to match the 5.0.0~alpha0 release (#1288)
  • Compiler: complain when runtime and compiler built-in primitives disagree (#1312)
  • Compiler: more efficient implementation of Js_traverse.freevar
  • Compiler: more efficient implementation of Js_traverse.rename_variable
  • Compiler: --linkall now export all compilation units in addition to primitives (#1324)
  • Compiler: improve --dynlink, one no longer need to pass --toplevel to use Dynlink (#1324)
  • Compiler: toplevel runtime files "+toplevel.js" and "+dynlink.js" are added automatically (#1324)
  • Misc: switch to cmdliner.1.1.0
  • Misc: remove old binaries jsoo_link, jsoo_fs
  • Misc: remove uchar dep
  • Misc: use 4.14 in the CI
  • Misc: switch to dune 3
  • Lib: add missing options for Intl.DateTimeFormat
  • Lib: add missing options for Intl.NumberFormat
  • Lib: wheel event binding
  • Lib: add normalize in js_string (ES6)
  • Lib: more complete transition event bindings
  • Lib: remove support for old browser-specific transition events
  • Runtime: Implement weak semantic for weak and ephemeron
  • Runtime: Implement Gc.finalise_last
  • Runtime: Implement buffer for in_channels
  • Runtime: add support for unix_opendir, unix_readdir, unix_closedir, win_findfirst, win_findnext, win_findclose
  • Runtime: Dont use require when target-env is browser
  • Runtime: Implements Parsing.set_trace (#1308)
  • Test: track external used in the stdlib and unix

Bug fixes

  • Compiler: fix quadratic behavior of dominance frontier (fix #1300)
  • Compiler: fix rewriter bug in share_constant (fix #1247)
  • Compiler: fix miscompilation of mutually recursive functions in loop (#1321)
  • Compiler: fix bug while minifying/renaming try-catch blocks
  • Compiler: no dead code elimination for caml_js_get
  • Runtime: fix ocamlyacc parse engine (#1307)
  • Runtime: fix Out_channel.is_buffered, set_buffered
  • Runtime: fix format wrt alternative
  • Runtime: fix Digest.channel
  • Runtime: sync channel seek / pos with the native runtime
  • Misc: fix installation with dune 3 without opam
  • Node: Only write small chunks to stdout/stderr so they flush
  • Deriving: fix for nested polymorphic variants

4.0.0

24 Jan 22:55
Compare
Choose a tag to compare

CHANGES:

Features/Changes

  • Compiler: add --target-env flag, for JS runtime specific compilation targets (#1160).
  • Compiler: static evaluation of backend_type (#1166)
  • Compiler: speedup emitting js files (#1174)
  • Compiler: simplify (a | 0) >>> 0 into (a >>> 0) (#1177)
  • Compiler: improve static evaluation of cond (#1178)
  • Compiler: be more consistent dealing with js vs ocaml strings (#984)
  • Compiler: Compiler: add BigInt to provided symbols (fix #1168) (#1191)
  • Compiler: use globalThis, drop joo_global_object #1193
  • Compiler: new -Werror flag to turn wanrings into errors (#1222)
  • Compiler: make the inlining less agressive, reduce size, improve pref (#1220)
  • Compiler: rename internal library js_of_ocaml-compiler.runtime to js_of_ocaml-compiler.runtime-files
  • Lib: new runtime library to improve compatibility with Brr and gen_js_api
  • Lib: add messageEvent to Dom_html (#1164)
  • Lib: add PerformanceObserver API (#1164)
  • Lib: add CSSStyleDeclaration.{setProperty, getPropertyValue, getPropertyPriority, removeProperty} (#1170)
  • Lib: make window.{inner,outer}{Width,Height} non-optional
  • Lib: introduce Js_of_ocaml.Js_error module, deprecate Js_of_ocaml.Js.Error exception.
  • Lib: add deprecation warning for deprecated code
  • PPX: json can now be derived for mutable records (#1184)
  • Runtime: use crypto.getRandomValues when available (#1209)
  • Misc: move js_of_ocaml-ocamlbuild out to its own repo
  • Misc: add support for OCaml 4.14 (#1173)

Bug fixes

  • Compiler: fix sourcemap warning for empty cma (#1169)
  • Compiler: Strengthen bound checks. (#1172)
  • Compiler: fix --wrap-with-fun under node (#653, #1171)
  • Compiler: fix parsing of annotaions in js stubs (#1212, fix #1213)
  • Ppx: allow apostrophe in lident (fix #1183) (#1192)
  • Runtime: fix float parsing in hexadecimal form
  • Runtime: fix implementation of caml_js_instanceof
  • Graphics: fix mouse_{x,y} (#1206)

3.11.0

06 Oct 12:12
Compare
Choose a tag to compare

CHANGES:

Features/Changes

  • Compiler: setting tc_depth to 0 remove direct call from the tc optimization.
  • Lib: add hidden, onfullscreenchange and onwebkitfullscreenchange to document
  • Runtime: fixes for Windows, all tests pass
  • Runtime: make all windows drive available on nodejs.
  • Runtime: add support for Sys.mkdir and Sys.rmdir
  • Runtime: make stdin work on nodejs
  • Runtime: add support for Unix(stat,lstat,mkdir,rmdir,symlink,readlink,unlink,getuid) on nodejs.
  • Runtime: add caml_raise_with_args

Bug fixes

  • Compiler: fix toplevel generation (#1129, #1130, #1131)
  • Compiler: fix predefined exn id with separate compilation
  • Compiler: js stubs without 'Provides' should still allow 'Require'
  • Runtime: fix handling of uncaugh exceptions
  • Runtime: fix error handling of Sys.readdir
  • Dune: make git version lookup more resilient