Skip to content

Commit

Permalink
Merge branch 'jsoo-tip' into test-merge
Browse files Browse the repository at this point in the history
  • Loading branch information
OlivierNicole committed Sep 13, 2024
2 parents 467125f + f5785b9 commit 57cca90
Show file tree
Hide file tree
Showing 5,584 changed files with 36,324 additions and 19,119 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
4 changes: 3 additions & 1 deletion .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
# ocamlformat bump
3c98cd3e0c4e1191983b602a8e38a1c92d259891
3c98cd3e0c4e1191983b602a8e38a1c92d259891
# Upgrade to OCamlformat 0.26.0
7de742a776fcdad4b098695617b9e7afab822c82
9 changes: 9 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
version: 2
updates:
- package-ecosystem: github-actions
directory: /
schedule:
interval: weekly
labels:
- dependencies
- no changelog
153 changes: 153 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
name: build

on:
pull_request:
push:
branches:
- master
schedule:
# Prime the caches every Monday
- cron: 0 1 * * MON

jobs:
build:
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
ocaml-compiler:
- "4.08"
- "4.09"
- "4.10"
- "4.11"
- "4.12"
- "4.13"
- "5.0"
- "5.1"
skip-test:
- true
skip-doc:
- true
skip-effects:
- true
include:
- os: ubuntu-latest
ocaml-compiler: "4.14"
skip-effects: true
skip-test: false
skip-doc: true
- os: macos-latest
ocaml-compiler: "4.14"
skip-effects: true
skip-test: false
skip-doc: true
- os: windows-latest
ocaml-compiler: "4.14"
skip-effects: true
skip-test: false
skip-doc: true
- os: ubuntu-latest
ocaml-compiler: "5.2"
skip-effects: false
skip-test: false
skip-doc: false
- os: macos-latest
ocaml-compiler: "5.2"
skip-effects: true
skip-test: false
skip-doc: true
- os: windows-latest
ocaml-compiler: "5.2"
skip-effects: false
skip-test: false
skip-doc: true

runs-on: ${{ matrix.os }}

steps:
- name: Set git to use LF
if: matrix.ocaml-compiler < 5.2
run: |
git config --global core.autocrlf false
git config --global core.eol lf
git config --global core.ignorecase false
- name: Checkout tree
uses: actions/checkout@v4

- name: Set-up Node.js
uses: actions/setup-node@v4
with:
node-version: lts/*

- name: Set-up OCaml ${{ matrix.ocaml-compiler }}
uses: ocaml/setup-ocaml@v3
with:
ocaml-compiler: ${{ matrix.ocaml-compiler }}
dune-cache: true
opam-pin: false

- run: opam install conf-pkg-config
if: runner.os == 'Windows'

- run: opam install . --best-effort
if: ${{ matrix.skip-test }}

- run: opam install . --with-test
if: ${{ !matrix.skip-test }}

- run: opam exec -- make all
if: ${{ !matrix.skip-test }}

- run: opam exec -- make tests
if: ${{ !matrix.skip-test }}

- run: opam exec -- dune build @all @runtest --profile using-effects
if: ${{ !matrix.skip-effects }}

- run: opam exec -- git diff --exit-code
if: ${{ !matrix.skip-test }}

- name: build doc
if: ${{ !matrix.skip-doc && github.event_name == 'push' && github.ref_name == 'master'}}
run: |
opam install odoc lwt_log cohttp-lwt-unix yojson ocp-indent graphics higlo
opam exec -- make doc
- name: synchronize doc
if: ${{ !matrix.skip-doc && github.event_name == 'push' && github.ref_name == 'master' }}
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: wikidoc
folder: doc-dev
clean: true
target-folder: doc/dev/

lint-opam:
runs-on: ubuntu-latest
steps:
- name: Checkout tree
uses: actions/checkout@v4

- name: Set-up OCaml
uses: ocaml/setup-ocaml@v3
with:
ocaml-compiler: "5.2"
dune-cache: true

- uses: ocaml/setup-ocaml/lint-opam@v3

lint-fmt:
runs-on: ubuntu-latest
steps:
- name: Checkout tree
uses: actions/checkout@v4

- name: Set-up OCaml
uses: ocaml/setup-ocaml@v3
with:
ocaml-compiler: "5.2"
dune-cache: true

- uses: ocaml/setup-ocaml/lint-fmt@v3
20 changes: 20 additions & 0 deletions .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Check changelog

on:
pull_request:
branches:
- master
types:
- labeled
- opened
- reopened
- synchronize
- unlabeled

jobs:
check-changelog:
name: Check changelog
runs-on: ubuntu-latest
steps:
- name: Check changelog
uses: tarides/changelog-check-action@v3
Empty file added .gitmodules
Empty file.
145 changes: 142 additions & 3 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,150 @@
# Dev (2023-??-??) - ??
# dev

## Features/Changes
* Misc: update testsuite to OCaml 5.2
* Misc: CI uses opam.2.2 and no longer use sunset repo
* Misc: yojson is no longer optional
* Compiler: speedup global_flow/global_deadcode pass on large bytecode
* Compiler: speedup json parsing, relying on Yojson.Raw (#1640)
* Compiler: make indirect call using sequence instead of using the call method
[f.call(null, args)] becomes [(0,f)(args)]
* 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)
* Toplevel: fix missing primitives with separate compilation
* Compiler: fix link of packed modules with separate compilation
* Fixed the static evaluation of some equalities (#1659)

# 5.8.2 (2024-05-26) - Luc

## Bug fixes
* Compiler: fix variable renaming for property binding and assignment target (part 2)

# 5.8.1 (2024-05-05) - Lille

## Features/Changes

* Library: new Typed_array.Bytes module.

## Bug fixes

* Compiler: fix #1509

# 5.8.0 (2024-04-20) - Lille

## Features/Changes
* Compiler: es6 now generate consise body
* Compiler: codegen: optimize Offset_ref for negative offsets
* Compiler: codegen: change argument passing of back edges.
* Compiler: codegen: use Array destruction to assign args of back
edges with es6.
* Compiler: codegen: specialize string equality
* Compiler: codegen: more specialization for %int_add, %int_sub
* Compiler: recognize and optimize String.concat
* Compiler: more inlining - duplicate small function.
* Compiler: Make it possible to link runtime JavaScript file
together with OCaml libraries #1509
* Runtime: abort instead of exit when calling unimplemented
js primitives in bytecode/native. It should help if one tries
to understand the source of the call with gdb (see #677)
* Runtime: re-enable marshalling of floats, disabled in jsoo 2.0
* Runtime: new runtime api for channels

## Bug fixes

* Compiler: fix variable renaming for property binding and assignment target
* Compiler: fix separate compilation of toplevels (broken since 5.7.0)
* Compiler: fix assertion while checking stack compatibility (#1600)

# 5.7.2 (2024-04-03) - Lille

## Bug fixes
* Runtime: add missing primitives for ocaml 5.2.0~beta1

# 5.7.1 (2024-03-05) - Lille

## Features/Changes
* Compiler: only flush the necessary env for closures (#1568)
* Library: dialog element support

## Bug fixes
* Compiler: fix --enable=vardecl
* Compiler: fix parallel renaming (bug introduced in #1567)
* Lib: fix paragraph construction and coercion
* Runtime: reduce memory leak with channels (#1581)

# 5.7.0 (2024-02-16) - Lille

## Features/Changes
* Mics: fix support for OCaml 5.2
* Compiler: no longer rely on IIFE for scoping variable inside loops
* Compiler: avoid parsing bytecode sections twice, jsoo counter part of ocaml#12599
* Lib: add ellipse to canvasRenderingContext2D (@FayCarsons, #1555)

## Bug fixes
* Compiler: fix global dead code elimination in a toplevel context
* Compiler: fix exit-loop-early optim in presence of closure (#1561)
* Compiler: remove quadratic behavior in generate.ml (#1531, #1567)

# 5.6.0 (2024-01-02) - Lille

## Features/Changes
* Compiler: try to preserve clorures ordering between ml and js
* Compiler: js-parser accept for await

## Bug fixes
* Compiler: js-parser now accept all the line terminators defined in the spec
* Compiler: js-parser: fix support for LHS assignment target
* Compiler: js-parser: fix parser of default export
* Compiler: js-parser: allow 'as' as ident
* Compiler: js-parser: fix for-in rewriting
* Compiler: js-parser: fix yield pretty print
* Compiler: js-parser: fix async arrow function
* Compiler: js-parser: fix class printing
* Compiler: js-parser: fix #privateName

# 5.5.2 (2023-12-01) - Lille

## Features/Changes
* Compiler: global dead code elimination (Micah Cantor, #1503)
* Compiler: change control-flow compilation strategy (#1496)
* Compiler: loop no longer absorb the whole continuation
* Compiler: Dead code elimination of unused references (#2076)
* Compiler: reduce memory consumption (#1516)
* Compiler: support for import and export construct in the js parser/printer
* Lib: add download attribute to anchor element
* Misc: switch CI to OCaml 5.1
* Misc: preliminary support for OCaml 5.2
* Misc: support for OCaml 5.1.1

## Bug fixes
* Runtime: fix Dom_html.onIE (#1493)
* Runtime: add conversion functions + strict equality for compatibility with Wasm_of_ocaml (#1492)
* Runtime: Dynlink should be able to find symbols in jsoo_runtime #1517
* Runtime: fix Unix.lstat, Unix.LargeFile.lstat (#1519)
* Compiler: fix global flow analysis (#1494)
* Compiler: fix js parser/printer wrt async functions (#1515)
* Compiler: fix free variables pass wrt parameters' default value (#1521)
* Compiler: fix free variables for classes
* Compiler: fix internal invariant (continuation)
* Compiler: fix variable renaming for let, const and classes
* Lib: Url.Current.set_fragment need not any urlencode (#1497)

# 5.4.0 (2023-07-06) - Lille

## 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 (2023-??-??) - ??
# 5.3.0 (2023-06-21) - Lille
## Features/Changes
* Misc: Bump magic number for ocaml 5.1
* Misc: changes to stay compatible with the next version of ppx_expect
Expand Down Expand Up @@ -65,7 +204,7 @@
## 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: fix control flow analysis; some annotations 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
Expand Down
7 changes: 0 additions & 7 deletions TODO.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,8 @@ Compiler optimizations
- constant hoisting (including functions, out of loops and functions)
- inline also partially applied functions

- we should check stack compatibility when parsing:
when jumping somewhere, the stack should keep the same shape

- cross-function optimizations

- deadcode elimination inside blocks
(for instance, elimination of function which are defined in a
functor but are not used)

- should we rebind variables from a deeper level ?
(only if used more than once...)

Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5.3.0-wasm
5.8.2
2 changes: 1 addition & 1 deletion benchmarks/sources/ml/nucleic.ml
Original file line number Diff line number Diff line change
Expand Up @@ -6957,7 +6957,7 @@ let pseudoknot_domains =
(* L2 LOOP | *)
; p_o3' rUs 16 15 (* | *)
; p_o3' rCs 17 16 (* | *)
; p_o3' rAs 18 17 (* <-' *)
; p_o3' rAs 18 17 (* <-' *)
(* *)
(* L1 LOOP *)
; helix3' rU 7 8 (* <-. *)
Expand Down
2 changes: 1 addition & 1 deletion compiler/bin-js_of_ocaml/check_runtime.ml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ let print_groups output l =
output_string output (Printf.sprintf "%s\n" name)))

let f (runtime_files, bytecode, target_env) =
Generate.init ();
Linker.reset ();
let runtime_files, builtin =
List.partition_map runtime_files ~f:(fun name ->
match Builtins.find name with
Expand Down
Loading

0 comments on commit 57cca90

Please sign in to comment.