Skip to content

Commit 52c69c8

Browse files
authored
Merge pull request #131 from ocaml-wasm/jsoo-merge
Merge with js_of_ocaml master
2 parents 3c9036a + 1f11a80 commit 52c69c8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

77 files changed

+586
-686
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ jobs:
122122
- run: opam install . --best-effort
123123
if: ${{ matrix.skip-test }}
124124

125-
- run: cat VERSION | xargs opam pin wasm_of_ocaml-compiler . -n --with-version
125+
- run: cat VERSION | xargs opam pin . -n --with-version
126126
if: ${{ !matrix.skip-test }}
127127
shell: bash
128128

@@ -164,44 +164,4 @@ jobs:
164164
branch: wikidoc
165165
folder: doc-dev
166166
clean: true
167-
target-folder: doc/dev/
168-
169-
lint-opam:
170-
runs-on: ubuntu-latest
171-
steps:
172-
- name: Checkout tree
173-
uses: actions/checkout@v4
174-
- name: Set-up OCaml
175-
uses: ocaml/setup-ocaml@v3
176-
with:
177-
ocaml-compiler: "5.2"
178-
dune-cache: true
179-
- name: Pin dune
180-
run: |
181-
opam pin add -n dune.3.17 https://github.com/ocaml/dune.git
182-
- uses: ocaml/setup-ocaml/lint-opam@v3
183-
184-
lint-fmt:
185-
runs-on: ubuntu-latest
186-
steps:
187-
- name: Checkout tree
188-
uses: actions/checkout@v4
189-
- name: Set-up OCaml
190-
uses: ocaml/setup-ocaml@v3
191-
with:
192-
ocaml-compiler: "5.2"
193-
dune-cache: true
194-
- name: Pin dune
195-
run: |
196-
opam pin add -n dune.3.17 https://github.com/ocaml/dune.git
197-
- uses: ocaml/setup-ocaml/lint-fmt@v3
198-
199-
lint-runtime:
200-
runs-on: ubuntu-latest
201-
steps:
202-
- name: Checkout tree
203-
uses: actions/checkout@v4
204-
- name: Set-up Biome
205-
uses: biomejs/setup-biome@v2
206-
- name: Run biome
207-
run: biome ci
167+
target-folder: doc/dev/

.github/workflows/lint.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: lint
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- master
8+
9+
jobs:
10+
lint-opam:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout tree
14+
uses: actions/checkout@v4
15+
- name: Set-up OCaml
16+
uses: ocaml/setup-ocaml@v3
17+
with:
18+
ocaml-compiler: "5.2"
19+
dune-cache: true
20+
- name: Pin dune
21+
run: |
22+
opam pin add -n dune.3.17 https://github.com/ocaml/dune.git
23+
- uses: ocaml/setup-ocaml/lint-opam@v3
24+
25+
lint-fmt:
26+
runs-on: ubuntu-latest
27+
steps:
28+
- name: Checkout tree
29+
uses: actions/checkout@v4
30+
- name: Set-up OCaml
31+
uses: ocaml/setup-ocaml@v3
32+
with:
33+
ocaml-compiler: "5.2"
34+
dune-cache: true
35+
- name: Pin dune
36+
run: |
37+
opam pin add -n dune.3.17 https://github.com/ocaml/dune.git
38+
- uses: ocaml/setup-ocaml/lint-fmt@v3
39+
40+
lint-runtime:
41+
runs-on: ubuntu-latest
42+
steps:
43+
- name: Checkout tree
44+
uses: actions/checkout@v4
45+
- name: Set-up Biome
46+
uses: biomejs/setup-biome@v2
47+
- name: Run biome
48+
run: biome ci

CHANGES.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
1-
# dev
1+
# 5.9.0 (2024-11-22) - Lille
22

33
## Features/Changes
44
* Misc: update testsuite to OCaml 5.2
55
* Misc: CI uses opam.2.2 and no longer use sunset repo
66
* Misc: yojson is no longer optional
77
* Misc: reduce the diff with the wasm_of_ocaml fork
8+
* Misc: finalize support for OCaml 5.3
89
* Compiler: speedup global_flow/global_deadcode pass on large bytecode
910
* Compiler: improved global dead code elimination (#2206)
1011
* Compiler: speedup json parsing, relying on Yojson.Raw (#1640)
1112
* Compiler: Decode sourcemap mappings only when necessary (#1664)
12-
* Compiler: make indirect call using sequence instead of using the call method
13-
[f.call(null, args)] becomes [(0,f)(args)]
1413
* Compiler: mark [TextEncoder] as reserved
1514
* Compiler: add support for the Wasm backend in parts of the pipeline, in
1615
prevision for the merge of wasm_of_ocaml
@@ -21,12 +20,15 @@
2120
* Compiler: Emit index source_map to avoid changing mappings (#1714, #1715)
2221
* Compiler: improved source map generation (#1716)
2322
* Runtime: change Sys.os_type on windows (Cygwin -> Win32)
24-
* Runtime: backtraces are really expensive, they need to be be explicitly
23+
* Runtime: backtraces are really expensive, they need to be explicitly
2524
requested at compile time (--enable with-js-error) or at startup (OCAMLRUNPARAM=b=1)
2625
* Runtime: allow dynlink of precompiled js with separate compilation (#1676)
2726
* Runtime: reimplement the runtime of weak and ephemeron (#1707)
2827
* Lib: Modify Typed_array API for compatibility with WebAssembly
28+
* Lib: add details element and toggle event (#1728)
2929
* Toplevel: no longer set globals for toplevel initialization
30+
* Runtime: precompute constants used in `caml_lxm_next` (#1730)
31+
* Runtime: cleanup runtime
3032

3133
## Bug fixes
3234
* Runtime: fix parsing of unsigned integers (0u2147483648) (#1633, #1666)

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
5.8.2
1+
5.9.0

biome.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"$schema": "https://biomejs.dev/schemas/1.9.1/schema.json",
33
"files": {
44
"include": ["runtime"],
5-
"ignore": ["runtime/zstd.ts"]
5+
"ignore": ["runtime/js/zstd.ts"]
66
},
77
"formatter": {
88
"enabled": true,

compiler/bin-js_of_ocaml/cmd_arg.ml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ let options =
130130
in
131131
let no_sourcemap =
132132
let doc =
133-
"Don't generate source map. All other source map related flags will be be ignored."
133+
"Don't generate source map. All other source map related flags will be ignored."
134134
in
135135
Arg.(value & flag & info [ "no-sourcemap"; "no-source-map" ] ~doc)
136136
in
@@ -395,7 +395,7 @@ let options_runtime_only =
395395
in
396396
let no_sourcemap =
397397
let doc =
398-
"Don't generate source map. All other source map related flags will be be ignored."
398+
"Don't generate source map. All other source map related flags will be ignored."
399399
in
400400
Arg.(value & flag & info [ "no-sourcemap"; "no-source-map" ] ~doc)
401401
in

compiler/bin-js_of_ocaml/link.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ let options =
3939
in
4040
let no_sourcemap =
4141
let doc =
42-
"Don't generate source map. All other source map related flags will be be ignored."
42+
"Don't generate source map. All other source map related flags will be ignored."
4343
in
4444
Arg.(value & flag & info [ "no-sourcemap"; "no-source-map" ] ~doc)
4545
in

compiler/lib-runtime-files/dune

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
(target files.ml)
88
(deps
99
gen/gen.exe
10-
(glob_files ../../runtime/*.js))
10+
(glob_files ../../runtime/js/*.js))
1111
(action
1212
(with-stdout-to
1313
%{target}

compiler/lib/flow_lexer.ml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -832,9 +832,9 @@ let backquote env lexbuf =
832832

833833
let wrap f =
834834
let f env =
835-
let start, _ = Sedlexing.lexing_positions env.Lex_env.lex_lb in
835+
let start = Sedlexing.lexing_position_start env.Lex_env.lex_lb in
836836
let t = f env env.Lex_env.lex_lb in
837-
let _, stop = Sedlexing.lexing_positions env.Lex_env.lex_lb in
837+
let stop = Sedlexing.lexing_position_curr env.Lex_env.lex_lb in
838838
t, Loc.create ~last_line:(Loc.line_end' !(env.lex_last_loc)) start stop
839839
in
840840
let rec helper comments env =

compiler/lib/generate.ml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -898,7 +898,8 @@ let apply_fun_raw ctx f params exact trampolined loc =
898898
(* Make sure we are performing a regular call, not a (slower)
899899
method call *)
900900
match f with
901-
| J.EAccess _ | J.EDot _ -> J.call (J.ESeq (int 0, f)) params loc
901+
| J.EAccess _ | J.EDot _ ->
902+
J.call (J.dot f (Utf8_string.of_string_exn "call")) (s_var "null" :: params) loc
902903
| _ -> J.call f params loc
903904
in
904905
let apply =

0 commit comments

Comments
 (0)