Commit Graph

12708 Commits (e301b9ea321fce0ccc7f9aff75aa3845e5d589d0)

Author SHA1 Message Date
Pierre Chambart f1f0a798f6 Add missing compilenv functions
approx_for_global and approx_env are missing implementation
2016-01-22 01:24:02 +01:00
Pierre Chambart 0e8ed08a9d Add warning headers to flambda files 2016-01-22 00:39:46 +01:00
Mark Shinwell fb35dc8fb4 Fix chambart/ocaml-1 GPR#134: wrong sharing of float array literals (Flambda only) 2016-01-21 16:46:49 +00:00
Damien Doligez efa7d04f11 fix problem reported in GPR#435: assertion failure 2016-01-21 17:38:09 +01:00
Mark Shinwell 20d1951566 Merge pull request #417 from chambart/flambda_prereq-duparray_and_array_mutability
GPR#417: Add explicit duplication of literal arrays
2016-01-21 16:05:44 +00:00
Pierre Chambart 534d607072 Add tests for static data allocation 2016-01-21 15:41:21 +01:00
Jérémie Dimino fe0968f080 Merge pull request #439 from mlasson/warnings_unboxed_untagged
More errors with unboxed and untagged attributes
2016-01-20 11:05:15 +00:00
Marc Lasson 934dd9a40b More errors with unboxed and untagged attributes
This commit adds errors for bad uses of @untagged and
@unboxed attributes in external declarations.

There are three possible new errors:
  - One when the external does not contain a native version of
the primitive,
  - One when the attribute occurs deeply into the type,
  - One when the attribute is applied to the whole function type.
2016-01-20 11:51:26 +01:00
alainfrisch ae3af451b8 Remove useless bindings, use proper sequencing instead of 'let _ = ... in ...'. 2016-01-20 00:02:30 +01:00
alainfrisch 09bc267038 Simplify. 2016-01-19 23:42:54 +01:00
alainfrisch 87de6a160d Useless bindings, unit patterns, whitespace. 2016-01-19 23:40:55 +01:00
David Allsopp 469810f822 Normalise \r\n to \n for deprecated warnings
The formatters used for printing warnings have text mode translation
enabled which means that any Windows endings which creep into warning
texts from deprecated attributes result in \r\r\n in the output.

The effect is largely innocuous, except that it causes the
deprecated_module_use test to fail on Windows.
2016-01-18 16:40:03 +00:00
David Allsopp 9e547e67dd Normalise \r\n to \n for warnings
The formatters used for printing warnings have text mode translation
enabled which means that any Windows endings which creep into warning
texts (e.g. from attributes) result in \r\r\n in the output.

The effect is largely innocuous, except that it causes the
deprecated_module_use test to fail on Windows.
2016-01-18 16:19:08 +00:00
Alain Frisch 174e93ad36 Merge pull request #438 from dra27/further-msvc-silencing
Tweaks to hiding the display of .c names with MSVC
2016-01-18 17:16:38 +01:00
David Allsopp 7ae5d358c1 Tweaks to hiding the display of .c names with MSVC
1. Update FlexDLL so that ocamlc -custom no longer displays the
   intermediate C file
2. Ensure that, for example, ocamlc -c foo/bar.c doesn't display bar.c
2016-01-18 16:06:25 +00:00
alainfrisch 129df0ae09 Fix Changes file. 2016-01-18 11:11:39 +01:00
Alain Frisch 548c2b3463 Merge pull request #432 from damiendoligez/useless-case-in-test_bool
remove unused (and wrong?) line in cmmgen.ml
2016-01-18 10:10:00 +01:00
Alain Frisch 616e5c32f1 Merge pull request #434 from dra27/vs2015-snprintf
A further MS Universal CRT tweak
2016-01-18 09:44:41 +01:00
Mark Shinwell 56545e0dca Merge pull request #431 from chambart/allow_sharing_branch_with_float_arrays
GPR#431: Const_float_array are constant for branch merging
2016-01-18 08:36:05 +00:00
Mark Shinwell f4443180f8 merge with ocaml/trunk 2016-01-18 08:34:56 +00:00
Mark Shinwell b36f05bb34 Changes entry for GPR#431 2016-01-18 08:34:33 +00:00
Alain Frisch b0eed463b7 Merge pull request #436 from dra27/msvc-asmcomp-tests
Enable tests/asmcomp for MSVC
2016-01-18 09:26:13 +01:00
Alain Frisch 24cfbe233a Merge pull request #402 from Drup/trunk
Add Ast_helper.Const
2016-01-18 07:28:34 +01:00
Alain Frisch 87e431dd27 Merge pull request #407 from dra27/filter-cl-message
Stop ocaml{c,opt} -c foo.c displaying foo.c on stdout
2016-01-18 07:22:16 +01:00
Drup 8a9d074902 Add Ast_helper.Const, for constants. 2016-01-18 00:27:37 +01:00
Drup 6095df954e Rename parsetree constants.
PConst -> Pconst
int -> integer
2016-01-18 00:12:38 +01:00
Drup 6bb1c73197 Add comments on Parsetree's constants. 2016-01-18 00:12:38 +01:00
David Allsopp 8ca04e3b7f Use ocamlc as a C compiler in the testsuite
ocamlc and ocamlopt both provide convenient mechanisms to invoke the C
compiler for .c files. Given the filtering out of the .c line for MSVC
now performed by ocamlc and ocamlopt, changing the testsuite to invoke
the C compiler via ocamlc reduces noise from the testsuite _log file.
2016-01-17 19:21:48 +00:00
David Allsopp 124672aa13 Filter out the display of .c files by MSVC
Microsoft's C Compiler displays several lines on every invocation - most
of this is removed by specifying the /nologo command line option, but
the compiler still displays the name of every C file it compiles. The
Microsoft Macro Assembler (MASM) does the same thing, but ocamlopt by
default is able to pipe the output of that command directly to NUL, as
the assembler code should never produce errors.

The same cannot be done for invocations of the C compiler, as obviously
syntax errors must be displayed. This relative small cosmetic change
pipes the output of cl to a temporary file and filters out the first
line if it is exactly as expected. The most elegant solution would
require pipes and process handling to be merged from the Unix module
into the compilers.
2016-01-17 19:21:45 +00:00
David Allsopp bfe91a097e Fix running outside bash! 2016-01-16 14:12:18 +00:00
David Allsopp 8386733a87 Initial fixes for tests/asmcomp on MSVC 32-bit 2016-01-16 11:53:55 +00:00
David Allsopp 009e14a20c No need for vsnprintf workaround in VS2015
The Universal CRT includes a compliant implementation of vsnprintf.
2016-01-16 09:24:01 +00:00
Alain Frisch 7945404a4e Merge pull request #433 from dra27/fix-flambda-win
Fix native Windows ports (problems with #423 and #425)
2016-01-15 19:29:25 +01:00
David Allsopp 2d05cfb0b4 Add missing FLAMBDA config for native Windows
Missing options from #425.
2016-01-15 17:43:58 +00:00
David Allsopp bcbee6896c Fix missing Windows change in #423 2016-01-15 17:43:34 +00:00
David Allsopp ae49015d8e Share compiler config with ocamlmklib
Remove duplication between tools/ocamlmklibconfig.ml and
utils/config.ml and link ocamlmklib with config.cmo from compiler-libs.
2016-01-15 17:07:13 +00:00
David Allsopp b46843fb69 Allow compilation using bootstrapped FlexDLL
Extend the previous patch allowing make -f Makefile.nt flexdll
install-flexdll not to require the install-flexdll stage.

OCAML_FLEXLINK is utilised as required to allow compilation of the entire
system using an in-tree compiled flexlink. The build process simply
required the flexdll target to appear before world.

opt.opt compiles a native code version of flexlink.exe as flexlink.opt.

install always installs flexlink.exe if it was compiled along with any
required .manifest files. It also installs the appropriate .o/.obj files
to $(INSTALL_LIBDIR).

At present, the bootstrapping is not extended to the Cygwin ports.
2016-01-15 17:07:12 +00:00
David Allsopp fe4b643c4e Support OCAML_FLEXLINK environment variable
OCAML_FLEXLINK is inspected by ocamlopt, ocamlc and ocamlmklib and allows
the flexlink command to be overriden. This is primarily intended as a
solution for bootstrapping OCaml with FlexDLL, thus allowing a bytecode
image of flexlink launched with ocamlrun to be executed, instead of
requiring flexlink to be in PATH.
2016-01-15 17:07:11 +00:00
David Allsopp a7b6083be3 Add FlexDLL as git submodule
Messages for obtaining flexdll sources updated in Makefile.nt
2016-01-15 17:07:01 +00:00
David Allsopp a9f5227d62 Allow bootstrapped FlexDLL to be installed
`install-flexdll` target added to Makefile.nt which installs flexlink.exe
and the correct objects, manifests and flexdll.h to `$(INSTALL_BINDIR)`.

When this target has been used, the behaviour of opt.opt is altered to
compile a native-code version of flexlink.exe. This is subsequently
installed by the install target.

This means that Windows can be fully built by issuing:

  make -f Makefile.nt flexdll install-flexdll world opt.opt install
2016-01-15 17:01:30 +00:00
David Allsopp 5da5d4ac7d Allow optional bootstrapping of FlexDLL on Windows
Allows the four native Windows ports to compile FlexDLL and flexlink
"in-tree" by placing the sources in directory `flexdll` and issuing
`make -f Makefile.nt flexdll`

FlexDLL must still be installed somewhere in PATH before OCaml itself
can be compiled. The `flexdll` target leaves the OCaml build tree in a
sufficiently clean state to allow `world` to be run after installation
of FlexDLL.
2016-01-15 17:01:30 +00:00
Jeremie Dimino 87ef3070cd Build the compiler with -strict-format
Following #414
2016-01-15 15:52:23 +00:00
Pierre Chambart fbd87e9081 Const_float_array are constant for branch merging 2016-01-15 16:07:59 +01:00
Mark Shinwell d489fd2038 comments 2016-01-15 14:54:33 +00:00
Mark Shinwell 0664a1cf03 Alter array patch after feedback from jdimino 2016-01-15 14:49:01 +00:00
Pierre Chambart 9668c45aab Avoid using Pmakearray instead of Const_float_array 2016-01-15 15:33:16 +01:00
Damien Doligez d296864174 remove unused (and wrong?) line in cmmgen.ml 2016-01-15 15:25:23 +01:00
Pierre Chambart 92c41647a1 Merge pull request #425 from chambart/flambda_prereq-configure-option
Configure option to enable the flambda middle-end
2016-01-15 15:16:58 +01:00
Mark Shinwell 1d8d9b54ee Merge pull request #423 from mshinwell/flambda_prereq-clflags
GPR#423: Clflags changes for flambda
2016-01-15 13:41:09 +00:00
Mark Shinwell 56c7413843 wrong default_inline_threshold 2016-01-15 13:29:28 +00:00