diff options
author | alainfrisch <alain@frisch.fr> | 2015-12-01 13:12:50 +0100 |
---|---|---|
committer | alainfrisch <alain@frisch.fr> | 2015-12-01 13:12:50 +0100 |
commit | 10e44a149ec9a68d6be02ea2598566a69530641b (patch) | |
tree | 286cd84e611c2b3cbbe9fdf086c7110b0b0aaa39 | |
parent | 0f901d769ad471710162ab69e7fd69cafc1ba718 (diff) | |
download | ocaml-flambda_trunk.tar.gz |
Some fixes, in particular for Windows.flambda_trunk
-rw-r--r-- | Makefile.nt | 4 | ||||
-rwxr-xr-x | Makefile.shared | 4 | ||||
-rw-r--r-- | asmcomp/i386/selection.ml | 2 | ||||
-rw-r--r-- | middle_end/closure_conversion.ml | 5 | ||||
-rw-r--r-- | tools/Makefile.nt | 4 |
5 files changed, 12 insertions, 7 deletions
diff --git a/Makefile.nt b/Makefile.nt index 1f12f98865..1dc860257e 100644 --- a/Makefile.nt +++ b/Makefile.nt @@ -232,8 +232,8 @@ partialclean:: # The native-code compiler -compilerlibs/ocamloptcomp.cma: $(ASMCOMP) - $(CAMLC) -a -o $@ $(ASMCOMP) +compilerlibs/ocamloptcomp.cma: $(MIDDLE_END) $(ASMCOMP) + $(CAMLC) -a -o $@ $(MIDDLE_END) $(ASMCOMP) partialclean:: rm -f compilerlibs/ocamloptcomp.cma diff --git a/Makefile.shared b/Makefile.shared index 6df3e35542..16aad7ed23 100755 --- a/Makefile.shared +++ b/Makefile.shared @@ -19,7 +19,7 @@ include stdlib/StdlibModules CAMLC=$(CAMLRUN) boot/ocamlc -g -nostdlib -I boot
CAMLOPT=$(CAMLRUN) ./ocamlopt -g -nostdlib -I stdlib -I otherlibs/dynlink
-COMPFLAGS=-strict-sequence -w +33..39+48+50 -warn-error A -bin-annot \
+COMPFLAGS=-strict-sequence -w -30-40+33..39+48+50 -warn-error A -bin-annot \
-safe-string $(INCLUDES)
LINKFLAGS=
@@ -195,5 +195,3 @@ NATTOPOBJS=$(UTILS) $(PARSING) $(TYPING) $(COMP) $(MIDDLE_END) $(ASMCOMP) \ toplevel/opttopmain.cmo toplevel/opttopstart.cmo
PERVASIVES=$(STDLIB_MODULES) outcometree topdirs toploop
-
-
diff --git a/asmcomp/i386/selection.ml b/asmcomp/i386/selection.ml index be76b2c61f..e4d5ecebb3 100644 --- a/asmcomp/i386/selection.ml +++ b/asmcomp/i386/selection.ml @@ -215,7 +215,7 @@ method! select_operation op args = self#select_floatarith Idivf (Ispecific Idivfrev) Ifloatdiv Ifloatdivrev args (* Recognize store instructions *) - | Cstore (Word_int | Word_val as chunk) -> + | Cstore ((Word_int | Word_val as chunk, _init)) -> begin match args with [loc; Cop(Caddi, [Cop(Cload _, [loc']); Cconst_int n])] when loc = loc' -> diff --git a/middle_end/closure_conversion.ml b/middle_end/closure_conversion.ml index 581c57c624..2cc98e6ea5 100644 --- a/middle_end/closure_conversion.ml +++ b/middle_end/closure_conversion.ml @@ -16,6 +16,10 @@ module Function_decls = Closure_conversion_aux.Function_decls module Function_decl = Function_decls.Function_decl module IdentSet = Lambda.IdentSet +let truncate_if_needed s = + if String.length s > 48 then String.sub s 0 48 ^ Digest.to_hex (Digest.string s) + else s + let name_expr = Flambda_utils.name_expr type t = { @@ -196,6 +200,7 @@ let rec close t env (lam : Lambda.lambda) : Flambda.t = String.concat "_and_" (List.map (fun (id, _) -> Ident.unique_name id) defs) in + let name = truncate_if_needed name in let set_of_closures_var = Variable.create name in let set_of_closures = close_functions t env (Function_decls.create function_declarations) diff --git a/tools/Makefile.nt b/tools/Makefile.nt index ed9b35946d..15c4e796fb 100644 --- a/tools/Makefile.nt +++ b/tools/Makefile.nt @@ -15,7 +15,9 @@ include Makefile.shared # To make custom toplevels OCAMLMKTOP=ocamlmktop.cmo -OCAMLMKTOP_IMPORTS=misc.cmo config.cmo clflags.cmo ccomp.cmo +OCAMLMKTOP_IMPORTS=\ + misc.cmo ext_types.cmo arg_helper.cmo \ + config.cmo clflags.cmo ccomp.cmo ocamlmktop: $(OCAMLMKTOP) $(CAMLC) $(LINKFLAGS) -o ocamlmktop $(OCAMLMKTOP_IMPORTS) $(OCAMLMKTOP) |