Commit Graph

11099 Commits (7f8019fe309b2059d66813c4b0b8abaf851ad104)

Author SHA1 Message Date
Xavier Leroy 32def141e5 z port: update Changes 2015-11-19 08:26:59 -05:00
Xavier Leroy 64ab62221b z port: update emit.mlp to new format for FP literals 2015-11-19 08:21:38 -05:00
Xavier Leroy 51104fc231 Update zsystem branch wrt upstream trunk.
Resolved conflicts: testsuite/tests/asmcomp/mainarith.c
2015-11-19 13:55:54 +01:00
Xavier Leroy e896e9071a debugger/ : link explicitly with terminfo.cmo
The explicit link seems required because of PR#289 'require-external'
(commit 07b8eb3).
2015-11-19 11:01:14 +01:00
Xavier Leroy bf2033e127 If <stdint.h> not available (e.g. MSVC), define {u,}int16_t types ourselves. 2015-11-19 10:45:54 +01:00
Xavier Leroy 0c5e862a3e GPR#268: Hexadecimal notation for floating-point numbers
Merge of branch 'hex-float'.

- Add support in byterun/floats.c for conversions between floats and strings in hex notation. We cannot rely on the C standard library here because Microsoft consistently fails at supporting hex notation as standardized in C99. Instead, the conversions are implemented from scratch.
- Add support in the lexer so that hex float literals are recognized in OCaml sources.
- Add support in formats. The ISO C99 format letters for hex floats are %a and %A, but %a is already taken. I chose %h and %H, which are rejected today as bad formats (hence no backward incompatibility) and don't mean anything in C either (h is a modifier, not a format letter).
- Add support in printf. All the trimmings are there in the implementation of %h and %H, including sign modifier and fixed precision.
- Benoit Vaugon contributed support in scanf.

Resolved conflicts:
	boot/ocamlc
	boot/ocamldep
	boot/ocamllex
	parsing/lexer.mll
2015-11-19 10:37:20 +01:00
Xavier Leroy 2641daf1fe PR#6910 and GPR#224: extend marshaling to support data encodings beyond 4 Gb
- Update Changelog
- #define inline in config/m-nt.h to support MSVC (to be tested).
2015-11-19 09:59:40 +01:00
Xavier Leroy 4fd254e325 Merge pull request #224 from ocaml/big-marshal
PR#6910 and GPR#224: extend marshaling to support data encodings beyond 4 Gb
2015-11-19 09:56:43 +01:00
Xavier Leroy 6cd8656249 PR#7024 and GPR#295: CSE confuses +0.0 and -0.0
The fix consists in representing float literals by their bit patterns (int64) in the Mach and Linear intermediate languages.

A regression test was added to the test suite.
2015-11-19 09:25:02 +01:00
Gabriel Scherer c1e2080803 Merge pull request #282 from trefis/short-paths-fix
short-paths: fix and twix
2015-11-19 08:21:21 +01:00
lijunsong 1f79677ffb PR#6935:ocamldebug:load_printer raise uncaught exception when passing directory
Fix by catching Sys_error exception.
2015-11-17 18:26:36 -08:00
alainfrisch 1caf9364e3 Fix bug in Tast_mapper: bad recursion in module_binding (found by Corentin De Souza). 2015-11-17 13:09:06 +01:00
Xavier Leroy 9b1a371291 PR#6945 and GPR#227: protect Sys and Unix functions against string arguments containing the null character '\000'
Continuation of commit dc043a7.
Fix wrong declaration of cstringvect.
2015-11-16 14:10:25 +01:00
Thomas Refis ce793e16ef update Changes 2015-11-16 11:06:09 +01:00
Thomas Refis 3762abea10 short-paths: slight change to the penalty heuristic
Give the same penalty to ident containing double underscores as to ident
starting with an underscore.
2015-11-16 11:06:08 +01:00
Thomas Refis d7acc7989a short-paths: take penalty into consideration when walking the environment 2015-11-16 11:06:08 +01:00
Thomas Refis 7b5fcfdc0f scrape_alias_safe: relax safety restriction + rename
In PR#6812 garrigue said:
    "Note that we do not want to disable visiting of all aliases, but just of
     aliases of persistent modules, which is a bit more complex."

Which is not actually quite true, we want to disable visiting aliases of
persistent modules which we haven't already visited.
2015-11-16 11:06:04 +01:00
Xavier Leroy ef8bc511ce PR#4023 and GPR#68: add Unix.sleepf and improve Unix.sleep
Follow-up to commit 50648ed: update otherlibs/threads.
2015-11-16 10:48:14 +01:00
Jacques Garrigue ce552ccf20 Fix performance problem with PR#7016 and strengthen code 2015-11-16 16:38:08 +09:00
Xavier Leroy e7f339e6bd Improve speed of classify_float
As suggested in the discussion of GPR#272:
- Do not go through fpclassify()  (speedup: 2 to 3)
- Add 64-bit variant of the code  (additional speedup: 10%-20%)
2015-11-15 16:43:46 +01:00
Xavier Leroy 50648ed2b7 PR#4023 and GPR#68: add Unix.sleepf and improve Unix.sleep
Unix.sleepf provides sleep with sub-second resolution.
Unix.sleep is implemented on top of Unix.sleepf.
If a handled signal causes the sleep to return early with an EINTR
error, catch it and restart the sleep for the remaining time.
2015-11-15 15:34:45 +01:00
Xavier Leroy 9893e265d8 PR#6945 and GPR#227: protect Sys and Unix functions against string arguments containing the null character '\000'
Continuation of commit dc043a7.  The following otherlibs/unix/ functions were not protected:
unix_inet_of_string
unix_getgrnam
unix_getpwnam
unix_initgroups
unix_readlink
unix_utimes
2015-11-15 15:13:30 +01:00
Xavier Leroy dc2a98c3a5 PR#6945 and GPR#227: protect Sys and Unix functions against string arguments containing the null character '\000'
Continuation of commit dc043a7:
- Protect Sys.command
2015-11-13 14:57:12 +01:00
Xavier Leroy 29a50b4768 PR#6945 and GPR#227: protect Sys and Unix functions against string arguments containing the null character '\000'
Continuation of commits dc043a7 and 9dfa69e:
- Add checks for the command-line arguments and for the environment
  variables passed via Unix.exec* and variants.
2015-11-13 14:49:50 +01:00
Jacques Garrigue 07b8eb36aa Merge pull request #289 from garrigue/require-external
Fix PR4166 and PR6956: force linking when calling external C primitives
2015-11-13 14:38:01 +09:00
Jacques Garrigue eb0de16ee0 Fix PR#4166, PR#6959: force linking when calling external C primitives 2015-11-13 13:59:14 +09:00
pierreweis b96972b159 Deprecating invariant non-compliant and error prone fscanf and kfscanf functions. 2015-11-12 19:14:02 +01:00
pierreweis 09479a70a9 Better documentation, in particular for Scanning.in_channel value usage. 2015-11-12 18:43:37 +01:00
pierreweis dcaa6946e7 Adding a tag for depecated tabbing boxes. 2015-11-12 18:37:52 +01:00
pierreweis 97cfe7d882 Merge branch 'trunk' of ssh://github.com/ocaml/ocaml into trunk 2015-11-12 14:38:00 +01:00
Xavier Leroy 9dfa69e546 PR#6945 and GPR#227: protect Sys and Unix functions against string arguments containing the null character '\000'
Continuation of commit dc043a7:
- Update the win32unix/ files with the new checks.
- Completely untested, not even compiled.
2015-11-11 17:23:40 +01:00
Xavier Leroy dc043a7b62 PR#6945 and GPR#227: protect Sys and Unix functions against string arguments containing the null character '\000'
Implementation notes:
- Based on c-cube's GPR#227 code, but many Unix functions were missing.
- For Unix.bind and Unix.connect to a PF_UNIX address, tolerate
  file names whose first character is '\000': in Linux, these have
  a meaning as "abstract socket addresses", and in other operating
  systems, the resulting empty path name causes a EINVAL error
  (tested under MacOS X).
- Very lightly tested.
- win32unix remains to be fixed.
2015-11-11 17:07:44 +01:00
Xavier Leroy 23ed29da6b Merge branch 'trunk' of ssh://github.com/ocaml/ocaml into trunk 2015-11-11 11:40:47 +01:00
Xavier Leroy ed0a785f02 PR#7039: Unix.getsockname returns garbage for unnamed PF_UNIX sockets.
Fix implemented: return ADDR_UNIX "" in this case (the file name is the empty string).
2015-11-11 11:39:10 +01:00
Xavier Leroy b09f3ff9b1 Merge pull request #280 from mshinwell/parallel-make-fixes
Fix stdlib dependencies for .p.cmx
2015-11-11 10:29:59 +01:00
Damien Doligez 7cb9a80744 simplify .gitignore; remove .ignore files and tools/setignore; adjust tools/check-typo 2015-11-06 16:25:05 +01:00
Gabriel Scherer 1fb2a8166c update Changes for GPR#279 2015-11-05 16:52:03 +01:00
Jérémie Dimino f486350b74 Merge pull request #281 from bobot/unbox_madly
Unbox Sys.time and compare primitive
2015-11-05 13:55:04 +00:00
François Bobot 26b8189fe8 Update Changes 2015-11-05 13:09:27 +01:00
François Bobot 203c444fd4 Make `Pervasives.ldexp` unboxed and noalloc 2015-11-05 13:07:03 +01:00
François Bobot c0f19965f4 Make specialized compare unboxed
- float
    - int32
    - int64
    - nativeint

  Not for int because the comparison is done directly on the untagged version.
  Useful mainly for floats since they can be stored unboxed in records or arrays.
2015-11-05 13:07:03 +01:00
François Bobot 3c76d0678d Make `Sys.time` unboxed and noalloc 2015-11-05 13:07:03 +01:00
Leo White 44306923a8 Merge pull request #261 from lpw25/fix-pr6998
Fix PR6998
2015-11-05 11:35:55 +00:00
Jeremie Dimino 5ed4d5bb4b add missing author in Changes 2015-11-05 10:41:13 +00:00
Jeremie Dimino 6676784f63 PR#6806: Allow type annotations before the "->" in "fun <args> -> <expr>"
Patch by Valentin Gatien-Baron
2015-11-05 10:41:13 +00:00
Jeremie Dimino 26657d5736 PR#6806: Syntactic sugar for type annotations on record fields
Add the following syntactic sugars, in both expressions and patterns:
- { f : typ = x } to mean { f = (x : typ) }
- { f : typ     } to mean { f = (f : typ) }

In expressions, the type annotation can also be a coercion. For
instance: { f :> typ } to mean { f = (f :> typ) }.

Patch by Valentin Gatien-Baron
2015-11-05 10:41:13 +00:00
Alain Frisch 3cc3932584 Merge pull request #279 from alainfrisch/fix_frametables
Attempt to fix a probable bug introduced by GPR#156.
2015-11-05 09:20:47 +01:00
Jacques Garrigue f32db119ce Fix PR#7036: Module alias and package type equality 2015-11-05 14:20:50 +09:00
Leo White 02ef87ed8f Add a test for no-alias-deps 2015-11-04 13:46:46 +00:00
Mark Shinwell 211791a409 Changes 2015-11-04 11:09:48 +00:00