Skip to content

Commit d433640

Browse files
authored
Merge pull request #4066 from BuckleScript/poly_uncurry
remove legacy condtional compilation support
2 parents edb38a1 + 1e07a74 commit d433640

File tree

83 files changed

+705
-5980
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

83 files changed

+705
-5980
lines changed

.vscode/tasks.json

Lines changed: 50 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,55 @@
11
{
2-
"version": "0.1.0",
3-
"command": "node",
4-
"options": {
5-
"cwd": "${workspaceRoot}/jscomp"
6-
},
7-
"isShellCommand": true,
8-
"args": [
9-
"../scripts/tasks.js"
10-
],
11-
"isBackground": true,
12-
"problemMatcher": {
13-
"fileLocation": "absolute",
14-
"owner": "ocaml",
15-
"background": {
16-
"activeOnStart": false,
17-
"beginsPattern": ">>>> Start compiling",
18-
"endsPattern": ">>>> Finish compiling"
19-
},
20-
"pattern": [
21-
{
22-
"regexp": "^File \"(.*)\", line (\\d+)(?:, characters (\\d+)-(\\d+))?:$",
23-
"file": 1,
24-
"line": 2,
25-
"column": 3,
26-
"endColumn": 4
2+
"version": "2.0.0",
3+
"tasks": [
4+
{
5+
"label": "Watch build",
6+
"command": "node",
7+
"options": {
8+
"cwd": "${workspaceRoot}/jscomp"
279
},
28-
{
29-
// "regexp": "^(?:(?:Parse\\s+)?(Warning|[Ee]rror)(?:\\s+\\d+)?:)?\\s+(.*)$",
30-
"regexp": "^(?:(?:Parse\\s+)?(Warning|[Ee]rror)(?:\\s+\\(warning \\d+\\))?(?:\\s+\\d+)?:)?\\s+(.*)$",
31-
"severity": 1,
32-
"message": 2,
33-
"loop": true
10+
// "isShellCommand": true,
11+
"type": "shell",
12+
"group": {
13+
"kind" : "build",
14+
"isDefault": true
15+
},
16+
"args": [
17+
"../scripts/tasks.js"
18+
],
19+
"presentation": {
20+
"echo": true,
21+
"reveal": "always",
22+
"focus": false,
23+
"panel": "shared",
24+
"showReuseMessage": true,
25+
"clear": false
26+
},
27+
"isBackground": true,
28+
"problemMatcher": {
29+
"fileLocation": "absolute",
30+
"owner": "ocaml",
31+
"background": {
32+
"activeOnStart": false,
33+
"beginsPattern": ">>>> Start compiling",
34+
"endsPattern": ">>>> Finish compiling"
35+
},
36+
"pattern": [
37+
{
38+
"regexp": "^File \"(.*)\", line (\\d+)(?:, characters (\\d+)-(\\d+))?:$",
39+
"file": 1,
40+
"line": 2,
41+
"column": 3,
42+
"endColumn": 4
43+
},
44+
{
45+
// "regexp": "^(?:(?:Parse\\s+)?(Warning|[Ee]rror)(?:\\s+\\d+)?:)?\\s+(.*)$",
46+
"regexp": "^(?:(?:Parse\\s+)?(Warning|[Ee]rror)(?:\\s+\\(warning \\d+\\))?(?:\\s+\\d+)?:)?\\s+(.*)$",
47+
"severity": 1,
48+
"message": 2,
49+
"loop": true
50+
}
51+
]
3452
}
35-
]
3653
}
54+
]
3755
}

jscomp/core/config_whole_compiler.ml

Lines changed: 0 additions & 137 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#if OCAML_VERSION =~ ">4.03.0" then
21
(**************************************************************************)
32
(* *)
43
(* OCaml *)
@@ -184,139 +183,3 @@ let print_config oc =
184183

185184
flush oc;
186185
;;
187-
188-
#else
189-
(***********************************************************************)
190-
(* *)
191-
(* OCaml *)
192-
(* *)
193-
(* Xavier Leroy, projet Cristal, INRIA Rocquencourt *)
194-
(* *)
195-
(* Copyright 1996 Institut National de Recherche en Informatique et *)
196-
(* en Automatique. All rights reserved. This file is distributed *)
197-
(* under the terms of the Q Public License version 1.0. *)
198-
(* *)
199-
(***********************************************************************)
200-
201-
(***********************************************************************)
202-
(** **)
203-
(** WARNING WARNING WARNING **)
204-
(** **)
205-
(** When you change this file, you must make the parallel change **)
206-
(** in config.mlbuild **)
207-
(** **)
208-
(***********************************************************************)
209-
210-
211-
(* The main OCaml version string has moved to ../VERSION *)
212-
let version = "4.02.3+BS"
213-
let standard_library =
214-
Filename.concat (Filename.dirname Sys.executable_name) "ocaml"
215-
let standard_library_default = standard_library
216-
217-
let standard_runtime = "ocamlrun" (*dont care:path to ocamlrun*)
218-
let ccomp_type = "cc"(*dont care: cc or msvc*)
219-
let bytecomp_c_compiler = "gcc -O -Wall -D_FILE_OFFSET_BITS=64 -D_REENTRANT -O" (*dont care*)
220-
let bytecomp_c_libraries = "-lcurses -lpthread" (*dont care*)
221-
let native_c_compiler = "gcc -O -D_FILE_OFFSET_BITS=64 -D_REENTRANT" (*dont care*)
222-
let native_c_libraries = ""(*dont care*)
223-
let native_pack_linker = "ld -r -arch x86_64 -o"(*dont care*)
224-
let ranlib = "ranlib"(*dont care*)
225-
let ar = ""(*dont care*)
226-
let cc_profile = "-pg"(*dont care*)
227-
let mkdll = ""(*dont care*)
228-
let mkexe = ""(*dont care*)
229-
let mkmaindll = ""(*dont care*)
230-
231-
let exec_magic_number = "Caml1999X011"
232-
and cmi_magic_number = "Caml1999I017"
233-
and cmo_magic_number = "Caml1999O010"
234-
and cma_magic_number = "Caml1999A011"
235-
and cmx_magic_number = "Caml1999Y014"
236-
and cmxa_magic_number = "Caml1999Z013"
237-
and ast_impl_magic_number = "Caml1999M016"
238-
and ast_intf_magic_number = "Caml1999N015"
239-
and cmxs_magic_number = "Caml2007D002"
240-
and cmt_magic_number = "Caml2012T004"
241-
242-
let load_path = ref ([] : string list)
243-
244-
let interface_suffix = ref ".mli"
245-
246-
let max_tag = 245
247-
(* This is normally the same as in obj.ml, but we have to define it
248-
separately because it can differ when we're in the middle of a
249-
bootstrapping phase. *)
250-
let lazy_tag = 246
251-
252-
let max_young_wosize = 256
253-
let stack_threshold = 256 (* see byterun/config.h *)
254-
255-
let architecture = "amd64" (*dont care*)
256-
let model = "default"(*dont care*)
257-
let system = "macosx"
258-
259-
let asm = "clang -arch x86_64 -c"
260-
let asm_cfi_supported = false (*dont care*)
261-
let with_frame_pointers = false (*dontcare*)
262-
263-
let ext_obj = ".o" (*dont care*)
264-
let ext_asm = ".s" (*dont care*)
265-
let ext_lib = ".a" (*dont caer*)
266-
let ext_dll = ".a" (*dont care*)
267-
268-
let host = "%%HOST%%"
269-
let target = "%%TARGET%%"
270-
271-
let default_executable_name =
272-
""
273-
274-
let systhread_supported = false (*dontcare*);;
275-
276-
let print_config oc =
277-
let p name valu = Printf.fprintf oc "%s: %s\n" name valu in
278-
let p_bool name valu = Printf.fprintf oc "%s: %B\n" name valu in
279-
p "version" version;
280-
p "standard_library_default" standard_library_default;
281-
p "standard_library" standard_library;
282-
p "standard_runtime" standard_runtime;
283-
p "ccomp_type" ccomp_type;
284-
p "bytecomp_c_compiler" bytecomp_c_compiler;
285-
p "bytecomp_c_libraries" bytecomp_c_libraries;
286-
p "native_c_compiler" native_c_compiler;
287-
p "native_c_libraries" native_c_libraries;
288-
p "native_pack_linker" native_pack_linker;
289-
p "ranlib" ranlib;
290-
p "cc_profile" cc_profile;
291-
p "architecture" architecture;
292-
p "model" model;
293-
p "system" system;
294-
p "asm" asm;
295-
p_bool "asm_cfi_supported" asm_cfi_supported;
296-
p_bool "with_frame_pointers" with_frame_pointers;
297-
p "ext_obj" ext_obj;
298-
p "ext_asm" ext_asm;
299-
p "ext_lib" ext_lib;
300-
p "ext_dll" ext_dll;
301-
p "os_type" Sys.os_type;
302-
p "default_executable_name" default_executable_name;
303-
p_bool "systhread_supported" systhread_supported;
304-
p "host" host;
305-
p "target" target;
306-
307-
(* print the magic number *)
308-
p "exec_magic_number" exec_magic_number;
309-
p "cmi_magic_number" cmi_magic_number;
310-
p "cmo_magic_number" cmo_magic_number;
311-
p "cma_magic_number" cma_magic_number;
312-
p "cmx_magic_number" cmx_magic_number;
313-
p "cmxa_magic_number" cmxa_magic_number;
314-
p "ast_impl_magic_number" ast_impl_magic_number;
315-
p "ast_intf_magic_number" ast_intf_magic_number;
316-
p "cmxs_magic_number" cmxs_magic_number;
317-
p "cmt_magic_number" cmt_magic_number;
318-
319-
flush oc;
320-
;;
321-
322-
#end

jscomp/core/config_whole_compiler.mli

Lines changed: 0 additions & 133 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#if OCAML_VERSION =~ ">4.03" then
21
(**************************************************************************)
32
(* *)
43
(* OCaml *)
@@ -184,135 +183,3 @@ val windows_unicode: bool
184183
val afl_instrument : bool
185184
(* Whether afl-fuzz instrumentation is generated by default *)
186185

187-
#else
188-
(***********************************************************************)
189-
(* *)
190-
(* OCaml *)
191-
(* *)
192-
(* Xavier Leroy, projet Cristal, INRIA Rocquencourt *)
193-
(* *)
194-
(* Copyright 1996 Institut National de Recherche en Informatique et *)
195-
(* en Automatique. All rights reserved. This file is distributed *)
196-
(* under the terms of the Q Public License version 1.0. *)
197-
(* *)
198-
(***********************************************************************)
199-
200-
(* System configuration *)
201-
202-
val version: string
203-
(* The current version number of the system *)
204-
205-
val standard_library: string
206-
(* The directory containing the standard libraries *)
207-
val standard_runtime: string
208-
(* The full path to the standard bytecode interpreter ocamlrun *)
209-
val ccomp_type: string
210-
(* The "kind" of the C compiler, assembler and linker used: one of
211-
"cc" (for Unix-style C compilers)
212-
"msvc" (for Microsoft Visual C++ and MASM) *)
213-
val bytecomp_c_compiler: string
214-
(* The C compiler to use for compiling C files
215-
with the bytecode compiler *)
216-
val bytecomp_c_libraries: string
217-
(* The C libraries to link with custom runtimes *)
218-
val native_c_compiler: string
219-
(* The C compiler to use for compiling C files
220-
with the native-code compiler *)
221-
val native_c_libraries: string
222-
(* The C libraries to link with native-code programs *)
223-
val native_pack_linker: string
224-
(* The linker to use for packaging (ocamlopt -pack) and for partial
225-
links (ocamlopt -output-obj). *)
226-
val mkdll: string
227-
(* The linker command line to build dynamic libraries. *)
228-
val mkexe: string
229-
(* The linker command line to build executables. *)
230-
val mkmaindll: string
231-
(* The linker command line to build main programs as dlls. *)
232-
val ranlib: string
233-
(* Command to randomize a library, or "" if not needed *)
234-
val ar: string
235-
(* Name of the ar command, or "" if not needed (MSVC) *)
236-
val cc_profile : string
237-
(* The command line option to the C compiler to enable profiling. *)
238-
239-
val load_path: string list ref
240-
(* Directories in the search path for .cmi and .cmo files *)
241-
242-
val interface_suffix: string ref
243-
(* Suffix for interface file names *)
244-
245-
val exec_magic_number: string
246-
(* Magic number for bytecode executable files *)
247-
val cmi_magic_number: string
248-
(* Magic number for compiled interface files *)
249-
val cmo_magic_number: string
250-
(* Magic number for object bytecode files *)
251-
val cma_magic_number: string
252-
(* Magic number for archive files *)
253-
val cmx_magic_number: string
254-
(* Magic number for compilation unit descriptions *)
255-
val cmxa_magic_number: string
256-
(* Magic number for libraries of compilation unit descriptions *)
257-
val ast_intf_magic_number: string
258-
(* Magic number for file holding an interface syntax tree *)
259-
val ast_impl_magic_number: string
260-
(* Magic number for file holding an implementation syntax tree *)
261-
val cmxs_magic_number: string
262-
(* Magic number for dynamically-loadable plugins *)
263-
val cmt_magic_number: string
264-
(* Magic number for compiled interface files *)
265-
266-
val max_tag: int
267-
(* Biggest tag that can be stored in the header of a regular block. *)
268-
val lazy_tag : int
269-
(* Normally the same as Obj.lazy_tag. Separate definition because
270-
of technical reasons for bootstrapping. *)
271-
val max_young_wosize: int
272-
(* Maximal size of arrays that are directly allocated in the
273-
minor heap *)
274-
val stack_threshold: int
275-
(* Size in words of safe area at bottom of VM stack,
276-
see byterun/config.h *)
277-
278-
val architecture: string
279-
(* Name of processor type for the native-code compiler *)
280-
val model: string
281-
(* Name of processor submodel for the native-code compiler *)
282-
(* val system: string *)
283-
(* Name of operating system for the native-code compiler *)
284-
285-
val asm: string
286-
(* The assembler (and flags) to use for assembling
287-
ocamlopt-generated code. *)
288-
289-
val asm_cfi_supported: bool
290-
(* Whether assembler understands CFI directives *)
291-
val with_frame_pointers : bool
292-
(* Whether assembler should maintain frame pointers *)
293-
294-
val ext_obj: string
295-
(* Extension for object files, e.g. [.o] under Unix. *)
296-
val ext_asm: string
297-
(* Extension for assembler files, e.g. [.s] under Unix. *)
298-
val ext_lib: string
299-
(* Extension for library files, e.g. [.a] under Unix. *)
300-
val ext_dll: string
301-
(* Extension for dynamically-loaded libraries, e.g. [.so] under Unix.*)
302-
303-
val default_executable_name: string
304-
(* Name of executable produced by linking if none is given with -o,
305-
e.g. [a.out] under Unix. *)
306-
307-
val systhread_supported : bool
308-
(* Whether the system thread library is implemented *)
309-
310-
(* val host : string *)
311-
(* Whether the compiler is a cross-compiler *)
312-
313-
(* val target : string *)
314-
(* Whether the compiler is a cross-compiler *)
315-
316-
val print_config : out_channel -> unit;;
317-
318-
#end

0 commit comments

Comments
 (0)