Commit Graph

9871 Commits (cf6714ead24163382ab73426a8206421e0d7c706)

Author SHA1 Message Date
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
Fabrice Le Fessant 2e9bca0d57 Add a .gitignore file for git users
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14665 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-23 12:53:40 +00:00
Alain Frisch c0f862711e Remove Ast_helper.Convenience submodule. This is better located in the ppx_tools package.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14664 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-23 09:54:46 +00:00
Damien Doligez 07bc0e6580 update expected test results following commit 14660
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14663 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-23 09:05:59 +00:00
Alain Frisch db015c2670 More precise location on 'name must be unique' error (report the identifier name instead of the whole declaration).
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14660 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-22 15:34:52 +00:00
Alain Frisch 3b6c0c88a5 Make Parsetree more uniform by keeping locations in all records which have attributes.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14659 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-22 15:28:20 +00:00
Alain Frisch af3d4aa91f Better locations.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14658 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-22 14:36:29 +00:00
Alain Frisch 1ef064f29c #6273: fix.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14654 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-22 10:14:07 +00:00
Fabrice Le Fessant 100909c7f7 Add OCAMLPARAM option 'can-discard' to remove warnings about unknown version-specific arguments
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14653 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-22 10:10:25 +00:00
Alain Frisch 456ad30a54 #6273: fix Sys.file_exists on large files for Win32 (patch by C. Bauer).
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14652 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-22 09:47:42 +00:00
Alain Frisch 44845c5c17 PR#6075: fix build under Windows (there is no caml_strbuf_free).
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14651 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-22 09:41:24 +00:00
Jacques Garrigue 82e2f35a14 Fix PR#6376
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14650 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-21 10:38:04 +00:00
Mark Shinwell 0b097e9a74 part 2: fix regression (extraneous moves) caused by previous Cconst_blockheader patch
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14649 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-21 06:55:48 +00:00
Mark Shinwell cceb1c7361 fix regression (extraneous moves) caused by previous Cconst_blockheader patch
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14648 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-21 06:28:16 +00:00
Gabriel Scherer dd7178e2b1 [minor] documentation typo in Hashtbl
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14647 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-19 10:35:07 +00:00
Gabriel Scherer 1ba4d3486b [minor] improvement over the Hashtbl doc
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14646 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-19 10:15:28 +00:00
Gabriel Scherer 56f1f8a89d makefile target to build the stdlib documentation as html
(Patch by Simon Cruanes)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14645 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-19 09:05:32 +00:00
Gabriel Scherer 5ef784b7b2 an example of functor application for Hashtbl
(Patch by Simon Cruanes)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14644 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-19 09:05:30 +00:00
Jérémie Dimino d3ec5feb26 PR#5941: add Printexc.set_uncaught_exception_handler
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14643 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-18 15:36:08 +00:00
Damien Doligez 34752cdc5a minor clean-ups
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14642 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-18 15:29:56 +00:00
Xavier Leroy 443b7d722a As mentioned by gcc -Wall, the variable "frame_number" is useless. Removed it.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14637 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-18 10:06:03 +00:00
Xavier Leroy dd17af8b43 Simpler variant of commit r14635:
- configure: no change necessary
- byterun/config.h: make sure ARCH_INT64_TYPE and related macros
  are always defined, for Coq and others to use.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14636 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-18 10:00:42 +00:00
Xavier Leroy 86bd9990f4 configure: always define ARCH_INT64_TYPE in config/m.h because Coq
and maybe others rely on it
byterun/config.h: select "long long" in preference to "long" for "int64",
  just because this is how it was done in earlier versions.
  (Minimizing suprises.)


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14635 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-18 09:54:34 +00:00
Fabrice Le Fessant e3aaa68105 Add a hook in the lexer for an internal preprocessor
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14631 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-17 20:19:12 +00:00
Alain Frisch 75fd56bccb Changelog.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14625 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-17 15:53:36 +00:00
Damien Doligez 65d56e7164 merge COMPFLAGS and OPTCOMPFLAGS
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14621 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-17 09:49:33 +00:00
Damien Doligez 3e9a3ad147 remove $Id markers
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14620 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-17 09:48:35 +00:00
Alain Frisch ec52baed6f #5377: add a #show directive to the toplevel.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14618 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-17 09:24:14 +00:00
Alain Frisch cd5e18a8a3 Allow keywords and capitalized longidents as toplevel directives.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14617 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-17 09:23:22 +00:00
Alain Frisch 26a8bc20a7 Support for toplevel primitives with multiple arguments.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14616 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-16 16:51:37 +00:00
Alain Frisch 8106136bb3 Doc.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14611 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-16 12:40:24 +00:00
Gabriel Scherer d74aa291d3 on i386 and AMD64, mark 'morally tail' C function calls as non-leaf
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14610 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-16 08:34:21 +00:00