Commit Graph

9534 Commits (583bfd46c21f66ef6c8b82578289c74f983afd51)

Author SHA1 Message Date
Mark Shinwell 583bfd46c2 be explicit when constructing integers that are block headers
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14464 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-03-17 14:34:00 +00:00
Gabriel Scherer 087993d954 [minor] update Changes
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14463 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-03-17 09:18:17 +00:00
Gabriel Scherer d22b112968 ocamllex: user-definable refill actions (patch by Frédéric Bour)
The patch introduces a new "refill" action. It's optional and if
unused the lexer specification and behavior are unchanged.

When specified, it allows the user to control the way the lexer is
refilled. For example, an appropriate refill handler could perform the
blocking operations of refilling under a concurrency monad such as Lwt
or Async, to work better in a cooperative concurrency setting.

To make use of this feature, add

  refill {refill_function}

between the header and the first rule.

[refill_function] is a function which will be invoked by the lexer
immediately before refilling the buffer. The function will receive as
arguments the continuation to invoke to resume the lexing, and the
current lexing buffer.

More precisely, it's a function of type:

  (Lexing.lexbuf -> 'a) -> Lexing.lexbuf -> 'a

where the first argument is the continuation which captures the
processing ocamllex would usually perform (refilling the buffer, then
calling the lexing function again), and the result type ['a] should
unify with the result types of all rules.

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14461 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-03-14 15:39:32 +00:00
Gabriel Scherer adac89525e [minor] forgotten Changes entry for 4.01
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14455 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-03-13 09:00:24 +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
Alain Frisch 1080fec868 Optimization: if a function doesn't use its environment, one can do as if it it doesn't have any free variables, and its closure can be statically allocated (we could be more precise and remove unused free variables from the closure).
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14453 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-03-10 10:05:02 +00:00
Alain Frisch ebd01bc49e #6343, #5537, #5573: improving access to values in nested modules.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14452 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-03-10 10:02:31 +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 d59bd570d7 Structural typing of first class modules (cf. PR#6333)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14450 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-03-10 02:06:10 +00:00
Alain Frisch 7fead1f37b #5779: Revert change on camlinternalOO.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14449 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-03-07 17:10:02 +00:00
Mark Shinwell 1f4de8b799 use -bin-annot when building
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14448 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-03-07 14:47:30 +00:00
Alain Frisch ccf516168f #5779: adopt gasche's sentinel solution.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14447 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-03-07 08:16:41 +00:00
Alain Frisch fd2911be13 Really remove debug output.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14446 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-03-07 08:13:55 +00:00
Jacques Garrigue 75b6553f15 remove debugging output
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14445 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-03-07 00:59:10 +00:00
Alain Frisch 4907f6ca76 #5779: improve support for structured constants (better propagation, sharing, cleaner representation). Also fix #6337 (constants emitted several times).
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14444 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-03-06 17:03:16 +00:00
Jacques Garrigue eaf5646196 Fix PR#6331
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14443 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-02-25 08:16:25 +00:00
Damien Doligez 9d86709547 fix major performance problem on large heaps by making the heap increment proportional to the heap size
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14442 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-02-20 13:04:01 +00:00
Damien Doligez 56e5ff050f PR#6214: "sed: comment garbled" on make world
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14438 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-02-19 15:33:29 +00:00
Damien Doligez 29ad65d954 PR#6208: Hashtbl.reset @since 4.00.0
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14437 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-02-19 15:23:17 +00:00
Damien Doligez 5539f86008 add #includes to declare the functions enter/leave_blocking_section
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14436 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-02-19 14:39:44 +00:00
Alain Frisch 585d571333 #6328: use real temporary file names for ocamlyacc under Windows.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14435 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-02-18 09:01:44 +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
Gabriel Scherer ad58a2cb57 PR#6054: add support for M.[ foo ], M.[| foo |], etc.
(Patch by Kaustuv Chaudhuri)

The following are now supported:

  M.[ foo ]     abbreviation for   M.([ foo ])
  M.[| foo |]         "       "    M.([| foo |])
  M.{ foo }           "       "    M.({ foo })
  M.{< foo >}         "       "    M.({< foo >})

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14431 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-02-04 16:55:20 +00:00
Gabriel Scherer fba6c41771 Fix a typo in close_functions.
(Patch by Evgeny Roubinchtein)

The typo isn't a bug since the variables `arity' and `body' are never
actually referenced in the body of the function, but it does
(negatively) affect readability of the code.

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14430 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-01-31 07:50:35 +00:00
Alain Frisch 9ef1830a2b #6311. Changelog.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14429 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-01-30 12:21:24 +00:00
Alain Frisch 663c098be6 Add location to module and module type definitions. Improves #6311.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14428 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-01-30 12:18:34 +00:00
Alain Frisch b81e8ecc3d #6311: show kind and location of missing item, in case of signature mismatch.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14427 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-01-30 09:55:35 +00:00
Jérémie Dimino 67f7b37a7d release the lock in ftruncate, fchown, and fchmod
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14425 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-01-29 09:35:06 +00:00
Gabriel Scherer d78c1fe671 PR#6310: fix ocamldoc's subscript/superscript CSS font size
(patch by Anil Madhavapeddy)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14424 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-01-28 14:43:02 +00:00
Alain Frisch 3fb69be047 Fix testsuite (rely on compilerlibs to be more robust).
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14423 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-01-28 14:03:45 +00:00
Alain Frisch 10abdce7b1 Record inclusion checks between value_descriptions in .cmt files. This makes it easy in particular to track in external tools value declarations between implementations and interfaces.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14422 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-01-28 11:07:02 +00:00
Alain Frisch 9de0cd21fd #6308: better error message when the types inferred for a variable on both sides of an or-pattern don't match.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14421 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-01-27 16:27:05 +00:00
Alain Frisch 6a296a026e Fix conditional installation of ocamldebug under Windows.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14420 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-01-23 12:01:44 +00:00
Xavier Clerc 8e51133d66 PR#6183: enhanced documentation for 'Unix.shutdown_connection'
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14419 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-01-23 09:16:29 +00:00
Xavier Clerc e66362027c PR#6267: more information printed by "bt" command of ocamldebug
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14416 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-01-23 09:07:09 +00:00
Jacques Garrigue eaa8a78f94 Fix PR#6303
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14415 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-01-23 01:58:37 +00:00
Damien Doligez c5b1594bb3 PR#6189, items (10) and (11)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14413 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-01-22 14:39:39 +00:00
Damien Doligez 89735c4b9c PR#6189: items (8) and (9)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14412 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-01-22 14:33:38 +00:00
Damien Doligez 4311193245 PR#6189: items (5) (6) (7)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14411 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-01-22 14:05:13 +00:00
Damien Doligez d3d6cc08fe PR#6189, item (2): missing options in the doc
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14410 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-01-22 14:01:10 +00:00
Damien Doligez 224adc5a1c svn wants to commit mergeinfo...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14407 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-01-22 13:32:33 +00:00
Damien Doligez fd2c7e3be3 PR#5598: (follow-up) handling of string constants in ocamllex should be the same as in ocamlc
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14406 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-01-22 13:31:54 +00:00
Damien Doligez 64dd73a6e0 PR#6165: Alterations to handling of \013 in source files breaking other tools
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14405 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-01-22 13:04:04 +00:00
Alain Frisch 5d99ea5177 Fix dependency analysis for module aliases.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14403 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-01-21 16:47:05 +00:00
Jacques Garrigue df68b17460 Fix PR#6293
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14401 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-01-14 11:29:31 +00:00
Jacques Garrigue 950be999e6 Fix PR#6293
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14400 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-01-14 11:29:02 +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
Gabriel Scherer 4a25508fc2 update CHANGES
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14393 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-01-09 16:24:33 +00:00