Commit Graph

646 Commits (297c144bd5f5cb79391f31ec250b3169569b0f5f)

Author SHA1 Message Date
Pierre Chambart b0b0f6609c Enable flambda 2016-01-28 15:04:47 +01:00
Mark Shinwell 20d1951566 Merge pull request #417 from chambart/flambda_prereq-duparray_and_array_mutability
GPR#417: Add explicit duplication of literal arrays
2016-01-21 16:05:44 +00:00
alainfrisch 87de6a160d Useless bindings, unit patterns, whitespace. 2016-01-19 23:40:55 +01:00
Pierre Chambart fbd87e9081 Const_float_array are constant for branch merging 2016-01-15 16:07:59 +01:00
Mark Shinwell d489fd2038 comments 2016-01-15 14:54:33 +00:00
Mark Shinwell 0664a1cf03 Alter array patch after feedback from jdimino 2016-01-15 14:49:01 +00:00
Pierre Chambart 9668c45aab Avoid using Pmakearray instead of Const_float_array 2016-01-15 15:33:16 +01:00
Gabriel Scherer 9bc195f313 Merge pull request #426 from nojebar/compile-with-principal
Build compiler with with -principal
2016-01-14 13:53:49 -05:00
Mark Shinwell 5548d4e3ed Merge remote-tracking branch 'ocaml/trunk' into flambda_prereq-popaque 2016-01-14 16:47:31 +00:00
Nicolas Ojeda Bar c242a29b12 Compile with -principal 2016-01-14 15:29:41 +01:00
Mark Shinwell adfa454154 Minor change to split_default_wrapper (see comment in Closure_conversion) 2016-01-14 10:25:53 +00:00
Mark Shinwell 22c15cc2c1 Debuginfo.to_location and Location.print_compact 2016-01-13 16:20:23 +00:00
Mark Shinwell 6dd5c69302 Add comment to translmod.ml 2016-01-13 13:37:58 +01:00
Pierre Chambart 354bd48f20 Prim makearray 2016-01-12 19:51:06 +01:00
Pierre Chambart 9c60ae1692 Add the opaque primitive 2016-01-12 19:24:22 +01:00
Mark Shinwell 74b8b6ab5e Merge pull request #360 from mshinwell/flambda_prereq-init_assign
GPR#360: Propagate whether or not stores are initializing, etc.
2016-01-12 18:18:27 +01:00
Mark Shinwell 9d9e11b94c Merge pull request #412 from mshinwell/flambda_prereq-lambda_map
GPR#412: Add Lambda.map
2016-01-12 17:02:32 +01:00
Mark Shinwell 869b25cd3a Import Lambda.map 2016-01-12 16:29:29 +01:00
Mark Shinwell 029e1bbbbc Merge remote-tracking branch 'ocaml/trunk' into flambda_prereq-init_assign 2016-01-12 15:33:54 +01:00
Mark Shinwell cf06b87981 remake .depend 2016-01-12 15:18:58 +01:00
Mark Shinwell 2a3e730aa3 Merge pull request #390 from mshinwell/flambda_prereq-module_size
GPR#390: Compute module block size in transl_structure
2016-01-12 14:07:27 +01:00
Mark Shinwell 6a650a4a5a Printlambda.string_of_primitive -> Printlambda.name_of_primitive 2016-01-04 16:59:06 +00:00
Mark Shinwell 095ef83d3e Add Printlambda.string_of_primitive 2016-01-04 16:57:22 +00:00
Mark Shinwell 1959272069 Compute module block size in transl_structure 2016-01-04 12:56:18 +00:00
Mark Shinwell b53e5789bc Move split_default_wrapper to Simplif 2015-12-23 16:24:52 +00:00
Gabriel Scherer 571b72412b Merge pull request #359 from mshinwell/flambda_prereq-move-debuginfo
Move Debuginfo into bytecomp/
2015-12-20 12:45:08 +01:00
Pierre Chambart 58d6da114e Handle inline attribute on functors and mark functor functions 2015-12-18 19:53:24 +00:00
Mark Shinwell 933fdb2687 Improved annotations on Psetfield etc 2015-12-18 16:42:40 +00:00
Mark Shinwell 4f0badde0c move Debuginfo into bytecomp/ 2015-12-18 16:26:30 +00:00
Xavier Leroy 884c1c81bd Revert "PR#6537, PR#5333, PR#4080: fix stack overflow in the compiler when -pack'ing a module that includes a module of the same name."
This reverts commit 02b1696cc2.

Problems with -pack appear while compiling Camlp4.  Temporarily reverting this commit so that Camlp4 compiles again.  To be investigated further.

Attempting to see if this commit is the source of the problem.
2015-12-16 17:32:15 +01:00
Mark Shinwell f2ad502a37 Merge pull request #345 from trefis/stupéflip-vite
GPR#345: indentation in translmod
2015-12-15 10:45:15 +00:00
Gabriel Scherer d071da2880 Revert GPR#305 (exception patterns under or-patterns) from trunk
This week we merged several changes from Thomas Refis, to allow the
use of exception patterns under or-patterns, to write code such as

  match foo x with
    | None | exception Not_found -> ...
    | Some -> ...

Unfortunately, I failed to properly assess the impact of this change,
and in particular to make sure that Luc Maranget had properly reviewed
this code -- any change to the pattern-matching machinery should be
reviewed by Luc.

The problem that I had not foreseen and that he would have immediately
realized is that, while adapting the pattern-matching *compiler* is
relatively easy (Thomas inserted a transformation at the right place
to separate exception patterns from the others and handle them
separately, using the staticraise construct used by the
pattern-matching compiler to avoid duplicating the
right-hand-side branch), adapting the pattern-matching warnings
machinery is both more subtle and easier to overlook (it may fail
silently and nobody notices, unlike wrong code production). This part
of the compiler is subtle and best understood by Luc, but he does not
have the time to do a proper review of those changes in the timeframe
for the 4.03 feature freeze (mid-December).

I believe the right move in this case, implemented in the present
commit, is to revert the change from trunk (this is not a feature that
we must *imperatively* have in 4.03), do a proper job of understanding
the changes, and integrate the change when we are confident it is
ready. I hope to do this in 2016, together with Luc Maranget and
Thomas Refis -- hopefully this would allow Thomas and I to be more
confident when changing the pattern-matching machinery in the future.

Revert "Merge pull request #343 from trefis/pr7083"
This reverts commit 22681b8d2a, reversing
changes made to a24e4edf0a.

Revert "Merge pull request #341 from trefis/or-exception"
This reverts commit f8f68bd329, reversing
changes made to 1534fe8082.

Revert "Merge pull request #305 from trefis/or-exception"
This reverts commit cfeda89396, reversing
changes made to 77cf36cf82.
2015-12-12 11:20:21 +01:00
Thomas Refis cdf1741890 indentation in translmod 2015-12-11 16:24:56 +00:00
alainfrisch 02b1696cc2 PR#6537, PR#5333, PR#4080: fix stack overflow in the compiler when -pack'ing a module that includes a module of the same name. 2015-12-11 15:36:02 +01:00
alainfrisch a24e4edf0a #5995: better naming of exceptions when compiling with -for-pack. 2015-12-11 11:53:09 +01:00
Thomas Refis 4b28c6ca99 PR#6422: Allow exceptions under or-patterns in match statements. 2015-12-09 11:19:59 +00:00
alainfrisch 9d4b3a4513 Fix PR#7067: performance regression when compiling large nested structures in native code. 2015-12-07 15:07:50 +01:00
Simon Cruanes 6c5665393e fix 0007026
- remove write barrier for constant poly variants
- add tests
2015-12-06 19:24:31 +01:00
Gabriel Scherer c6b5a28d77 Merge pull request #320 from gasche/revert-user-defined-indexing-operators
Revert user defined indexing operators
2015-12-06 17:56:40 +01:00
maranget e8625747fa PR#6805 Duplicated expression in case of hole in a non-failing switch. 2015-12-03 17:52:50 +01:00
alainfrisch fa743fd605 PR6939: improve fix. 2015-12-03 16:30:07 +01:00
alainfrisch fab5144d99 PR#6939: Segfault with improper use of let-rec. 2015-12-03 14:57:39 +01:00
alainfrisch 9879d54989 #6865: restore previous behavior for 'let _ = expr' in the toplevel, i.e. it prints the result of 'expr'. 2015-12-03 09:26:36 +01:00
alainfrisch 01bf671f33 PR#6865: remove special case for "let _ = expr" structure items.
This form used to produce Pstr_eval instead of Pstr_let.  This would
probably come as a suprise for people matching on the Parsetree (e.g.
for a ppx).  This special case is now removed.

To avoid a (probably harmless) regression in bytecode, the compilation
of "let _ = ..." bindings (including local ones) is optimized to remove
a useless introduction of a variable (which would occupy a stack slot
otherwise).

The source code printer (-dsource) now prints Pstr_eval as ";;expr",
which should always be ok.  One could avoid ";;" at the beginning of
the structure, but since it is allowed, it is probably not worth adding
complexity here.
2015-12-02 23:39:19 +01:00
Jeremie Dimino 62fb2c58d6 Fix PR#6920
Make sure correct debugging informations are generated for %apply and
%revapply.
2015-11-30 10:27:29 +00:00
Gabriel Scherer 1552d30d16 Revert "Add a special syntax for index operators"
This reverts commit 16bc43219c.

(Conflict resolution: bytecomp/translcore.ml:prim_makearray was
dead code and has since been removed)
2015-11-29 21:01:30 +01:00
Jeremie Dimino ebd830b85b Add support for [%ocaml.extension_constructor <path>]
Translate [%ocaml.extension_constructor <path>] to the
runtime-representation of the extension constructor denoted by
<path>. This allows one to get the extension constructor without
having to create a dummy value.
2015-11-27 18:17:14 +00:00
Nicolas Ojeda Bar a524920aa2 Remove Typedtree.optional
From comments in typedtree.mli:

When introduced in 2000, this [type] enabled a more efficient code
generation for optional arguments. However, today the information is
redundant as labels are passed to [transl_apply] too. Could be cleaned
up.
2015-11-25 00:37:46 +01:00
alainfrisch fe68945a20 Only the return idents are useful in pat_bound_idents, simplify accordingly. 2015-11-24 15:43:26 +01:00
Nicolas Ojeda Bar aaed35bf87 Turn Lapply case of Lambda.lambda into a record 2015-11-22 23:08:47 +01:00