Commit Graph

579 Commits (ed057488f2a2307557aaf48d0bd835bd4fdc0587)

Author SHA1 Message Date
Gabriel Scherer 454538ae93 GPR#213: Simplif.emit_tail_infos: recurse on function body in an application
(Frédéric Bour)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16253 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-07-25 20:44:07 +00:00
Damien Doligez 860c670848 merge branch 4.02 from 4.02.1 (rev 15540) to a few fixes after 4.02.2 (rev 16205)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16214 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-07-17 14:31:05 +00:00
Jacques Garrigue 1585a95502 Fix PR#6874 by pushing module pattern bindings together with default arguments; also merge functions in Simplif.simplify_lets.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16135 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-05-21 00:22:46 +00:00
Alain Frisch 918f584b64 #6845: -no-check-prims to tell ocamlc not to check primitives in runtime.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16031 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-04-22 10:53:47 +00:00
Gabriel Scherer 90061455e6 GPR#111: `(f [@taillcall]) x y` warns if `f x y` is not a tail-call
(Simon Cruanes)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16010 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-04-12 18:26:38 +00:00
Gabriel Scherer e1647634b9 GPR#133: turn the Lfunction payload (in Lambda.lambda) into a record
(Pierre Chambart)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16001 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-04-12 09:31:22 +00:00
Fabrice Le Fessant ccfec3a1dc Add location info on Tcoerce_primitive
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15984 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-04-03 16:40:24 +00:00
Jérémie Dimino 9c0b6dfa98 Ignore rec_flag on "type" items in Translmod
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15922 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-03-13 11:08:48 +00:00
Gabriel Scherer 304c9c91a5 PR#6468: toplevel now supports backtraces if invoked with OCAMLRUNPARAM=b
(Peter Zotov and Jake Donham,
 review by Gabriel Scherer and Jacques-Henri Jourdan)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15830 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-02-08 14:10:12 +00:00
Gabriel Scherer 41e0ecf2ef PR#6642: replace $CAMLORIGIN in -ccopt with the path to cma or cmxa
(Peter Zotov)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15828 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-02-08 11:18:29 +00:00
Jacques Garrigue 64ee2135de Resolve PR#6742: remove duplicate virtual_flag information from Tstr_class
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15776 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-01-16 09:20:13 +00:00
Jacques Garrigue 158480371a exhauce PR#6367: introduce Asttypes.arg_label to encode labelled arguments
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15737 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-12-22 08:45:55 +00:00
Gabriel Scherer f256b3733d minor: cut too-long lines
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15735 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-12-21 12:18:10 +00:00
Gabriel Scherer 1d8e590c54 PR#6475: accept -o in ocamlc when compiling C files
(Vincent Laporte, Peter Zotov)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15734 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-12-21 12:18:07 +00:00
Gabriel Scherer f15f4f3ed8 PR6695: Make sure the compiler only uses ASCII string functions.
This should cover all places involving filenames in the compiler.
There are a few more paths still using Latin-1 in other ways,
e.g. in ocamldoc.

From: Peter Zotov <whitequark@whitequark.org>

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15727 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-12-21 11:46:14 +00:00
Gabriel Scherer fe758fb897 PR#6616: allow meaningful use of -use-runtime without -custom.
(Peter Zotov)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15720 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-12-21 10:45:11 +00:00
Gabriel Scherer 16bc43219c Add a special syntax for index operators
This commit introduces a new syntax for index operators.
Six core parenthesis operator are added:
.(), .[], .{}, .{,}, .{,,}, .{,..,}.
The .{,}/.{,,}/.{,,,} operators are defined for compatibility with the Bigarray syntax extension.
Each core index operator is available in a access/assignement versions. For instance, .() is declined in
* .() : index operator
* .()<- : indexed assignment operator
The general syntax for these index operators as implemented in the parser is index_operator::= index_operator_core [<-]

From: octachron <octa@polychoron.fr>

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15660 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-12-13 22:13:32 +00:00
Luc Maranget a142a01dae correct PR#6674
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15608 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-11-25 15:11:40 +00:00
Gabriel Scherer 9db301d185 specialize_comparison: also specialize bool and all-constant-constructors types
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15596 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-11-17 18:18:21 +00:00
Gabriel Scherer 2922831951 New primitive: caml_alloc_dummy_function ... caml_alloc_dummy_function takes the function arity as a second argument. This new information can be used by js_of_ocaml to perform better optimization.
From: Hugo Heuzard <hugo.heuzard@gmail.com>

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15592 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-11-17 12:21:49 +00:00
Gabriel Scherer 638a953bcf Sys: Use constant for some runtime limitations.
It allows to have non-standard limits for non-standard runtime.
ie: js_of_ocaml use 32bits integer, and can handle
string much bigger than 16Mo.

From: Hugo Heuzard <hugo.heuzard@gmail.com>

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15588 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-11-17 12:19:27 +00:00
Gabriel Scherer a9b0358f8c Translcore.transl_primitive: enable type-directed optimizations
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15583 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-11-17 12:04:32 +00:00
Gabriel Scherer 7bacc5beb4 Typedtree: add type information to primitive coercions
This will enable type-directed optimizations during translation of
module coercions.

WARNING: this breaks Typedtree representation, magic number will have to
be adjusted.

From: Frederic Bour <frederic.bour@lakaban.net>

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15582 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-11-17 11:55:24 +00:00
Gabriel Scherer 42b215c79e Printlambda: print array kind with array primitives
From: Frederic Bour <frederic.bour@lakaban.net>

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15581 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-11-17 11:53:53 +00:00
Luc Maranget 3bded3f977 Solve PR#6646, ie avoid introducing huge jump summaries
and unshared default clauses in the presence of many (>= 32) non-matched
constructors.




git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15570 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-11-07 14:13:53 +00:00
Damien Doligez 031cffd155 merge branch 4.02 from release 4.02.0 to release 4.02.1
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15558 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-15 13:34:58 +00:00
Alain Frisch e3ad818fb5 Reintegrate-merge constructors_with_record5 branch.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15556 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-14 15:51:30 +00:00
Alain Frisch 378a967cb7 Sync with trunk.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record3@15190 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-09-04 16:11:12 +00:00
Damien Doligez cbfe627f92 merge changes from branch 4.02 from branching (rev 14852) to 4.02.0+rc1 (rev 15121)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15125 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-08-22 13:45:02 +00:00
Alain Frisch 50f47df33a Sync with trunk. Rebinding of inlined extension constructors with free variables is not yet supported.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record3@15069 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-08-07 16:07:55 +00:00
Gabriel Scherer 43647ba502 first part of Benoît Vaugon's format-gadts patch
After applying this patch, you should run:

  make library-cross
  make promote-cross
  make partialclean
  make ocamlc ocamllex ocamltools

and then immediately apply the following patches until the "second
part of Benoît Vaugon's format+gadts patch"; the bootstrap cycle is
not finished yet.

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14806 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-12 15:37:29 +00:00
Luc Maranget f8a3649190 Correct PR#6412 by ruling out sharing of Levents
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14804 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-12 14:57:24 +00:00
Fabrice Le Fessant 457958a9e6 Add reset functions to make modules reentrant when used through compiler-libs
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14770 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-09 12:01:21 +00:00
Jacques Garrigue 1ce29d9bfc re-commit Leo's weak-dependencies pull request
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14755 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-07 00:34:20 +00:00
Alain Frisch fa3224ec87 Indent + comment.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14744 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-05 11:54:34 +00:00
Alain Frisch 0f1fb19cbe #6318: Extend match...with with exception cases. (Patch by Jeremy Yallop, backend part by A. Frisch).
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14743 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-05 11:49:37 +00:00
Jacques Garrigue b56dc4b3df PR#5584: merge open extensible types, extension-patch-4.0.2
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14737 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-04 23:08:45 +00:00
Alain Frisch 0f1bb864df Add support for floating attributes in class structures and class signatures. (Patch by Leo White.)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14736 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-04 20:42:34 +00:00
Jérémie Dimino f0b0c82b6f add the %int_as_pointer primitive
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14726 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-02 12:47:02 +00:00
Jacques Garrigue 95104b3924 revert commit 14719
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14723 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-02 06:19:55 +00:00
Mark Shinwell 521ac0213a weak dependencies with -trans-mod (github/ocamllabs/weak-depends 45e980a,21856a7,merge)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14719 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-01 12:50:20 +00:00
Damien Doligez 5b8df637d2 merge branch "safe-string"
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14705 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-29 11:56:17 +00:00
Alain Frisch eb617b5fe7 Synchronize with trunk.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record3@14657 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-22 14:33:41 +00:00
Alain Frisch 6fe5dd7cf4 Turn more sig/str items into records. Patch from Leo White.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14597 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-15 11:26:00 +00:00
Alain Frisch 6346154d4b Synchronize with trunk.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record3@14587 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-14 11:52:29 +00:00
Damien Doligez 7303ac34ca fix some of the whitespace problems in the source
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14582 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-12 10:17:02 +00:00
Fabrice Le Fessant 2859498cad Add %loc_* primitives and corresponding values in Pervasives
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14571 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-10 14:11:25 +00:00
Luc Maranget 937e37ef1f Suppressed some useless argument of switcher calls
(lifted as a functor argument)



git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14559 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-08 09:38:22 +00:00
Luc Maranget fcf3571123 Folllowup to PR#6359, great cleanup of switch actions sharing.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14558 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-07 15:43:20 +00:00
Alain Frisch 1d4e1364bd Keep inlined records in Typedtree and Types. Synthesize record types when inserting in the environment and module components, as for labels and constructors. Following features are not supported: inline record for exceptions, GADTs, polymorphic fields.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record3@14553 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-07 14:53:30 +00:00