Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fusion de la version 3.10.0
git-svn-id: svn+ssh://yquem.inria.fr/net/yquem/devel/caml/svn/ocaml/trunk@8416 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
  • Loading branch information
doligez committed Oct 8, 2007
1 parent d78f42a commit 8a6c3b2
Show file tree
Hide file tree
Showing 168 changed files with 17,988 additions and 14,406 deletions.
15 changes: 9 additions & 6 deletions Changes
Expand Up @@ -8,21 +8,23 @@ Standard library:
Objective Caml 3.10.0:
----------------------

(Changes that can break existing programs are marked with a "*" )

Language features:
- Added virtual instance variables in classes "val virtual v : t"
- Changed the behaviour of instance variable overriding; the new
* Changed the behaviour of instance variable overriding; the new
definition replaces the old one, rather than creating a new
variable.

New tools:
- ocamlbuild: compilation manager for OCaml applications and libraries.
See description in reference manual.
- Camlp4: heavily revised implementation, new API.
See draft documentation at http://gallium.inria.fr/~pouillar/
* Camlp4: heavily revised implementation, new API.

New ports:
- MacOSX PowerPC 64 bits.
- MS Windows 32 bits using the Visual Studio 2005 toolchain.
- MacOS X PowerPC 64 bits.
- MS Windows 64 bits (x64) using the Microsoft PSDK toolchain.
- MS Windows 32 bits using the Visual Studio 2005 toolchain.

Compilers:
- Faster type-checking of functor applications.
Expand Down Expand Up @@ -72,8 +74,9 @@ Other libraries:
better handling of channels opened on sockets (PR#4098);
fixed GC bug in Unix.system (PR#4112).

OCamldoc:
Documentation generator (OCamldoc):
- correctly handle '?' in value names (PR#4215)
- new option -hide-warnings not to print ocamldoc warnings

Lexer generator (ocamllex): improved error reporting.

Expand Down
15 changes: 7 additions & 8 deletions Makefile
Expand Up @@ -145,7 +145,7 @@ coreboot:
$(MAKE) promote-cross
# Rebuild ocamlc and ocamllex (run on byterun/ocamlrun)
$(MAKE) partialclean
$(MAKE) ocamlc ocamllex
$(MAKE) ocamlc ocamllex ocamltools
# Rebuild the library (using byterun/ocamlrun ./ocamlc)
$(MAKE) library-cross
# Promote the new compiler and the new runtime
Expand Down Expand Up @@ -189,7 +189,7 @@ backup:
mkdir boot/Saved
mv boot/Saved.prev boot/Saved/Saved.prev
cp boot/ocamlrun$(EXE) boot/Saved
mv boot/ocamlc boot/ocamllex boot/ocamlyacc$(EXE) boot/Saved
mv boot/ocamlc boot/ocamllex boot/ocamlyacc$(EXE) boot/ocamldep boot/Saved
cd boot; cp $(LIBFILES) Saved

# Promote the newly compiled system to the rank of cross compiler
Expand All @@ -198,6 +198,7 @@ promote-cross:
cp ocamlc boot/ocamlc
cp lex/ocamllex boot/ocamllex
cp yacc/ocamlyacc$(EXE) boot/ocamlyacc$(EXE)
cp tools/ocamldep boot/ocamldep
cd stdlib; cp $(LIBFILES) ../boot

# Promote the newly compiled system to the rank of bootstrap compiler
Expand All @@ -213,7 +214,7 @@ restore:

# Check if fixpoint reached
compare:
@if cmp boot/ocamlc ocamlc && cmp boot/ocamllex lex/ocamllex; \
@if cmp boot/ocamlc ocamlc && cmp boot/ocamllex lex/ocamllex && cmp boot/ocamldep tools/ocamldep; \
then echo "Fixpoint reached, bootstrap succeeded."; \
else echo "Fixpoint not reached, try one more bootstrapping cycle."; \
fi
Expand Down Expand Up @@ -261,7 +262,7 @@ install: FORCE
if test -f debugger/ocamldebug; then (cd debugger; $(MAKE) install); \
else :; fi
cp config/Makefile $(LIBDIR)/Makefile.config
./build/partial-install.sh
BINDIR=$(BINDIR) LIBDIR=$(LIBDIR) PREFIX=$(PREFIX) ./build/partial-install.sh

# Installation of the native-code compiler
installopt:
Expand Down Expand Up @@ -609,21 +610,19 @@ camlp4out: ocamlc otherlibraries ocamlbuild-partial-boot ocamlbuild.byte
./build/camlp4-byte-only.sh
camlp4opt: ocamlopt otherlibrariesopt ocamlbuild-partial-boot ocamlbuild.native
./build/camlp4-native-only.sh
partialclean::
rm -rf _build/camlp4

# Ocamlbuild

ocamlbuild.byte: ocamlc otherlibraries ocamlbuild-partial-boot
./build/ocamlbuild-byte-only.sh
ocamlbuild.native: ocamlopt otherlibrariesopt ocamlbuild-partial-boot
./build/ocamlbuild-native-only.sh
partialclean::
rm -rf _build/ocamlbuild

.PHONY: ocamlbuild-partial-boot
ocamlbuild-partial-boot:
./build/partial-boot.sh
partialclean::
rm -rf _build

# Check that the stack limit is reasonable.

Expand Down
12 changes: 6 additions & 6 deletions Makefile.nt
Expand Up @@ -131,7 +131,7 @@ bootstrap:
$(MAKEREC) promote-cross
# Rebuild ocamlc and ocamllex (run on byterun/ocamlrun)
$(MAKEREC) partialclean
$(MAKEREC) ocamlc ocamllex
$(MAKEREC) ocamlc ocamllex ocamltools
# Rebuild the library (using byterun/ocamlrun ./ocamlc)
$(MAKEREC) library-cross
# Promote the new compiler and the new runtime
Expand Down Expand Up @@ -166,7 +166,7 @@ backup:
mkdir boot/Saved
mv boot/Saved.prev boot/Saved/Saved.prev
cp boot/ocamlrun.exe boot/Saved/ocamlrun.exe
cd boot ; mv ocamlc ocamllex ocamlyacc.exe Saved
cd boot ; mv ocamlc ocamllex ocamldep ocamlyacc.exe Saved
cd boot ; cp $(LIBFILES) Saved

# Promote the newly compiled system to the rank of cross compiler
Expand All @@ -175,6 +175,7 @@ promote-cross:
cp ocamlc boot/ocamlc
cp lex/ocamllex boot/ocamllex
cp yacc/ocamlyacc.exe boot/ocamlyacc.exe
cp tools/ocamldep boot/ocamldep
cd stdlib ; cp $(LIBFILES) ../boot

# Promote the newly compiled system to the rank of bootstrap compiler
Expand All @@ -192,6 +193,7 @@ restore:
compare:
- cmp -i 4096 boot/ocamlc ocamlc
- cmp -i 4096 boot/ocamllex lex/ocamllex
- cmp -i 4096 boot/ocamldep tools/ocamldep

# Remove old bootstrap compilers
cleanboot:
Expand Down Expand Up @@ -568,21 +570,19 @@ camlp4out: ocamlc otherlibraries ocamlbuild-partial-boot ocamlbuild.byte
./build/camlp4-byte-only.sh
camlp4opt: ocamlopt otherlibrariesopt ocamlbuild-partial-boot ocamlbuild.native
./build/camlp4-native-only.sh
partialclean::
rm -rf _build/camlp4

# Ocamlbuild

ocamlbuild.byte: ocamlc otherlibraries ocamlbuild-partial-boot
./build/ocamlbuild-byte-only.sh
ocamlbuild.native: ocamlopt otherlibrariesopt ocamlbuild-partial-boot
./build/ocamlbuild-native-only.sh
partialclean::
rm -rf _build/ocamlbuild

.PHONY: ocamlbuild-partial-boot
ocamlbuild-partial-boot:
./build/partial-boot.sh
partialclean::
rm -rf _build

# The Win32 toplevel GUI

Expand Down
2 changes: 1 addition & 1 deletion VERSION
@@ -1,4 +1,4 @@
3.11+dev3 (2007-10-04)
3.11+dev4 (2007-10-08)

# The version string is the first line of this file.
# It must be in the format described in stdlib/sys.mli
Expand Down
22 changes: 15 additions & 7 deletions _tags
Expand Up @@ -3,31 +3,41 @@
true: -traverse

# Traverse only these directories
<{bytecomp,driver,stdlib,tools,asmcomp,camlp4,ocamlbuild,toplevel,ocamldoc,typing,otherlibs,utils,debugger,lex,parsing,byterun}/**>: traverse
<{bytecomp,driver,stdlib,tools,asmcomp,camlp4,ocamlbuild,toplevel,ocamldoc,typing,otherlibs,utils,debugger,lex,parsing,byterun,asmrun}/**>: traverse

"boot" or "byterun": not_hygienic
"boot" or "byterun" or "asmrun": not_hygienic

# These should not be required but it fails on *BSD and Windows...
"yacc" or "asmrun" or "win32caml": not_hygienic
"yacc" or "win32caml": not_hygienic

# We want -g everywhere it's possible
true: debug

# By default everything we link needs the stdlib
true: use_stdlib

# The stdlib don't require the stdlib
<stdlib/**>: -use_stdlib

<**/*.ml*>: warn_Alez

"toplevel/topstart.byte": linkall

<ocamldoc/**>: -debug
<ocamldoc/*.ml>: ocamldoc_sources
<ocamldoc/*.ml*>: include_unix, include_str, include_dynlink
"ocamldoc/odoc.byte": use_unix, use_str, use_dynlink
"ocamldoc/odoc_opt.native": use_unix, use_str

<camlp4/**>: debug
<camlp4/**/*.ml*>: camlp4boot, -warn_Alez, warn_Ale
<camlp4/Camlp4_config.ml*>: -camlp4boot
<camlp4/build/*> or <camlp4/boot/*> or "camlp4/Camlp4/Struct/Lexer.ml": -camlp4boot, -warn_Ale, warn_a, -debug
<camlp4/build/*> or <camlp4/boot/*> or "camlp4/Camlp4/Struct/Lexer.ml": -camlp4boot, -warn_Ale, warn_a
"camlp4/Camlp4Bin.byte" or "camlp4/mkcamlp4.byte" or "camlp4/camlp4lib.cma": use_dynlink
"camlp4/Camlp4/Printers/OCaml.ml" or "camlp4/Camlp4/Printers/OCamlr.ml": warn_Alezv
<camlp4/Camlp4Printers/**.ml>: include_unix
"camlp4/Camlp4/Struct/DynLoader.ml": include_dynlink
<camlp4/Camlp4Top/**>: include_toplevel
<camlp4/camlp4{,boot,o,r,of,rf,oof,orf}.byte>: -debug

<ocamlbuild/*>: -warn_Alez, include_unix

Expand All @@ -52,8 +62,6 @@ true: -traverse
# See the remark about static linking of threads.cmxa in myocamlbuild.ml
<otherlibs/systhreads/threads.cma>: ocamlmklib

<**/*.ml{,i}>: include_stdlib
"otherlibs/threads/unix.ml" or "otherlibs/threads/marshal.ml": -include_stdlib, include_threads_stdlib
"otherlibs/threads/pervasives.ml": include_unix

<otherlibs/**>: otherlibs
Expand Down
2 changes: 1 addition & 1 deletion asmcomp/i386/emit.mlp
Expand Up @@ -979,7 +979,7 @@ let end_assembly() =
efa_word = (fun n -> ` .long {emit_int n}\n`);
efa_align = emit_align;
efa_label_rel = (fun lbl ofs ->
` .long ({emit_label lbl} - .) + {emit_int32 ofs}\n`);
` .long {emit_label lbl} - . + {emit_int32 ofs}\n`);
efa_def_label = (fun l -> `{emit_label l}:\n`);
efa_string = (fun s ->
let s = s ^ "\000" in
Expand Down
35 changes: 9 additions & 26 deletions asmcomp/power/emit.mlp
Expand Up @@ -312,12 +312,6 @@ let tailrec_entry_point = ref 0
let defined_functions = ref StringSet.empty
(* Label of glue code for calling the GC *)
let call_gc_label = ref 0
(* Label of jump table *)
let lbl_jumptbl = ref 0
(* List of all labels in jumptable (reverse order) *)
let jumptbl_entries = ref []
(* Number of jumptable entries *)
let num_jumptbl_entries = ref 0

(* Fixup conditional branches that exceed hardware allowed range *)

Expand Down Expand Up @@ -746,19 +740,20 @@ let rec emit_instr i dslot =
| Some lbl -> ` bgt {emit_label lbl}\n`
end
| Lswitch jumptbl ->
if !lbl_jumptbl = 0 then lbl_jumptbl := new_label();
` addis {emit_gpr 11}, 0, {emit_upper emit_label !lbl_jumptbl}\n`;
` addi {emit_gpr 11}, {emit_gpr 11}, {emit_lower emit_label !lbl_jumptbl}\n`;
` addi {emit_gpr 0}, {emit_reg i.arg.(0)}, {emit_int !num_jumptbl_entries}\n`;
` {emit_string slgi} {emit_gpr 0}, {emit_gpr 0}, 2\n`;
let lbl = new_label() in
` addis {emit_gpr 11}, 0, {emit_upper emit_label lbl}\n`;
` addi {emit_gpr 11}, {emit_gpr 11}, {emit_lower emit_label lbl}\n`;
` {emit_string slgi} {emit_gpr 0}, {emit_reg i.arg.(0)}, 2\n`;
` {emit_string lwa}x {emit_gpr 0}, {emit_gpr 11}, {emit_gpr 0}\n`;
` add {emit_gpr 0}, {emit_gpr 11}, {emit_gpr 0}\n`;
` mtctr {emit_gpr 0}\n`;
` bctr\n`;
emit_string rodata_space;
`{emit_label lbl}:`;
for i = 0 to Array.length jumptbl - 1 do
jumptbl_entries := jumptbl.(i) :: !jumptbl_entries;
incr num_jumptbl_entries
done
` .long {emit_label jumptbl.(i)} - {emit_label lbl}\n`
done;
emit_string code_space
| Lsetuptrap lbl ->
` bl {emit_label lbl}\n`
| Lpushtrap ->
Expand Down Expand Up @@ -926,9 +921,6 @@ let data l =
let begin_assembly() =
defined_functions := StringSet.empty;
external_functions := StringSet.empty;
num_jumptbl_entries := 0;
jumptbl_entries := [];
lbl_jumptbl := 0;
(* Emit the beginning of the segments *)
let lbl_begin = Compilenv.make_symbol (Some "data_begin") in
emit_string data_space;
Expand All @@ -940,15 +932,6 @@ let begin_assembly() =
`{emit_symbol lbl_begin}:\n`

let end_assembly() =
(* Emit the jump table *)
if !num_jumptbl_entries > 0 then begin
emit_string code_space;
`{emit_label !lbl_jumptbl}:\n`;
List.iter
(fun lbl -> ` .long {emit_label lbl} - {emit_label !lbl_jumptbl}\n`)
(List.rev !jumptbl_entries);
jumptbl_entries := []
end;
if pic_externals then
(* Emit the pointers to external functions *)
StringSet.iter emit_external !external_functions;
Expand Down
Binary file modified boot/myocamlbuild.boot
Binary file not shown.
Binary file modified boot/ocamlc
Binary file not shown.
Binary file modified boot/ocamldep
Binary file not shown.
Binary file modified boot/ocamllex
Binary file not shown.
12 changes: 4 additions & 8 deletions build/boot-c-parts-windows.sh
@@ -1,4 +1,5 @@
#!/bin/sh
# $Id$
cd `dirname $0`/..
set -ex

Expand All @@ -10,7 +11,9 @@ set -ex
(cd win32caml && make)

mkdir -p _build/boot
cp -f byterun/{ocamlrun.exe,libcamlrun.$A,ocamlrun.dll} \
cp -f byterun/ocamlrun.exe \
byterun/libcamlrun.$A \
byterun/ocamlrun.dll \
asmrun/libasmrun.$A \
yacc/ocamlyacc.exe \
boot/ocamlc \
Expand All @@ -20,10 +23,3 @@ cp -f byterun/{ocamlrun.exe,libcamlrun.$A,ocamlrun.dll} \
mkdir -p _build/byterun
cp -f byterun/ocamlrun.exe byterun/ocamlrun.dll boot
cp -f byterun/ocamlrun.$A _build/byterun
mkdir -p _build/stdlib
cp -f byterun/libcamlrun.$A \
asmrun/libasmrun.$A \
_build/stdlib
mkdir -p _build/asmrun
cp -f asmrun/{meta,dynlink}.$O \
_build/asmrun
19 changes: 8 additions & 11 deletions build/boot-c-parts.sh
@@ -1,24 +1,21 @@
#!/bin/sh
# $Id$
cd `dirname $0`/..
set -ex

# Create a bunch of symlinks to _build/{boot,stdlib,asmrun}
# Create a bunch of symlinks to _build/boot
mkdir -p _build/boot
ln -sf ../../byterun/{ocamlrun,libcamlrun.a} \
../../asmrun/libasmrun{,p}.a \
ln -sf ../../byterun/ocamlrun \
../../byterun/libcamlrun.a \
../../asmrun/libasmrun.a \
../../asmrun/libasmrunp.a \
../../yacc/ocamlyacc \
../../boot/ocamlc \
../../boot/ocamllex \
../../boot/ocamldep \
_build/boot
ln -sf ../byterun/ocamlrun boot
mkdir -p _build/stdlib
ln -sf ../../byterun/libcamlrun.a \
../../asmrun/libasmrun{,p}.a \
_build/stdlib
mkdir -p _build/asmrun
ln -sf ../../asmrun/{meta,dynlink}.o \
_build/asmrun

[ -f boot/ocamlrun ] || ln -sf ../byterun/ocamlrun boot

(cd byterun && make)
(cd asmrun && make all meta.o dynlink.o)
Expand Down
21 changes: 16 additions & 5 deletions build/boot.sh
@@ -1,12 +1,23 @@
#!/bin/sh
# $Id$
cd `dirname $0`/..
set -ex
./boot/ocamlrun boot/myocamlbuild.boot boot/stdlib.cma boot/std_exit.cmo
boot/ocamlrun boot/myocamlbuild.boot -log _boot_log1 \
TAGLINE='true: -use_stdlib'
./boot/ocamlrun boot/myocamlbuild.boot \
-tag-line "$TAG_LINE" \
boot/stdlib.cma boot/std_exit.cmo

boot/ocamlrun boot/myocamlbuild.boot \
-tag-line "$TAG_LINE" -log _boot_log1 \
ocamlbuild/ocamlbuildlightlib.cma ocamlbuild/ocamlbuildlight.byte

rm -f _build/myocamlbuild

boot/ocamlrun boot/myocamlbuild.boot \
-just-plugin -install-dir _build/ocamlbuild -byte-plugin
-just-plugin -install-lib-dir _build/ocamlbuild -byte-plugin

cp _build/myocamlbuild boot/myocamlbuild
./boot/ocamlrun boot/myocamlbuild $@ -log _boot_log2 \
boot/camlheader ocamlc

./boot/ocamlrun boot/myocamlbuild \
-tag-line "$TAG_LINE" \
$@ -log _boot_log2 boot/camlheader ocamlc

0 comments on commit 8a6c3b2

Please sign in to comment.