Commit Graph

646 Commits (297c144bd5f5cb79391f31ec250b3169569b0f5f)

Author SHA1 Message Date
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
Gabriel Scherer 2b9f94b69b PR#6270: remove need for -I directives to ocamldebug in common case
(patch by Josh Watzman)

Add absolute directory names to bytecode format for ocamldebug to use

The need for a long list of -I directives makes interactively using
ocamldebug a pain in the butt. Many folks have solved this with various
`find` invocations or even Python wrappers, but those lead to other
problems when it might include files you weren't expecting (or miss
things you were). But all of this is really annoying since the tooling
should be able to figure out itself, even heuristically, where your
source files are -- gdb gets this right, why can't we?

This patch implements one of the more important heuristics from gdb: you
typically debug on the same machine you built on, so looking for the
source files and built artifacts in the absolute paths where they were
during compilation is a good first try. We write out absolute paths into
a new structure at the beginning of the debug section and then
automatically append those directories into the load path.

This means mean that if you happen to be debugging on a machine
where the original source and build artifacts are *not* available in
their original absolute locations, things will work as before, using the
standard load path mechanism. You can also explicitly use -I to prepend
directories to the load path and override the defaults located by this
new mechanism.

I personally find this makes using ocamldebug much more pleasant :)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14533 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-06 15:06:22 +00:00
Alain Frisch fa13304327 Distinguish explicitly representation of regular records and inlined records with tag = 0.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record2@14531 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-04 12:37:49 +00:00
Luc Maranget dd55c293ac Fix PR#6359
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14520 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-02 13:22:21 +00:00
Alain Frisch d75e2c8b01 Support for record arguments on exceptions.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record2@14515 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-01 11:46:00 +00:00
Alain Frisch ce4c5fad1d Rvert parts of the original commit which are not relevant with the encoding approach.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record2@14513 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-03-31 16:17:37 +00:00
Gabriel Scherer 57fe3746f6 Revert "PR#6270: remove need for -I directives to ocamldebug in common case (patch by Josh Watzman)"
There seems to be a problematic interaction with backtrace collection. To test this,
  make world.opt
  cd testsuite
  make one DIR=tests/backtrace/

This needs to be sorted out before the patch can go in again.

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14510 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-03-31 14:55:06 +00:00
Alain Frisch 4607a0f8e1 Encode record arguments into extra record declarations.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record2@14508 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-03-31 12:20:22 +00:00
Xavier Clerc dd7bd5b339 PR#6270: remove need for -I directives to ocamldebug in common case (patch by Josh Watzman)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14507 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-03-31 11:48:35 +00:00
Alain Frisch 132ff51559 Some preparation for record arguments.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record2@14505 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-03-28 17:08:53 +00:00
Luc Maranget c2a88c27fd #PR6269 Optimized string matching
Noticed that I had to bootstrap to test on ARM, so I commit  a new bootstrap
compiler.



git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14479 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-03-21 17:02:44 +00:00
Alain Frisch bd7fa181cb Fix two makeblocks incorrectly marked as Immutable. The lazy-related one is concretely problematic in presence of stronger constant propagation.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14454 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-03-10 17:25:19 +00:00
Jacques Garrigue 65b1193406 Fix PR#6307
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14451 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-03-10 02:54:02 +00:00
Jacques Garrigue c56d21dc76 Quick fix of PR#6325
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14434 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-02-17 14:03:54 +00:00
Alain Frisch 7570931930 Fix bug (structure-level attributes and ocamlopt).
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14433 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-02-07 14:09:48 +00:00
Luc Maranget 89a627f55b PR#6322 Corrected.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14432 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-02-06 13:30:54 +00:00
Jacques Garrigue 3b4d7cf63b Merge module-alias branch (cf. PR#6063)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14394 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-01-10 07:53:33 +00:00
Jacques Garrigue d90b126bd4 Add -trans-mod option for transparent module dependencies.
Without that option, dependencies are strict, both for
typing and linking.


git-svn-id: http://caml.inria.fr/svn/ocaml/branches/module-alias@14382 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-12-20 06:55:26 +00:00
Alain Frisch 632d7e20a3 Cleanup.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/raise_variants@14287 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-11-13 13:12:57 +00:00
Alain Frisch 0f6f367ad4 Change the representation of exception slots: instead of being represented as 'string ref', they are now blocks
of size 2, with tag = Object_tag, the first field being the pointer to the string, and second one being a unique id, generated
from the same sequence as for object values.  Special case for predefined exceptions, represented with a negative id.

The unique id generator is moved from camlinternalOO to the C runtime system.

Also fix some bugs.



git-svn-id: http://caml.inria.fr/svn/ocaml/branches/raise_variants@14239 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-10-23 14:28:31 +00:00
Alain Frisch d802a51be6 #6203: change representation of exception values created with a constant constructor: the value is now equal to the exception slot. This avoids some allocation when the constructor is called and an extra indirection on matching against the constructor.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/raise_variants@14235 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-10-18 13:00:58 +00:00
Alain Frisch ae9a78b10d Cleanup.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/raise_variants@14227 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-10-14 14:38:18 +00:00
Alain Frisch 164c307ae3 Support for raise variants in ocamlopt. Only amd64 for now.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/raise_variants@14226 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-10-14 14:33:27 +00:00
Alain Frisch 0915cb5b5f Rename raise_nostack -> raise_notrace. Expose it in Pervasives.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/raise_variants@14225 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-10-14 13:52:14 +00:00
Alain Frisch c4513e1011 Recognize reraises in handlers.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/raise_variants@14224 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-10-14 13:21:53 +00:00
Alain Frisch f31325cbaf #6203, #5935: variants of raise. 'reraise' is currently only inserted by the compiler when an handler does not catch the exception. The default 'raise' always start with a fresh backtrace. There is also 'raise_nostack' which does not trigger the stack trace recording. Bytecode only for now.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/raise_variants@14223 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-10-14 12:31:50 +00:00
Jacques Garrigue f27f4766b4 fix multiple binding of same identifier in apply_coercion, broke core_extended
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/module-alias@14215 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-10-05 08:49:49 +00:00
Jacques Garrigue 7a904bb8db make path normalization safer; now Core not only compiles but works
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/module-alias@14212 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-10-04 02:06:40 +00:00
Jacques Garrigue 06d511c857 more exception paths requiring normalization
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/module-alias@14211 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-10-03 12:51:30 +00:00
Jacques Garrigue 251289a3a1 fix exn_rebind: camlp4 compiles again
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/module-alias@14207 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-10-02 08:34:01 +00:00
Jacques Garrigue eda1266114 passes the testsuite!
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/module-alias@14202 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-09-30 15:54:02 +00:00
Jacques Garrigue 5f68db9cf0 Merge trunk at revision 14200. Now everything works except private types
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/module-alias@14201 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-09-30 13:54:59 +00:00
Jacques Garrigue 4c5e9bbe6b mostly works, but:
* a strange bug in open
* spurious bindings in the lambda code


git-svn-id: http://caml.inria.fr/svn/ocaml/branches/module-alias@14200 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-09-30 11:35:15 +00:00
Jacques Garrigue 9ddb346f54 do not alias functor parameters + some problems with coercions not fixed yet
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/module-alias@14198 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-09-30 02:10:21 +00:00
Jacques Garrigue e0cdc52ba0 module translation + bad functor example
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/module-alias@14197 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-09-29 11:49:07 +00:00
Jacques Garrigue 97899f37ca Support module aliases.
Namely, you can write "module L = List" in signatures,
and avoid have the compiler use directly List when you write L.
See examples in testsuite/tests/typing-modules/aliases.ml


git-svn-id: http://caml.inria.fr/svn/ocaml/branches/module-alias@14196 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-09-29 07:22:34 +00:00
Alain Frisch cc31694f7c Keep attributes on module declarations.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14195 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-09-27 17:05:39 +00:00
Alain Frisch 645dcf25e5 Keep location and attributes in type, label and constructor declarations. Deprecated warning when a deprecated type or constructor is referenced.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14191 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-09-27 10:54:55 +00:00
Alain Frisch 6873f39817 Keep attributes on value declarations in .cmi files (but clear all the location fields, except if -keep-locs is used, of course). Use this to report a warning when a value marked as [@@deprecated] is referenced (#5854)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14188 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-09-26 15:24:11 +00:00
Alain Frisch c8d20ade02 Do not track unused type declarations created by 'include'.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14158 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-09-17 14:28:31 +00:00
Alain Frisch 8660e346df Continue.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/exception_registration@14119 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-09-12 14:34:13 +00:00
Alain Frisch bc9e5b0a51 Switch {Translmod,Translcore,Translclass}.Error.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/exception_registration@14118 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-09-12 14:24:27 +00:00
Damien Doligez 7844495624 Merge branch 4.01 from branching point to 4.01.0+rc1
Command line used:
  svn merge --accept postpone -r 13776:14055 $REPO/version/4.01 .


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14060 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-09-04 15:12:37 +00:00
Alain Frisch b0d5fc28a2 Synchronize with trunk.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/extension_points@13922 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-07-22 17:03:39 +00:00
Alain Frisch d3be8230a7 #6073: Add signature to Tstr_include. (Cherry-picked from commit 13903 on 4.01.)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13904 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-07-17 15:25:47 +00:00
Alain Frisch 525ef9d703 Synchronize with trunk.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/extension_points@13897 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-07-16 13:34:30 +00:00
Luc Maranget 32bcc186ea Patch for PR#5788
(Exception binding fools pattern matching optimisations)

Hopefully it's complete...





git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13871 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-07-02 16:05:48 +00:00
Wojciech Meyer 21b780c0a5 configure: store $target and $host in the build configuration (fix-pt2). (Patch by Adrien Nader!)
Fixing builds continued.

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13866 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-07-01 21:33:21 +00:00
Wojciech Meyer 086c04495e Revert "configure: store $target and $host in the build configuration." as it breaks several builds.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13858 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-06-30 22:01:53 +00:00
Wojciech Meyer e5eeea88af configure: store $target and $host in the build configuration.
(Patch by Adrien Nader!)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13857 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-06-30 12:58:35 +00:00
Xavier Leroy 8cd3272c6d PR#6033 continued: ocamlopt-specific path (inline_lazy_force_switch) was lying about the max value for the argument to the switch.
The whole "let's choose between two implementations of inline_lazy_force" smells.  It should be possible to have one implementation that works well in bytecode and in native.  TBD.



git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13761 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-06-10 11:31:42 +00:00
Xavier Leroy 5b0986b4c5 PR#6033: Matching.inline_lazy_force needs eta-expansion (command-line flags)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13758 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-06-07 17:16:11 +00:00
Fabrice Le Fessant ad6c285818 Improved implementation of OCAMLPARAM
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13747 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-06-05 16:34:40 +00:00
Alain Frisch 2e199ef1f2 Item attributes on each let-binding.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/extension_points@13736 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-06-03 15:14:19 +00:00
Damien Doligez e69730e0d6 extend warning 3 to other deprecated features: Latin1, (&) and (or)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13706 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-05-28 11:05:58 +00:00
Alain Frisch a3b1c67fff #5980: explicit way to silence the new warning (open! X).
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13685 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-05-16 13:34:53 +00:00
Alain Frisch 2bbf91ca42 #5832: patch to improve 'wrong file naming' error messages.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13618 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-04-29 14:57:38 +00:00
Luc Maranget ebfc4e6cff Fix PR #5992
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13611 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-04-25 13:32:17 +00:00
Alain Frisch eb4130e47c The arument of attributes and extension nodes is now a structure, which is syntactically more general than an expression (through the embedding E -> [Pexp_eval E]).
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/extension_points@13579 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-04-19 07:40:57 +00:00
Xavier Leroy e29c9d2956 PR#5986: added flag Marshal.Compat_32 and ocamlc option -compat-32.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13554 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-04-18 11:58:59 +00:00
Alain Frisch b36ec9f764 Get rid of the 'explicit arity' flag on Pexp_construct/Ppat_construct. If really requires (for camlp5?), the feature should be reimplemented with attributes.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/extension_points@13549 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-04-17 09:46:52 +00:00
Alain Frisch 501dfd2b5e Getting rid of Pexp_assertfalse/Texp_assertfalse.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/extension_points@13548 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-04-17 09:18:03 +00:00
Gabriel Scherer e92b63fc21 PR#5957,PR#5920,PR#5925: LongString module to workaround 32bits string size limitations during bytecode linking (patch by Benoit Vaugon and Chet Murthy)
In PR#5925, Benoît Vaugon initially proposed the LongString module to
solve an issue with bytecode blocks of size > Sys.max_string_length on
32 bits architecture (16Mio). In PR#5957, Chet Murthy made small
changes to also fix the problem of debug information going above this
16Mio limit.

The LongString module should be reusable in other parts of the
compiler, should new 32bit-string-length issues arise.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13547 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-04-17 09:07:00 +00:00
Alain Frisch ecb088015f Rename Pcty_fun to Pcty_arrow (and idem in Types, Typedtree, Outcometree) to be coherent with Ptyp_arrow.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/extension_points@13536 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-04-16 08:59:09 +00:00
Alain Frisch e7736899fb Explicit representation of guards, get rid of Pexp_when.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/extension_points@13528 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-04-15 16:23:22 +00:00
Alain Frisch 04de43bee5 Attributes on Pstr_eval.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/extension_points@13512 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-04-11 14:07:32 +00:00
Alain Frisch 92ad47d47b Keep item attributes on let-binding structure items.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/extension_points@13511 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-04-11 13:52:06 +00:00
Alain Frisch ee5f754a42 Attributes and extension points in class_expr.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/extension_points@13500 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-04-10 17:26:55 +00:00
Alain Frisch e2036c5a22 Start to bring constructor names closer to concrete syntax.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/extension_points@13497 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-04-10 11:17:41 +00:00
Alain Frisch 47a3ee095e Get rid of the Default case in Asttype.rec_flag.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/extension_points@13481 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-04-04 12:38:20 +00:00
Alain Frisch 6bfcb1da5b Support for quoted strings.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/extension_points@13450 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-03-26 11:17:17 +00:00
Alain Frisch c2c5b10685 Align module type binding with Parsetree.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/extension_points@13448 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-03-26 08:21:29 +00:00
Alain Frisch 2ffa26af82 Align module binding with Parsetree.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/extension_points@13447 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-03-26 08:09:26 +00:00
Alain Frisch 77d3fce857 Align exception_declaration with Parsetree.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/extension_points@13446 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-03-25 18:42:45 +00:00
Alain Frisch 25815e6e77 Align typed value_declaration with parsetree.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/extension_points@13444 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-03-25 18:04:40 +00:00
Alain Frisch 5c98dd91fe Starting to keep attributes in the typedtree.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/extension_points@13440 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-03-25 14:16:07 +00:00
Damien Doligez 03d5a3378a typos in comment
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13399 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-03-17 15:46:15 +00:00
Damien Doligez c63f9e0957 fix a few problems with whitespace and over-long lines
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13393 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-03-09 22:38:52 +00:00
Alain Frisch 516c752e0d #5546: change compilation scheme for nested structures (improve compilation time and sometimes runtime performance as well). Patch by F. Le Fessant.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13130 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-12-13 15:40:25 +00:00
Fabrice Le Fessant 89bdc10350 PR#5774: Add bswap primitives for amd64
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13106 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-11-29 09:55:00 +00:00
Fabrice Le Fessant ec7ac9cb3d PR#5771: Add primitives for reading 2, 4, 8 bytes in strings and bigarrays
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13087 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-11-09 16:15:29 +00:00
Fabrice Le Fessant 95c20bc6ae PR#5762: Add primitives for fast access to bigarray dimensions
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13069 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-11-06 17:03:34 +00:00
Alain Frisch 0b37b27356 Stop keeping a Path.t to refer to labels and constructors in the Typedtree AST. This is not used internally and it is not a robust way to identify these objects unambiguously anyway
(especially when we will add more powerful disambiguation strategies).  The correct way to identify an item is through the pair (type,name), which can be deduced from the
label_description/constructor_description stored in the Typedtree.



git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13043 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-10-24 12:03:00 +00:00
Damien Doligez def31744f9 remove all $Id keywords
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13013 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-10-15 17:50:56 +00:00
Luc Maranget 4e6e061882 Checked #PR5758, (also closed bug in Mantis)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12958 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-09-27 12:32:54 +00:00
Jacques Garrigue e086aa9a8d Fix PR#5758
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12937 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-09-19 06:57:17 +00:00
Wojciech Meyer 4f968563b6 PR#5611: avoid clashes betwen .cmo files and output files during linking
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12901 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-09-01 13:10:10 +00:00
Fabrice Le Fessant 3fa58bda89 Fix PR#5735: %apply and %revapply not first class citizens
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12870 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-08-21 07:12:04 +00:00
Damien Doligez 997a678d5e clean up TABs and whitespace
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12799 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-07-30 18:04:46 +00:00
Fabrice Le Fessant 9f2955dbea Fix PR#5702: remove never used value Bytelibrarian.lib_sharedobjs
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12786 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-07-27 09:23:46 +00:00
Jacques Garrigue 43c7d1b51c fix PR#5674: move Texp_poly and Texp_newtype to exp_extra
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12680 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-07-10 08:25:58 +00:00
Jacques Garrigue c96855b066 fix wrong parameter name in binary annotation
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12662 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-07-08 07:25:11 +00:00
Gabriel Scherer b667a00686 PR#5628: Add Topdirs.remove_directory (and directive #remove_directory) to remove a directory from the load path
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12660 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-07-07 11:40:33 +00:00
Damien Doligez fe9c99d855 PR#5131: compilation of custom runtime with g++ generates lots of warnings
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12633 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-06-21 16:22:38 +00:00
Jacques Garrigue 1d9ece5fc0 Fix PR#5627 (lablgtk not compiling with 4.00 after merge with bin-annot)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12619 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-06-20 12:00:13 +00:00
Jacques Garrigue abeb581713 revert wrong commit on bytecomp/typeclass.ml
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12614 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-06-19 10:08:33 +00:00
Jacques Garrigue 420a2f00d7 applied (improved) patch of PR#5654
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12613 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-06-19 10:02:34 +00:00
Alain Frisch 5b19f3e5be Unused opens.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12546 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-06-01 14:42:56 +00:00
Jacques Garrigue a430934c06 Fix PR#5291
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12531 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-06-01 04:47:14 +00:00
Fabrice Le Fessant d39d43e55f merge with branch bin-annot
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12516 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-05-30 14:52:37 +00:00
Xavier Clerc acc19ff167 Removal of unnecessary "rec" clauses (to please warning #39).
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12508 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-05-29 13:41:14 +00:00
Alain Frisch a0a14c08fa Enable and fix more warnings.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12498 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-05-29 11:47:28 +00:00
Alain Frisch 05c973e6ed Compile with warning 33, and remove unused opens.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12497 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-05-29 11:10:03 +00:00
Alain Frisch 309e1b601c #5593: Remove C file when -output-obj fails.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12356 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-04-16 15:26:25 +00:00
Alain Frisch 1fb4007ece #5527: absolute filenames for more error messages.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12202 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-03-07 17:50:17 +00:00
Alain Frisch b05e790798 #5527: absolute filenames for more error messages.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12199 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-03-07 17:32:37 +00:00
Alain Frisch 1be1d4e834 #5527: use absolute filenames in the message for Warning 31, when requested (-absname).
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12198 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-03-07 17:27:59 +00:00
Alain Frisch ab918e2078 Detect unused exception declarations (#5524).
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12195 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-03-06 19:47:07 +00:00
Damien Doligez 5b14388ad0 refactoring the "read n bytes from a channel into a new string" idiom
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12184 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-02-23 19:54:44 +00:00
Xavier Leroy 2eecf2d4c0 PR#5487: addition of CFI directives and a few filename/linenumber info to generated amd64 and i386 assembly files.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12179 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-02-21 17:41:02 +00:00
Xavier Leroy 6d57d49f5e Optimize away compile-time beta-redexes, as found sometimes in generated code, by Coq's extraction in particular
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12174 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-02-20 17:45:10 +00:00
Xavier Leroy e545071c8a Reverting commits 12108 and 12109 concerning PR#4072. I feel the cure (making ocamlc's evaluation order inconsistent with the ZAM push-enter model) is worse than the illness.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12167 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-02-18 17:21:42 +00:00
Fabrice Le Fessant e73cade9b2 Fix PR#5297: compiler does not check %primitive's existence
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12165 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-02-18 09:45:30 +00:00
Jacques Garrigue 0f85a64020 Unshare on type annotations even in non -principal mode.
Slightly slower (1% for lablgtk.cma) but better compatibility
with -principal and gadts.

By the way full -principal is a 25% slowdown for lablgtk.cma.

As a side effect of unsharing in patterns, (x : t) is now
internally converted to (_ as x : t).
This should have no impact on pattern matching compilation,
but watch out for other problems.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12153 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-02-14 10:00:18 +00:00
Damien Doligez e7f5b858c2 More renaming to OCaml
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12149 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-02-10 16:15:24 +00:00
Fabrice Le Fessant 84a0c4190d Fix PR#4072
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12108 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-02-01 09:30:23 +00:00
Fabrice Le Fessant 2bfba69b77 Backported '%apply' and '%revapply' from 3.12.1+dev to 3.13+dev
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12070 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-01-23 14:49:39 +00:00
Alain Frisch 4cfd2fc2a6 Reverting bad commit.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12058 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-01-20 14:23:34 +00:00
Alain Frisch 7fe8c8ce6f Fix #5490.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12057 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-01-20 14:21:03 +00:00
Fabrice Le Fessant 869feeb007 Fix PR#5461
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12033 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-01-17 21:57:54 +00:00
Alain Frisch 33eefe4874 Remove unused constructors in the AST: Cf_let, Pcf_let.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11968 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-28 13:27:07 +00:00
Wojciech Meyer 4f0bc4465f Fix PR#5313: Run the rest of the ocamlopt optimisations even when -g flag is specifed
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11942 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-22 19:11:29 +00:00
Xavier Leroy ac0aa0778d PR#5179: giant steps towards a Mingw64 port.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11927 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-21 16:31:01 +00:00
Xavier Leroy a40d0432b2 PR#4880: added appropriate event to "assert" so that it shows up properly in stack backtraces
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11891 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-20 10:42:36 +00:00
Alain Frisch 3f23ef49c4 #5411: New #load_rec primitive for the toplevel (finds and loads .cmo files recursively).
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11306 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-13 17:50:08 +00:00
Jacques Garrigue b1f8048f39 merge branches/located_errors
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11228 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-10-21 03:26:35 +00:00
Xavier Leroy b2846ae5a3 PR#5364: missing thinning on (val m : S) projection
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11214 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-09-30 09:47:21 +00:00
Jacques Garrigue 156fff1b8a Keep type variable names
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11210 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-09-22 09:05:42 +00:00
Damien Doligez d9eb848d86 PR#5238, PR#5277: Sys_error when getting error location
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11166 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-08-04 14:59:13 +00:00
Jacques Garrigue 9dc661c3bf merge branches/gadts
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11160 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-07-29 10:32:43 +00:00
Damien Doligez 3b507dd1aa renaming of Objective Caml to OCaml and cleanup of copyright headers
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11156 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-07-27 14:17:02 +00:00
Damien Doligez 90664f4ea1 uniform .ignore system
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11133 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-07-20 15:37:36 +00:00
Damien Doligez c91db736b1 merge changes from 3.12.0 to 3.12.1
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11123 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-07-20 09:17:07 +00:00
Luc Maranget 74a67449e5 Small optimisation.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11102 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-06-24 16:09:30 +00:00