HongboZhang avatar HongboZhang committed 41d2f47 Merge

merge lemma

Comments (0)

Files changed (24)

-4.01.0+dev4_2012-07-26
+4.01.0+dev5_2012-07-27
 
 # The version string is the first line of this file.
 # It must be in the format described in stdlib/sys.mli

bytecomp/bytelibrarian.ml

 
 (* Add C objects and options and "custom" info from a library descriptor *)
 
-(* let lib_sharedobjs = ref [] *)
+
 let lib_ccobjs = ref []
 let lib_ccopts = ref []
 let lib_dllibs = ref []

experimental/frisch/ast_mapper.ml

   let package ?loc a b = mk ?loc (Ptyp_package (a, b))
 
   let field_type ?(loc = Location.none) x = {pfield_desc = x; pfield_loc = loc}
-  let field ?loc s t = field_type ?loc (Pfield (s, t))
+  let field ?loc s t =
+    let t =
+      (* The type-checker expects the field to be a Ptyp_poly. Maybe
+         it should wrap the type automatically... *)
+      match t.ptyp_desc with
+      | Ptyp_poly _ -> t
+      | _ -> poly ?loc [] t
+    in
+    field_type ?loc (Pfield (s, t))
   let field_var ?loc () = field_type ?loc Pfield_var
 
   let core_field_type sub = function
 .I command
 as a preprocessor for each source file.
 .TP
+.BI \-ppx \ command
+Pipe abstract syntax tree through preprocessor
+.IR command .
+.TP
 .B \-slash
 Under Unix, this option does nothing.
 .TP

testsuite/makefiles/Makefile.common

 DIFF=diff -q
 BOOTDIR=$(TOPDIR)/boot
 OCAMLRUN=$(BOOTDIR)/ocamlrun$(EXE)
-OCAML=$(OCAMLRUN) $(TOPDIR)/ocaml$(EXE) -I $(TOPDIR)/stdlib
-OCAMLC=$(OCAMLRUN) $(TOPDIR)/ocamlc$(EXE) -I $(TOPDIR)/stdlib
-OCAMLOPT=$(OCAMLRUN) $(TOPDIR)/ocamlopt$(EXE) -I $(TOPDIR)/stdlib
-OCAMLDOC=$(OCAMLRUN) $(TOPDIR)/ocamldoc/ocamldoc$(EXE)
-OCAMLLEX=$(OCAMLRUN) $(TOPDIR)/lex/ocamllex$(EXE)
-OCAMLMKLIB=$(OCAMLRUN) $(TOPDIR)/tools/ocamlmklib$(EXE)
+OCAML=$(OCAMLRUN) $(TOPDIR)/ocaml -I $(TOPDIR)/stdlib
+OCAMLC=$(OCAMLRUN) $(TOPDIR)/ocamlc -I $(TOPDIR)/stdlib
+OCAMLOPT=$(OCAMLRUN) $(TOPDIR)/ocamlopt -I $(TOPDIR)/stdlib
+OCAMLDOC=$(OCAMLRUN) $(TOPDIR)/ocamldoc/ocamldoc
+OCAMLLEX=$(OCAMLRUN) $(TOPDIR)/lex/ocamllex
+OCAMLMKLIB=$(OCAMLRUN) $(TOPDIR)/tools/ocamlmklib
 OCAMLYACC=$(TOPDIR)/yacc/ocamlyacc$(EXE)
 OCAMLBUILD=$(TOPDIR)/_build/ocamlbuild/ocamlbuild.native
-DUMPOBJ=$(OCAMLRUN) $(TOPDIR)/tool/dumpobj$(EXE)
+DUMPOBJ=$(OCAMLRUN) $(TOPDIR)/tool/dumpobj
 BYTECODE_ONLY=`if [ "$(ARCH)" = "none" -o "$(ASM)" = "none" ]; then echo 'YES'; else echo ''; fi`
 #COMPFLAGS=
 #FORTRAN_COMPILER=

testsuite/makefiles/Makefile.one

 	@for file in $(C_FILES); do \
 	  $(NATIVECC) $(NATIVECCCOMPOPTS) -c -I$(TOPDIR)/byterun $$file.c; \
 	done;
+	@rm -f program.byte program.byte.exe
 	@$(OCAMLC) $(ADD_COMPFLAGS) $(ADD_CFLAGS) -o program.byte $(O_FILES) $(CMA_FILES) $(CMO_FILES) $(ADD_CMO_FILES) $(MAIN_MODULE).cmo
 	@if [ -z "$(BYTECODE_ONLY)" ]; then \
+	  rm -f program.native program.native.exe; \
 	  $(MAKE) $(CMX_FILES) $(MAIN_MODULE).cmx; \
 	  $(OCAMLOPT) $(ADD_COMPFLAGS) -o program.native $(O_FILES) $(CMXA_FILES) $(CMX_FILES) $(ADD_CMX_FILES) $(MAIN_MODULE).cmx; \
 	fi

testsuite/makefiles/Makefile.several

 
 run-file:
 	@printf " $(DESC)"
+	@rm -f program program.exe
 	@$(COMP) $(COMPFLAGS) $(FILE) -o program
 	@if [ -f `basename $(FILE) ml`runner ]; then \
 	  sh `basename $(FILE) ml`runner; \
 	else \
 	  ./program $(PROGRAM_ARGS) > `basename $(FILE) ml`result; \
-	fi
+	fi || (echo " => failed" && exit 1)
 	@if [ -f `basename $(FILE) ml`checker ]; then \
 	  sh `basename $(FILE) ml`checker; \
 	else \
-	  $(DIFF) `basename $(FILE) ml`reference `basename $(FILE) ml`result > /dev/null || (echo " => failed" && exit 1); \
-	fi
+	  $(DIFF) `basename $(FILE) ml`reference `basename $(FILE) ml`result > /dev/null; \
+	fi || (echo " => failed" && exit 1)
 
 promote: defaultpromote
 
 clean: defaultclean
-	@rm -f *.result ./program
+	@rm -f *.result ./program program.exe

testsuite/tests/basic-io-2/io.ml

 (* File copy with constant-sized chunks *)
 
 let copy_file sz infile ofile =
-  let ic = open_in infile in
-  let oc = open_out ofile in
+  let ic = open_in_bin infile in
+  let oc = open_out_bin ofile in
   let buffer = String.create sz in
   let rec copy () =
     let n = input ic buffer 0 sz in
 (* File copy with random-sized chunks *)
 
 let copy_random sz infile ofile =
-  let ic = open_in infile in
-  let oc = open_out ofile in
+  let ic = open_in_bin infile in
+  let oc = open_out_bin ofile in
   let buffer = String.create sz in
   let rec copy () =
     let s = 1 + Random.int sz in
 (* File copy line per line *)
 
 let copy_line infile ofile =
-  let ic = open_in infile in
-  let oc = open_out ofile in
+  let ic = open_in_bin infile in
+  let oc = open_out_bin ofile in
   try
     while true do
       output_string oc (input_line ic); output_char oc '\n'
 (* Create long lines of text *)
 
 let make_lines ofile =
-  let oc = open_out ofile in
+  let oc = open_out_bin ofile in
   for i = 1 to 256 do
     output_string oc (String.make (i*64) '.'); output_char oc '\n'
   done;

testsuite/tests/basic/bigints.ml

 let _ =
-  print_int 1000000000; print_newline();
-  print_int 10000000000; print_newline();
-  print_int 100000000000; print_newline();
-  print_int 1000000000000; print_newline();
-  print_int 10000000000000; print_newline();
-  print_int 100000000000000; print_newline();
-  print_int 1000000000000000; print_newline();
-  print_int 10000000000000000; print_newline();
-  print_int 100000000000000000; print_newline();
-  print_int 1000000000000000000; print_newline()
-
+  match Sys.word_size with
+  | 32 ->
+     print_int (1 * 1000000000); print_newline();
+     print_string "10000000000"; print_newline();
+     print_string "100000000000"; print_newline();
+     print_string "1000000000000"; print_newline();
+     print_string "10000000000000"; print_newline();
+     print_string "100000000000000"; print_newline();
+     print_string "1000000000000000"; print_newline();
+     print_string "10000000000000000"; print_newline();
+     print_string "100000000000000000"; print_newline();
+     print_string "1000000000000000000"; print_newline();
+  | 64 ->
+     print_int (1 * 1000000000); print_newline();
+     print_int (10 * 1000000000); print_newline();
+     print_int (100 * 1000000000); print_newline();
+     print_int (1000 * 1000000000); print_newline();
+     print_int (10000 * 1000000000); print_newline();
+     print_int (100000 * 1000000000); print_newline();
+     print_int (1000000 * 1000000000); print_newline();
+     print_int (10000000 * 1000000000); print_newline();
+     print_int (100000000 * 1000000000); print_newline();
+     print_int (1000000000 * 1000000000); print_newline()
+  | _ -> assert false

testsuite/tests/lib-hashtbl/htbl.ml

   TSP.test (pair_data d);
   printf "-- Lists of strings\n%!";
   TSL.test (list_data d)
- 
+

testsuite/tests/lib-scanf/.ignore

+tscanf_data

testsuite/tests/lib-scanf/tscanf_data

-"Objective" -> "Caml";

testsuite/tests/lib-threads/test1.checker

-sort test1.result | diff -q test1.reference -
+LC_ALL=C sort test1.result | diff -q test1.reference -

testsuite/tests/lib-threads/test4.checker

-sort -u test4.result | diff -q test4.reference -
+LC_ALL=C sort -u test4.result | diff -q test4.reference -

testsuite/tests/lib-threads/test5.checker

-sort -u test5.result | diff -q test5.reference -
+LC_ALL=C sort -u test5.result | diff -q test5.reference -

testsuite/tests/lib-threads/test6.checker

-sort -u test6.result | diff -q test6.reference -
+LC_ALL=C sort -u test6.result | diff -q test6.reference -

testsuite/tests/lib-threads/testA.checker

-sort testA.result | diff -q testA.reference -
+LC_ALL=C sort testA.result | diff -q testA.reference -

testsuite/tests/lib-threads/testexit.checker

-sort testexit.result | diff -q testexit.reference -
+LC_ALL=C sort testexit.result | diff -q testexit.reference -

testsuite/tests/lib-threads/testsignal2.runner

 sleep 3
 kill -INT $pid
 sleep 1
-kill -9 $pid || true
+kill -9 $pid 2>&- || true

testsuite/tests/tool-ocamldoc/Makefile

 CUSTOM_MODULE=odoc_test
 ADD_COMPFLAGS=-I +ocamldoc
 
+DIFF_OPT=--strip-trailing-cr
+#DIFF_OPT=-b
+
 run: $(CUSTOM_MODULE).cmo
 	@for file in t*.ml; do \
 	  printf " ... testing '$$file'"; \
 	  $(OCAMLDOC) -hide-warnings -g $(CUSTOM_MODULE).cmo -o `basename $$file ml`result $$file; \
-	  $(DIFF) `basename $$file ml`reference `basename $$file ml`result > /dev/null && echo " => passed" || (echo " => failed" && exit 1); \
+	  $(DIFF) $(DIFF_OPT) `basename $$file ml`reference `basename $$file ml`result > /dev/null && echo " => passed" || (echo " => failed" && exit 1); \
 	done;
 	@$(OCAMLDOC) -hide-warnings -html t*.ml 2>&1 | grep -v test_types_display || true
 	@$(OCAMLDOC) -hide-warnings -latex t*.ml 2>&1 | grep -v test_types_display || true

testsuite/tests/tool-ocamldoc/odoc_test.ml

       method generate = inst#generate
     end
   end in
-  Odoc_args.set_generator (Odoc_gen.Other (module My_generator : Odoc_gen.Base))
+  Odoc_args.set_generator (Odoc_gen.Base (module My_generator : Odoc_gen.Base))
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.