Skip to content

Commit 16edf2f

Browse files
committed
Squashed 'ocaml/' changes from e3076d2..df70400
df70400 flambda-backend: Fix interface differences in Printtyp (#1918) e7b5ebf flambda-backend: Fix breaking of tail recursion in classic mode (#1915) cbb72d8 flambda-backend: Improve debuginfo for for-loops (and conditionals) (#1870) 19133b6 flambda-backend: Replace thread save/restore API with switch (#1869) 882b067 flambda-backend: Add test showing how `max_arity` affects function splitting (#1904) f1f7da4 flambda-backend: Abbreviate module types when printing error messages (#1895) e4566dd flambda-backend: Add four missing attributes to the `builtin_attrs` table. (#1898) 4bb4c70 flambda-backend: Undo sort changes during snapshot backtrack (#1885) 87c857a flambda-backend: Add a missing check for jane syntax (#1891) 070d57f flambda-backend: Remove mode from Texp_send (#1893) 7d9ef46 flambda-backend: Remove Jkind.of_sort (#1890) 5ad9591 flambda-backend: ocamlformat in Jane-Street only files in typing (#1881) 5e50edf flambda-backend: Remove var_constraint (#1880) b1962fa flambda-backend: Rename "layout" to "jkind" (#1875) f74b090 flambda-backend: Rename layouts.ml to jkind.ml (#1886) cf32778 flambda-backend: Enable ocamlformat for Jane Syntax / language extensions code (#1876) 20b32a0 flambda-backend: Better error when using a float64 library without extension (#1859) 64e883d flambda-backend: Add hint for `#float` (#1864) ab42aac flambda-backend: Port upstream #12368 about abstract environments (#1759) bbc5173 flambda-backend: Support for unboxed products in the middle-end and backend (#1433) 6149a5f flambda-backend: Simplify integer comparisons that use "compare" (#1851) a05adce flambda-backend: Ask user to add `exclave_` instead of `local_` (#1853) cdd7f6a flambda-backend: Bump magic numbers for 4.14.1-19 96ec26a flambda-backend: Manually applied changes from PR #11782 (#1732) ea484d0 flambda-backend: Zero alloc annotation: assume a function never returns normally (#1831) 387893c flambda-backend: All-`float#` records (#1769) c3f9983 flambda-backend: Expose `Pprintast.tyvar` (#1848) 3782152 flambda-backend: Don't allocate a closure unnecessarily (#1836) a8f6aae flambda-backend: Fix bug in `Clambda_primitives.result_layout`. (#1833) 4b2a6f6 flambda-backend: Add dune target for `dumpobj` (#1773) 2089ec0 flambda-backend: tmc: Remove close-on-apply flag when producing a call in non-tail position (#1827) 9f304d8 flambda-backend: Adjust the location on `as` pattern vars for better errors/warnings (#1835) b9cf106 flambda-backend: Zero alloc: assume that works with inlining - propagate via Scoped_location (#1762) 263fa26 flambda-backend: Make -extension immutable_arrays on by default (#1829) 9cca7d2 flambda-backend: Support mode crossing at identifiers (#1811) 7942fed flambda-backend: Finish moving `any` to `layouts_beta` (#1821) 44cd2fc flambda-backend: Fix uncaught Unify exception in filter_arrow (#1820) 3552db6 flambda-backend: Factor out duplicated code in `cmm_helpers` (#1822) caf938f flambda-backend: Fix AFL test in flambda2 (#1824) ddd765a flambda-backend: Move `float64` to `layouts_beta` (#1812) 3b579d7 flambda-backend: Fixed ISO C99 warning introduced in #1705 (#1787) df927f0 flambda-backend: Add a test for an interaction between omitted mli and overeager heap allocation of argument (#1816) 92ddf14 flambda-backend: Fix incorrect sort assumption in lambda for `bop_exp`s in letops (#1793) 1a91f16 flambda-backend: Merging of Debuginfo.t across CSEd occurrences (#1767) f7cd48f flambda-backend: Backport #10364 (#1788) 5740ebd flambda-backend: Enable warnings-as-errors (#1796) 374a2fb flambda-backend: Build Jane Syntax with upstream OCaml in CI (#1780) 1d6471f flambda-backend: A more consistent first-to-last order for `-w53` (unused attributes) (#1658) 6210ee4 flambda-backend: Make sure the Jane syntax extensions don't depend on our compiler changes (#1777) 963bfbc flambda-backend: Add [Obj.uniquely_reachable_words] (#1705) 4cd24bd flambda-backend: mode crossing of LHS of arrow types by coercing (#1701) 910914d flambda-backend: `Pprintast` prints Jane syntax unconditionally (#1770) 46dad5b flambda-backend: Regulate access to [Language_extension] from within Jane Syntax (#1768) a0f8d0c flambda-backend: Lazy strengthening (#1337) 85b5c54 flambda-backend: Small improvement to layout inference for mutually recursive type decl parameters (#1766) 0c57382 flambda-backend: Syntactic function arity parsing (#1548) e8edd13 flambda-backend: Fix modes annotation ghost location (#1761) a669c00 flambda-backend: Refactor Debuginfo.t (#1724) 91ab70a flambda-backend: Basic uniqueness extension (#1552) 5be3cb8 flambda-backend: add the `%get_header` primitive (#1539) 0006b3e flambda-backend: Fix arrow printing when closing over unknown mode (#1744) 226d6ac flambda-backend: Add some checks that the minor GC does not recurse (#1743) f3e7c0a flambda-backend: Bump magic numbers for 4.14.1-18 30cbf0a flambda-backend: Add `Jane_syntax` `Pprintast` tests (#1727) 1269571 flambda-backend: Expose a couple more functions from `Pprintast` (#1731) 159adbe flambda-backend: Propagate the label names of optional parameters (#1723) 4f70f0b flambda-backend: Further refine our debugging infrastructure (#1650) a440f6d flambda-backend: Add mode to `int_as_pointer` (#1648) 0cc5356 flambda-backend: Update `jane-street-merlin-setup.sh` for this repo (#1663) 71879dc flambda-backend: Add code path to read .cmi without adding to environment (#1674) 5394352 flambda-backend: Only substitute once in `Env.read_sign_of_cmi` (#1670) 2a7f015 flambda-backend: Pass `-f` when `rm`ing file during install (#1700) ddaf752 flambda-backend: Set location on topmost Jane Syntax attribute (#1696) 5205836 flambda-backend: Support layout annotations (#1417) 455887f flambda-backend: Simplifications following PR #1667 (#1668) 6c0a9e8 flambda-backend: Don't add a module to the environment when saving it (#1667) 562eb7b flambda-backend: Flambda 2 changes for DWARF variables (#1678) f1352ed flambda-backend: Add modes on parameters and a framework for attributes on them (#1257) 3d23db5 flambda-backend: 128-bit vector primitive types (#1568) 06a3bdc flambda-backend: Bump magic numbers for 4.14.1-16 (#1657) 37c5ea0 flambda-backend: Remove/comment new uses of `not_expecting` in the parser (#1517) 8bbe82d flambda-backend: Float_u stdlib module (#1572) f4075a4 flambda-backend: Add a `float64` layout and `float#` type. (#1528) 43f02af flambda-backend: Test fix in #1457 (#1458) c896a97 flambda-backend: Swap simd flag to language extension (#1569) e6c44d4 flambda-backend: mkuplus and mkuminus must preserve attributes (#1575) 906cfc5 flambda-backend: Make environment lazy in preparation for simd extension (#1570) a222bfc flambda-backend: pattern match local iarray gives local elements(#1574) d3c1413 flambda-backend: 128-bit SIMD vector primitive type (#1499) bcc0a09 flambda-backend: exclave_ implies strictly local (#1554) e3deedb flambda-backend: Factor out kernel of `Language_extension` used by Jane Syntax (#1509) eea5150 flambda-backend: Fix incorrect sort in transl (#1547) d2b44d8 flambda-backend: A + sign usually means Positive (#1536) d1644f9 flambda-backend: Restore #1455: Communicate layouts to middle end (#1511) 5e6524d flambda-backend: Tail-calling local-returning functions should make the current function local-returning as well (#1498) fa71f6b flambda-backend: Increase local stack limit (#1513) c1eecf6 flambda-backend: Generalize `deep_occur` to `deep_occur_list` (#1503) 1a17a8b flambda-backend: Bump magic numbers for 4.14.1-15 a3d1953 flambda-backend: Fix Translcore to look for allocations in exclaves (#1495) 0ea8b04 flambda-backend: Revert "Communicate frontend layouts to lambda" (#1507) 383e158 flambda-backend: Disable `sockets.ml` on macOS (#1505) 3b73a8d flambda-backend: Communicate frontend layouts to lambda (#1455) f94a067 flambda-backend: Allow `make debug` with dune-based build (#1480) 1880d42 flambda-backend: Disable `beat.ml` on macOS (#1496) 4b2e620 flambda-backend: Check that layout variables aren't unconstrained when writing `cmi`s (#1474) 284889c flambda-backend: Add flambda2 -O3 and -Oclassic CI jobs, third attempt (#1493) ef161b9 flambda-backend: Prepare translation of primitives in lambda_to_flambda for unboxed products (#1465) bc1d15a flambda-backend: Remove ast_desc and ast_info from jane-syntax (#1488) be57ed6 flambda-backend: Local immutable arrays (#1420) 3a5d06a flambda-backend: Unboxed literal jane syntax (#1487) cc61a3a flambda-backend: Ensure that all [val]s are [value]s. (#1481) aba14c2 flambda-backend: Check for value in polymorphic variant argument (#1482) 0a20dfb flambda-backend: Jane-syntax support for extension constructors (#1479) 697519a flambda-backend: Remove `nonlocal_` modality (#1452) 0bf6a17 flambda-backend: Use exported modules in Jane_syntax_parsing (#1477) aa6d00f flambda-backend: Flambda1: Simplify `Region (Exclave e)` to `e` (#1473) e472be0 flambda-backend: Remove the `type float# = float` hack (#1478) ebe702d flambda-backend: Fix a typo in language extension parsing/serializing (#1456) 40f0e8c flambda-backend: Lex unboxed float and int literals as single lexemes (#1469) 22f170a flambda-backend: Unboxed float type parsing in `layouts_alpha` (#1467) 740de2a flambda-backend: Revert "Add flambda2 -Oclassic and -O3 CI jobs" (#1462) 6ec73ed flambda-backend: Zero alloc remove annotation from stdlib (#1434) f416497 flambda-backend: Don't pass (unnecessary?) -L flags to `gcc -shared` from opttoplevel (#1363) 416a714 flambda-backend: sync dynlink/dune compiler flags (#1461) d3e555f flambda-backend: Add flambda2 -Oclassic and -O3 CI jobs (#1459) e5eca61 flambda-backend: Add documentation for testing targets to HACKING docs (#1436) f1835c4 flambda-backend: New extensions API, supporting maturity levels (#1454) 1deb5af flambda-backend: Add Make/Dune target for debug printers (#1289) 324f32e flambda-backend: Bugfix for application mode crossing (#1451) 7ac42ab flambda-backend: Don't substitute into exclaves in `simplif.ml` (#1448) a03de20 flambda-backend: Parse unboxed literals, treating them as boxed (#1437) 5283047 flambda-backend: support native `exclave_` syntax (#1338) a1fe4cf flambda-backend: Default layout variables in gadt constructors (#1424) f4c96ff flambda-backend: Fix programmatically enabling and disabling the same layouts extension (#1446) cc58003 flambda-backend: Erasability namespace for Jane Syntax attributes/extensions (#1421) ae9099a flambda-backend: Use layout histories to produce better errors (#1340) 385ada9 flambda-backend: Fix swapgil test C warnings (#1430) ff9a0d1 flambda-backend: Bugfix for caml_switch_runtime_locking_scheme (#1429) df41dae flambda-backend: Remove layout variables from [val]s (#1423) 2e1a05a flambda-backend: Bugfix for GC backlog tracking (#1387) 8bc3fd7 flambda-backend: Allow more function argument / returns to be non-value (#1422) f2a5b93 flambda-backend: Convert Jane Syntax to use attributes for many syntactic categories (#1412) 1e2d5c5 flambda-backend: zero alloc: warning 198 about assume (#1409) 9270fee flambda-backend: Allow non-value function args and returns (#1405) 5319dfe flambda-backend: Bump magic numbers for 4.14.1-13 31fb926 flambda-backend: Fix issue with layout any and Tstr_eval in the native toplevel (#1402) dff4346 flambda-backend: Extend caml_locking_scheme with callbacks for thread start/stop (#1411) 674a335 flambda-backend: Introduce an API to swap the runtime lock for a different lock. (#1365) 1ce68db flambda-backend: Modular syntax for types (#1401) 9f55ade flambda-backend: Missing changes around the renaming to "Jane syntax" (#1400) cf8eaa8 flambda-backend: Move `include functor` over to the modular extensions machinery (#1377) da4e02d flambda-backend: Statically enabled probes (#1388) 093e638 flambda-backend: Bump magic numbers for 4.14.1-12 e7e0bf1 flambda-backend: Move layout from Type_abstract to type_declaration (#1384) 9c53ca7 flambda-backend: Rename `tests/jst-modular-extensions` to `tests/jane-modular-syntax` (#1397) 6881566 flambda-backend: Rename "modular extensions" to "Jane syntax"/"modular syntax" (#1395) bfec906 flambda-backend: Add autocompletion for test-one/promote-one (#1393) 9fc4aac flambda-backend: Fix a bug that -no-rebuild introduced in test-one (#1394) 301b683 flambda-backend: Add -no-rebuild options for test-one and promote-one (#1391) 1e090ac flambda-backend: zero alloc check: ignore functors and entry functions (#1370) 9d3b5a1 flambda-backend: Provide an AST-like view of modular extension extension node names (#1362) 7a92219 flambda-backend: Ltail for lambda and use in dissect_letrec (#1313) 7a7e639 flambda-backend: Add emacs hacking commands (#1372) 8dd6eae flambda-backend: Remove closure from Array.for_all (#1354) a4c4d03 flambda-backend: Fix ghost locations for modular extensions (#1348) ca5a008 flambda-backend: Bump magic numbers for 4.14.1-10 (#1360) a24d2ec flambda-backend: Inline a variable to save 2%+ in allocations (#1353) 96f8f00 flambda-backend: Probe name too long: warning instead of error (#1352) cd34685 flambda-backend: Typedtree module unpacks: Incorporate upstream feedback (#1288) c0482d3 flambda-backend: Add dedicated printline-debugging support (#1308) 7b295b0 flambda-backend: Fix try region closure for "match with exception" under Flambda 2 (#1339) db6552a flambda-backend: Revert ocaml/toplevel/ changes that are duplicative 132f8ba flambda-backend: Revert ocaml/driver/ changes that are duplicative 3d7f37f flambda-backend: Merge ocaml-jst 4646c2e flambda-backend: Merge ocaml-jst e62f2b1 flambda-backend: Bump magic numbers for 4.14.1-8 f617a06 flambda-backend: Revert ocaml/toplevel/ changes that are duplicative 79f91e9 flambda-backend: Revert ocaml/driver/ changes that are duplicative git-subtree-dir: ocaml git-subtree-split: df70400
1 parent c60b36a commit 16edf2f

File tree

461 files changed

+68935
-27214
lines changed

Some content is hidden

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

461 files changed

+68935
-27214
lines changed

.depend

+309-128
Large diffs are not rendered by default.

.depend.menhir

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ parsing/parser.cmo : \
33
parsing/parsetree.cmi \
44
parsing/longident.cmi \
55
parsing/location.cmi \
6-
parsing/extensions.cmi \
6+
parsing/jane_syntax.cmi \
77
parsing/docstrings.cmi \
88
utils/clflags.cmi \
99
parsing/builtin_attributes.cmi \
@@ -15,7 +15,7 @@ parsing/parser.cmx : \
1515
parsing/parsetree.cmi \
1616
parsing/longident.cmx \
1717
parsing/location.cmx \
18-
parsing/extensions.cmx \
18+
parsing/jane_syntax.cmx \
1919
parsing/docstrings.cmx \
2020
utils/clflags.cmx \
2121
parsing/builtin_attributes.cmx \
@@ -27,4 +27,4 @@ parsing/parser.cmi : \
2727
parsing/longident.cmi \
2828
parsing/location.cmi \
2929
parsing/docstrings.cmi
30-
parsing/parser.ml parsing/parser.mli: parsing/ast_helper.cmi parsing/asttypes.cmi parsing/builtin_attributes.cmi utils/clflags.cmi parsing/docstrings.cmi parsing/extensions.cmi parsing/location.cmi parsing/longident.cmi parsing/parsetree.cmi parsing/syntaxerr.cmi
30+
parsing/parser.ml parsing/parser.mli: parsing/ast_helper.cmi parsing/asttypes.cmi parsing/builtin_attributes.cmi utils/clflags.cmi parsing/docstrings.cmi parsing/jane_syntax.cmi parsing/location.cmi parsing/longident.cmi parsing/parsetree.cmi parsing/syntaxerr.cmi

.gitignore

-4
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,3 @@ _build
291291
/yacc/.gdb_history
292292

293293
/otherlibs/dynlink/natdynlinkops
294-
295-
# Jane Street Merlin support
296-
/.local-merlin-binaries
297-
/.local-ocaml-lib

HACKING.jst.adoc

+20-1
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,25 @@ where the test file or test dir are specified with respect to the
5454
$ make -f Makefile.jst test-one TEST=typing-local/local.ml
5555
$ make -f Makefile.jst test-one DIR=typing-local
5656

57+
Likewise, you can use `promote-one` to accept the diff from a failed
58+
test:
59+
60+
$ make -f Makefile.jst promote-one TEST=typing-local/local.ml
61+
$ make -f Makefile.jst promote-one DIR=typing-local
62+
63+
If you've run some series of tests and would like to accept the diff
64+
from all failed tests in that run, use `promote-failed`:
65+
66+
$ make -f Makefile.jst promote-failed
67+
68+
To run just one test without running a full dune build, you can use
69+
`*-no-rebuild` versions of `test-one` and `promote-one`. Note that these
70+
targets won't pick up changes you've made to compiler code, though they will
71+
faithfully pick up changes you've made to test files.
72+
73+
$ make -f Makefile.jst test-one-no-rebuild TEST=typing-local/local.ml
74+
$ make -f Makefile.jst promote-one-no-rebuild DIR=typing-local
75+
5776
## Debugging
5877

5978
We make several custom printers available so that we can print more values in
@@ -97,7 +116,7 @@ Remember to check that the newly installed switch is being used:
97116
4.14.1 ocaml-base-compiler.4.14.1 4.14.1
98117
-> 4.14.1-fp ocaml-option-fp.1,ocaml-variants.4.14.1+options 4.14.1-fp
99118

100-
Then build the compiler - the following command will build the compiler using the opam switch, then use the newly-built compiler to build itself.
119+
Then build the compiler — the following command will build the compiler using the opam switch, then use the newly-built compiler to build itself.
101120

102121
$ make -f Makefile.jst compiler
103122

Makefile.common-jst

+61-9
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,10 @@ define dune_boot_context
2020
(context (default
2121
(name default)
2222
; CR sdolan: profile dev might be faster, but the compiler currently fails to build in dev.
23-
(profile boot)))
23+
(profile boot)
24+
(env (_
25+
(flags (:standard -warn-error +A))
26+
(env-vars ("OCAMLPARAM" ""))))))
2427
endef
2528

2629
define dune_runtime_stdlib_context
@@ -31,8 +34,9 @@ define dune_runtime_stdlib_context
3134
(paths
3235
(PATH ("$(CURDIR)/_build/_bootinstall/bin" :standard))
3336
(OCAMLLIB ("$(CURDIR)/_build/_bootinstall/lib/ocaml")))
34-
(env (_ (env-vars
35-
("OCAMLPARAM" "$(BUILD_OCAMLPARAM)"))))))
37+
(env (_
38+
(flags (:standard -warn-error +A))
39+
(env-vars ("OCAMLPARAM" "$(BUILD_OCAMLPARAM)"))))))
3640
endef
3741

3842
define dune_main_context
@@ -43,8 +47,9 @@ define dune_main_context
4347
(paths
4448
(PATH ("$(CURDIR)/_build/_bootinstall/bin" :standard))
4549
(OCAMLLIB ("$(CURDIR)/_build/install/runtime_stdlib/lib/ocaml_runtime_stdlib")))
46-
(env (_ (env-vars
47-
("OCAMLPARAM" "$(BUILD_OCAMLPARAM)"))))))
50+
(env (_
51+
(flags (:standard -warn-error +A))
52+
(env-vars ("OCAMLPARAM" "$(BUILD_OCAMLPARAM)"))))))
4853
endef
4954

5055

@@ -102,7 +107,8 @@ dune_config_targets = \
102107
duneconf/main.ws \
103108
$(ocamldir)/duneconf/dirs-to-ignore.inc \
104109
$(ocamldir)/duneconf/jst-extra.inc \
105-
dune-project
110+
dune-project \
111+
$(ocamldir)/stdlib/ocaml_compiler_internal_params
106112

107113
_build/_bootinstall: Makefile.config $(dune_config_targets)
108114
echo -n '$(NATDYNLINKOPTS)' > $(ocamldir)/otherlibs/dynlink/natdynlinkops
@@ -172,6 +178,12 @@ _install: compiler
172178
install: _install
173179
mkdir -p '$(prefix)'
174180
rsync --chmod=u+rw,go+r -rl _install/ '$(prefix)'
181+
rm -f '$(prefix)/lib/ocaml/ocaml_compiler_internal_params'
182+
# rm `ocaml_compiler_internal_params`, which is used to compile the
183+
# stdlib `Float_u` module with `-extension layouts_alpha`, because we
184+
# don't want user programs that happened to be named
185+
# `ocaml/stdlib/float_u.ml` to get the flag automatically.
186+
175187

176188
# Same as above, but relies on a successfull earlier _install
177189
install_for_opam:
@@ -198,6 +210,9 @@ install_for_test: _install
198210
# replace backend-specific testsuite/tests/asmgen with their new versions
199211
rm _runtest/testsuite/tests/asmgen/*
200212
cp -a testsuite/tests/asmgen/* _runtest/testsuite/tests/asmgen/
213+
# replace backend-specific testsuite/tests/unboxed-primitive-args with their new versions
214+
rm _runtest/testsuite/tests/unboxed-primitive-args/*
215+
cp -a testsuite/tests/unboxed-primitive-args/* _runtest/testsuite/tests/unboxed-primitive-args/
201216

202217
cp $(ocamldir)/Makefile.* _runtest/
203218

@@ -211,7 +226,7 @@ install_for_test: _install
211226
done; \
212227
ln -s _install/lib/ocaml stdlib; \
213228
mkdir runtime; \
214-
for f in ocamlrun* stdlib/caml stdlib/stublibs/*; do \
229+
for f in ocamlrun* stdlib/caml stdlib/stublibs/* runtime/caml/threads.h; do \
215230
ln -s ../$$f runtime/`basename $$f`; \
216231
done; \
217232
ln -s . lex; ln -s . yacc; \
@@ -308,22 +323,59 @@ promote-failed:
308323
runtest-upstream: test
309324

310325
test-one: install_for_test
326+
$(MAKE) test-one-no-rebuild
327+
328+
# If the TEST argument is passed as `ocaml/testsuite/tests/foo` (as is invited by
329+
# tab completion) then look for it in `tests/foo`. Otherwise, if it's passed as
330+
# just `foo`, then look for it in `tests/foo` for backward compatibility.
331+
locate_test = \
332+
$(shell \
333+
test=$(shell echo "$1" | sed 's|^ocaml/testsuite/tests/||g'); \
334+
echo "tests/$${test}"; \
335+
)
336+
337+
test-one-no-rebuild:
311338
(export OCAMLSRCDIR=$$(pwd)/_runtest; \
312339
export CAML_LD_LIBRARY_PATH=$$(pwd)/_runtest/lib/ocaml/stublibs; \
313340
if $$(which gfortran > /dev/null 2>&1); then \
314341
export LIBRARY_PATH=$$(dirname $$(gfortran -print-file-name=libgfortran.a)); \
315342
fi; \
316-
cd _runtest/testsuite && make one $(if $(TEST),TEST="tests/$(TEST)") $(if $(DIR),DIR="tests/$(DIR)"))
343+
cd _runtest/testsuite && make one $(if $(TEST),TEST=$(call locate_test,$(TEST))) $(if $(DIR),DIR=$(call locate_test,$(DIR))))
317344

318345
promote-one: install_for_test
346+
$(MAKE) promote-one-no-rebuild
347+
348+
promote-one-no-rebuild:
319349
(export OCAMLSRCDIR=$$(pwd)/_runtest; \
320350
export CAML_LD_LIBRARY_PATH=$$(pwd)/_runtest/lib/ocaml/stublibs; \
321351
if $$(which gfortran > /dev/null 2>&1); then \
322352
export LIBRARY_PATH=$$(dirname $$(gfortran -print-file-name=libgfortran.a)); \
323353
fi; \
324-
cd _runtest/testsuite && make promote $(if $(TEST),TEST="tests/$(TEST)") $(if $(DIR),DIR="tests/$(DIR)"))
354+
cd _runtest/testsuite && make promote $(if $(TEST),TEST=$(call locate_test,$(TEST))) $(if $(DIR),DIR=$(call locate_test,$(DIR))))
325355

326356
# This target is like a polling version of upstream "make ocamlopt"
327357
.PHONY: hacking
328358
hacking: _build/_bootinstall
329359
$(dune) build $(ws_boot) -w $(boot_targets)
360+
361+
# The `hacking-emacs-poller` and `hacking-emacs-builder` targets make it
362+
# possible to run the polling build with Emacs's `M-x compile`. You should run
363+
# `make hacking-emacs-poller` in your terminal from the root directory of the
364+
# repo, and set Emacs's `compile-command` to `make hacking-emacs-builder` (from
365+
# the appropriate directory).
366+
367+
.PHONY: hacking-emacs-poller
368+
hacking-emacs-poller: _build/_bootinstall
369+
$(dune) build $(ws_boot) --passive-watch-mode
370+
371+
.PHONY: hacking-emacs-builder
372+
hacking-emacs-builder: _build/_bootinstall
373+
$(dune) rpc build $(ws_boot) -w $(boot_targets)
374+
$(dune) diagnostics
375+
376+
.PHONY: debug-printers
377+
debug-printers: runtime-stdlib # required for $(ws_main) to work
378+
$(dune) build $(ws_main) $(ocamldir)/tools/debug_printers
379+
@echo
380+
@echo To load into ocamldebug, use:
381+
@echo source \"$$(realpath _build/main/$(ocamldir)/tools/debug_printers)\"

asmcomp/amd64/emit.mlp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1210,7 +1210,7 @@ let probe_env p =
12101210
env.stack_offset <- p.probe_stack_offset;
12111211
(* Account for the return address that is now pushed on the stack. *)
12121212
env.stack_offset <- env.stack_offset + 8;
1213-
env
1213+
env
12141214

12151215
let emit_probe_handler_wrapper p =
12161216
let wrap_label = probe_handler_wrapper_name p.probe_label in

0 commit comments

Comments
 (0)