summaryrefslogtreecommitdiff
path: root/middle_end
Commit message (Collapse)AuthorAgeFilesLines
* Add syntax for generative functor application (#11984)Richard Eisenberg2023-02-122-2/+2
| | | | | | | | | | | | | | Previously, writing [F ()] was the same as writing [F (struct end)], even though the latter looks like the use of an applicative functor, not a generative one. This commit, originally written by Frédéric Bour <fred@tarides.com>, adds new syntax to our AST to represent generative functor application and propagates this change throughout the compiler. In addition, it adds a new warning, 73, to report when a user has written [F (struct end)] but should now update to [F ()]. Co-authored-by: Frédéric Bour <fred@tarides.com>
* Multicore cleanup: remove traces of Obj.truncate (#11967)Nick Barnes2023-01-271-2/+1
|
* Add an early error when compiling different modules with mismatching ↵Pierre Chambart2022-09-132-1/+23
| | | | | | | -for-pack (#1391) If module A is built with -for-pack X and module B with -for-pack Y and A uses B, this will trigger when building A (with ocamlopt) rather than when linking, or when building some further module using both A and B.
* Use '.' instead of '__' to separate module from ident in symbolsXavier Leroy2022-07-151-13/+4
| | | | | | | | | | | | | | The '__' notation can be ambiguous (see linked issues below), while the '.' notation looks better. Dots in identifiers are supported by all known assemblers except MASM. (OCaml 5 does not currently use MASM.) For MASM, it is possible to use `$$` instead of `.`. This can be done later when MASM is used again. Fixes: #8998 Fixes: #11321
* Remove some trivial dead code in Closure_conversion_aux.Env (#11170)Fabian2022-04-072-9/+0
|
* Fixing typosJPR2022-03-211-1/+1
|
* Remove uses of ;; from the codebaseSébastien Hinderer2022-02-251-1/+1
|
* Make Lambda.lfunction privateStephen Dolan2022-02-121-14/+14
|
* Remove configuration options --disable-force-safe-string and ↵Kate2022-02-012-15/+5
| | | | | DEFAULT_STRING=unsafe (#10893) The compiler should behave as previous versions with `force-safe-string` enabled, and reject with an error any explicit setting that would try to deviate from that.
* Disable warning 59 when flambda invariant checks are disabledVincent Laviron2022-01-151-9/+11
|
* revert to effect name as no longer a keywordTom Kelly2022-01-053-7/+7
|
* Fix incorrect merge in closure.mlKC Sivaramakrishnan2022-01-041-1/+1
|
* Revert prim_size change in closure.mlKC Sivaramakrishnan2022-01-031-6/+1
| | | | | We had introduced the change for the concurrent minor GC which we no longer need.
* Merge commit 'edf0075888ec27a50c4f50f76dba46f730797651' into 5.00_rebase_to_prTom Kelly2021-12-2019-13/+45
|\
| * Add [@poll error] attribute (#10462)Sadiq Jaffer2021-11-0919-13/+45
| |
* | Merge commit '2bcef4bc172f476217f253d24cb3311eaca504bf' into 5.00_rebase_to_prTom Kelly2021-12-201-25/+49
|\ \ | |/
| * Ensure that functions are evaluated after their arguments (#10728)Stephen Dolan2021-10-271-25/+49
| |
* | Merge commit '2250fd8a2218796c07b0a25f184cdc682e4695ba' into 5.00_rebase_to_prTom Kelly2021-12-201-5/+11
|\ \ | |/
| * Enforce boolean Lifthenelse in native modeVincent Laviron2021-10-211-5/+11
| |
* | Whitespace and line lengthsDavid Allsopp2021-12-192-4/+8
| |
* | remove multicore nop debugging (reverts ocaml-multicore#384)Tom Kelly2021-10-086-15/+2
| |
* | Merge commit '0117428c3ea163f42f4549ff4e7f255f29f6b4d4' into 5.00Tom Kelly2021-10-041-2/+2
|\ \ | |/
| * Fix marking of if condition as inconstant in flambda Fix #10603 (#10611)Pierre Chambart2021-09-091-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The if condition was marked as systematically inconstant. This was not often problematic since most of the time this means that the if is eliminated by simplify. But this is not the case in let rec's where the approximation of the value is not known by simplify. But the problem is noticeable in this example type t = A | B of (int -> int) let p = 1 + 1 let rec b = B g and g n = let b' = b in match b' with | A -> n + p | B f -> f n The inconstant_ident pass correctly identifies b and g as constants, but marks b' as inconstant due to this bug (because match on this kind of type is compiled as an if). When lifting the definition of g into a let_rec_symbol, the alias_analysis does not keep the alias of b' to b because b' is considered as inconstant. Hence no substitution is applied to it. This leads to building a closed function with free variables, which is obviously wrong.
* | Merge commit 'eccaa452ca8c118abccb6180d53b91e4b4907415' into 5.00Tom Kelly2021-10-041-2/+6
|\ \ | |/
| * Change inlining cost of flambda switches. (#10458)Pierre Chambart2021-08-251-2/+6
| |
* | Merge commit 'e5e9c5fed56efdd67601e4dbbaebeb134aee361c' into 5.00Tom Kelly2021-10-011-1/+1
|\ \ | |/
| * TyposJPR2021-06-061-1/+1
| |
* | Merge commit '1037341d8cbd533209c2898e0743757189ce8f1e' into ↵Tom Kelly2021-10-014-43/+2
|\ \ | |/ | | | | parallel_minor_gc_4_13
| * Remove primitives Pdirapply and PrevapplyVincent Laviron2021-05-254-36/+0
| |
| * Remove the Pidentity primitiveVincent Laviron2021-05-254-7/+2
| |
* | Merge commit '5e45b2e9fa613099a334f19c95814f89ca16db7f' into ↵Tom Kelly2021-10-013-6/+6
|\ \ | |/ | | | | parallel_minor_gc_4_13
| * Add {Int,Int32,Int64,NativeInt}.{min,max} (#10392)Alain Frisch2021-05-113-6/+6
| |
* | Merge commit '3ef9ce800fea63c90294fe306e552b4b5fafaa1a' into ↵Tom Kelly2021-09-308-15/+5
|\ \ | |/ | | | | parallel_minor_gc_4_13
| * Remove unused labelsLeo White2021-03-228-15/+5
| |
* | Merge commit 'd0f80077066105e1429ef8728b8362b8d698e298' into ↵Tom Kelly2021-09-292-25/+32
|\ \ | |/ | | | | parallel_minor_gc_4_13
| * Simplified some computations for mutable variable casesKeryan Didier2021-01-072-10/+16
| |
| * added new construct Lmutlet and removed Variable attributeKeryan Didier2021-01-072-17/+18
| |
| * added new lambda construct Lmutvar (#9954)Keryan Didier2021-01-072-2/+2
| |
* | Merge commit '082bdf545d178ac87e48f26db5b9bf34df05b675' into ↵Tom Kelly2021-09-281-13/+1
|\ \ | |/ | | | | parallel_minor_gc_4_13
| * Flambda: Remove redundant recursive import for packs (#10022)Vincent Laviron2020-11-261-13/+1
| |
* | add polling at mach layerSadiq Jaffer2021-09-066-11/+0
| |
* | Add primitive for fetching dls stateKC Sivaramakrishnan2021-06-106-3/+17
| |
* | Merge commit 'e41dc9c44327f40c1ab0feea12f779c931c9e31e' into ↵Tom Kelly2021-03-041-2/+2
|\ \ | |/ | | | | parallel_minor_gc_4_12
| * Rename Assignment_to_non_mutable_value => ↵Nicolás Ojeda Bär2020-07-201-2/+2
| | | | | | | | Flambda_assignment_to_non_mutable_value
* | Merge commit '368eb16ee80843afc6c40cf98e6994256747844a' into ↵Tom Kelly2021-03-041-74/+108
|\ \ | |/ | | | | parallel_minor_gc_4_12
| * Treat loops properly in un_anf (#9163)Leo White2020-06-261-74/+108
| |
* | Merge commit 'b7509ca82f9bd647c1cb7e810b6bb152e145e3fb' into ↵Tom Kelly2021-03-032-16/+21
|\ \ | |/ | | | | parallel_minor_gc_4_12
| * [refactoring] gives tailcall attributes a more standard structureGabriel Scherer2020-06-082-16/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | We want to start allowing more information in the payload of [@tailcall] attributes (currently no payload is supported), for example we could consider using [@tailcall false] to ask the code generator to disable a tail call. A first required step in this direction is to use a custom datatype to represent the tail-call attribute, instead of a boolean. This is consistent with the other application-site attributes (inline_attribute, specialise_attribute, local_attribute), so it makes the code more regular -- but the change itself is boilerplate-y.
* | Merge commit '0ca651b95cbda5d58f7760f0fa1dba965d1f0828' into ↵Tom Kelly2021-03-0220-135/+52
|\ \ | |/ | | | | parallel_minor_gc_4_12
| * Remove Const_pointer from Lambda and Clambda (#9585)Stephen Dolan2020-06-0220-135/+52
| | | | | | | | | | | | | | | | | | | | | | Lambda and Clambda distinguish Const_int from Const_pointer only so that they can pass the information to Cmm. But now that that Const_pointer is gone from Cmm (#9578), there's no need for the distinction in Lambda either. This PR requires a bootstrap, because the .cmo format changes: Lambda.structured_constant has one fewer constructor. The bootstrap is in the following commit.