Commit Graph

10091 Commits (5adbb67a458f6f63deb1c1000f887ff87371c706)

Author SHA1 Message Date
Jacques Garrigue fc24112e25 change -trans-mod to -no-alias-deps, and update message
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14738 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-05 02:05:30 +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
Alain Frisch efc23798ea Fix win32unix (introduction of bytes + immutable strings).
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14735 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-04 20:32:11 +00:00
Fabrice Le Fessant 680fe9f91d Add FIRST_UNIMPLEMENTED_OP instructioon to simplify bootstrapping after adding new bytecode instructions at the end
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14734 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-04 20:14:23 +00:00
Xavier Leroy c141951f2a PR#6385: wrong allocation of large closures by the bytecode interpreter
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14733 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-04 07:39:30 +00:00
Gabriel Scherer 5ca901cfa6 ocamlbuild: only show backtrace in verbose mode
Building foo.cmo in an empty directory (so with in particular no
foo.ml) currently returns the following output:

> Solver failed:
>   Ocamlbuild cannot find or build foo.ml.  A file with such a name
>   would usually be a source file.  I suspect you have given a wrong
>   target name to Ocamlbuild.
> Backtrace:
>   - Failed to build the target foo.cmo
>       - Building foo.cmo:
>           - Failed to build all of these:
>               - Building foo.ml:
>                   - Failed to build all of these:
>                       - Building foo.mly
>                       - Building foo.mll
>               - Building foo.mli:
>                   - Building foo.mly
>               - Building foo.mlpack
>               - Building foo.mli:
>                   - Building foo.mly
> Compilation unsuccessful after building 0 targets (0 cached) in 00:00:00.

While the "Solver failed" part is nice and reasonably easy to
understand, users report that the "Backtrace" part is confusing
(it talks about files they don't know about) -- and it can be so large
that the explanation above is completely hidden.

This patch disables backtrace-printing by default; it is now only
shown when some "-verbose N" (N starting at 1) argument is passed.

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14732 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-03 21:21:58 +00:00
Xavier Leroy b691a28d15 Some updates for SPARC
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14731 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-03 18:20:33 +00:00
Gabriel Scherer c03e155885 stdlib/map: Add some usage exemple in the documentation.
(Patch by Nicolas Braud-Santoni)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14730 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-03 13:24:29 +00:00
Jérémie Dimino c31d2ab685 revert commit 14728
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14729 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-03 09:07:14 +00:00
Jérémie Dimino f0b74bd726 -o sets the module name
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14728 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-02 16:44:09 +00:00
Gabriel Scherer d84f8be74c configure: fix as/aspp for FreeBSD (works for both gcc and clang)
(Patch by Andrew Ray)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14727 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-02 16:35:48 +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
Mark Shinwell 2dd92969d2 fix bug in previous Val_unit initialization patch
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14725 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-02 09:54:28 +00:00
Jacques Garrigue b78b19975a * Do not require cmi file to be present if module alias is not accessed
(using -trans-mod)
* Add warning 49 for that case; use same warning in place of deprecated
  for Env.scrape_alias


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14724 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-02 07:07:09 +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
Damien Doligez 9baf42b72d safe-string: documentation fixes and add a couple of functions in Pervasives and Digest
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14721 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-01 21:54:15 +00:00
Mark Shinwell 05100e597e initialize blocks with Val_unit, not zero
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14720 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-01 13:07:48 +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
Mark Shinwell f8df3c9aed add travis CI files (github.com/avsm/ocaml 22e0620)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14718 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-01 10:30:21 +00:00
Gabriel Scherer d30af127d8 [minor] auto-generate a .gitignore using `git svn show-ignore`
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14717 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-01 09:39:38 +00:00
Gabriel Scherer db32d6a7ed Ocamlbuild: make log printing code tail-recursive
Patch by Frédéric Bour

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14716 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-01 09:28:35 +00:00
Fabrice Le Fessant a72d304fa4 document __LOC__ in pervasives.mli
Also removes __FILE_OF__ and __MODULE_OF__, since they are not more precise
than __FILE__ and __MODULE__



git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14715 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-30 14:22:27 +00:00
Alain Frisch b791d666d8 #6387: allow attributes on variants in polymorphic variant types.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14712 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-30 08:19:55 +00:00
Alain Frisch 772a843812 Fix precedence of extension nodes (#6386).
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14711 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-30 08:05:52 +00:00
Alain Frisch 676497f8cf Fix precedence of extension nodes (#6386).
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14710 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-30 08:05:22 +00:00
Alain Frisch 99120f2d24 Fix precedence of extension nodes (#6386).
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14709 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-30 08:05:04 +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
Xavier Leroy 3ce32fba4f Wrong MASM syntax, try again.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14704 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-29 09:58:51 +00:00
Damien Doligez b4c3955ff7 update Makefile.nt for new asmcomp modules
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14703 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-29 09:40:31 +00:00
Jacques Garrigue 48f52f450c merge Leo's patch for PR#6384
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14702 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-29 02:25:04 +00:00
Jacques Garrigue 6cb386e91c Fix PR#6383: Exception Not_found when using object type in absent module
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14701 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-28 13:29:51 +00:00
Alain Frisch f1f362698f Document that the new alternative syntax for string literals can break comments.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14698 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-28 08:08:08 +00:00
Alain Frisch d2de0d7b18 Revert 14616, 14617. Go back to the original syntax for toplevel directives, only allowing capitalized identifiers in addition to lowercase ones. Split #show into variants #show_val, #show_type, etc, and implement a generic #show which combines all the results.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14697 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-28 08:04:43 +00:00
Damien Doligez bf8d983a51 fix bug in commit 14694
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14696 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-27 16:36:41 +00:00
Damien Doligez 35ec048ca7 add CSE.ml to ignore files
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14695 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-27 09:31:59 +00:00
Damien Doligez f48db16efd add missing rules for CSE.ml
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14694 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-27 09:31:22 +00:00
Xavier Leroy 89441430c5 PR#6361: Hashtbl.hash not terminating on some lazy values w/ recursive types
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14693 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-26 17:11:36 +00:00
Xavier Leroy 558f40e344 New back-end optimization pass: common subexpression elimination (CSE).
(Reuses results of previous computations instead of recomputing them.)
(Cherry-picked from branch backend-optim.)
Tested on amd64/linux and i386/linux.
Other back-ends compile (after assorted updates) but are untested.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14688 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-26 10:40:22 +00:00
Xavier Leroy 95d98cd978 ID comments are so passé.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14687 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-26 09:38:29 +00:00
Xavier Leroy 9c1d005ebb New back-end optimization pass: dead code elimination.
(Removes arithmetic and load instructions whose results are unused.)
(Cherry-picked from branch backend-optim.)


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14686 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-26 09:31:18 +00:00
Xavier Leroy 452390e0ea Follow-up to commit 14673: MASM has its own syntax for hex constants
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14683 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-26 07:11:11 +00:00
Damien Doligez 0cba565437 fix some whitespace
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14680 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-25 22:34:13 +00:00
Damien Doligez 9639370d40 update to use the git version of camlp5
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14679 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-25 22:33:52 +00:00
Xavier Leroy 2633ff77ce Follow-up to commit 14673: Iconst_float now takes a float, no longer a string.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14675 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-25 14:02:43 +00:00
Jacques Garrigue 979fe8b8ad Do not add absolute paths for information added to
the local environment in Env.components_of_module_make.
Fixes the bug reported by Mark Shinwell on caml-devel,
on 2014-04-23. This bug was related to module aliases.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14674 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-25 09:09:08 +00:00
Xavier Leroy 29b34438e0 - Constant ropagation for float and int32/int64/nativeint arithmetic.
Constant propagation for floats can be turned off with option
  -no-float-const-prop, for codes that change FP rounding modes at
  run-time.
- Clambda / C-- / Mach: represent float constants as FP numbers of type 
  float rather than literals of type string.
- Tested for AMD64; other archs need testing.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14673 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-25 08:41:13 +00:00
Alain Frisch 3775a101e6 Avoid bad error report when a registered toplevel primitive raises Not_found.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14671 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-23 16:18:22 +00:00
Alain Frisch df68e916c4 #6119: document that the set of values contained in a closure is not specified and how this impacts marshaling references captured in closures, for instance.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14670 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-23 16:04:02 +00:00
Alain Frisch 5a463e6176 Fix doc for unmarshaled exception values and structural comparison.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14669 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-23 15:54:26 +00:00