Skip to content
This repository
Browse code

merge changes from 4.00 branching to 4.00.0 (part 1)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12784 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
  • Loading branch information...
commit c61fd90bc783a67c21c1792cffd450bf0dc525f2 1 parent 9491507
doligez authored

Showing 78 changed files with 1,679 additions and 768 deletions. Show diff stats Hide diff stats

  1. +128 12 Changes
  2. +3 0  INSTALL
  3. +8 2 Makefile
  4. +50 18 README.win32
  5. +1 1  VERSION
  6. +36 36 asmcomp/emitaux.ml
  7. +1 1  asmcomp/power/arch.ml
  8. +54 45 asmrun/.depend
  9. +2 0  boot/.ignore
  10. +33 30 byterun/.depend
  11. +2 0  byterun/.ignore
  12. +1 1  byterun/Makefile
  13. +7 5 byterun/compact.c
  14. +2 2 byterun/freelist.c
  15. +6 14 byterun/gc_ctrl.c
  16. +1 1  byterun/io.c
  17. +1 0  camlp4/boot/.ignore
  18. +6 3 config/auto-aux/cfi.S
  19. +5 2 configure
  20. +1 0  debugger/.ignore
  21. +1 1  driver/pparse.ml
  22. +34 34 lex/.depend
  23. +1 0  man/Makefile
  24. +51 21 man/ocamlcp.m
  25. +1 1  man/ocamlopt.m
  26. +145 142 ocamldoc/.depend
  27. +13 4 ocamldoc/Makefile
  28. +1 1  ocamldoc/odoc_analyse.ml
  29. +91 1 ocamldoc/odoc_args.ml
  30. +24 0 ocamldoc/odoc_args.mli
  31. +181 135 ocamldoc/odoc_ast.ml
  32. +1 1  ocamldoc/odoc_class.ml
  33. +1 1  ocamldoc/odoc_comments.ml
  34. +27 4 ocamldoc/odoc_cross.ml
  35. +13 2 ocamldoc/odoc_gen.ml
  36. +10 1 ocamldoc/odoc_gen.mli
  37. +91 52 ocamldoc/odoc_html.ml
  38. +6 2 ocamldoc/odoc_info.ml
  39. +10 2 ocamldoc/odoc_info.mli
  40. +25 16 ocamldoc/odoc_latex.ml
  41. +6 2 ocamldoc/odoc_man.ml
  42. +1 1  ocamldoc/odoc_merge.mli
  43. +12 1 ocamldoc/odoc_messages.ml
  44. +1 1  ocamldoc/odoc_misc.ml
  45. +6 0 ocamldoc/odoc_name.ml
  46. +3 0  ocamldoc/odoc_name.mli
  47. +14 3 ocamldoc/odoc_scan.ml
  48. +59 12 ocamldoc/odoc_search.ml
  49. +18 2 ocamldoc/odoc_search.mli
  50. +66 29 ocamldoc/odoc_sig.ml
  51. +1 1  ocamldoc/odoc_sig.mli
  52. +9 4 ocamldoc/odoc_test.ml
  53. +2 0  ocamldoc/odoc_text.ml
  54. +36 3 ocamldoc/odoc_text_lexer.mll
  55. +4 0 ocamldoc/odoc_text_parser.mly
  56. +4 2 ocamldoc/odoc_types.ml
  57. +4 2 ocamldoc/odoc_types.mli
  58. +4 4 otherlibs/bigarray/.depend
  59. +3 3 otherlibs/bigarray/bigarray.mli
  60. +4 0 otherlibs/bigarray/mmap_unix.c
  61. +0 4 otherlibs/labltk/support/cltkFile.c
  62. +22 24 otherlibs/num/.depend
  63. +3 3 otherlibs/str/.depend
  64. +15 15 otherlibs/systhreads/.depend
  65. +24 21 otherlibs/threads/.depend
  66. +2 2 otherlibs/threads/event.mli
  67. +15 0 otherlibs/win32unix/accept.c
  68. +15 0 otherlibs/win32unix/socket.c
  69. +1 1  stdlib/scanf.mli
  70. +14 7 tools/Makefile.shared
  71. +5 3 tools/make-package-macosx
  72. +43 0 tools/make-version-header.sh
  73. +2 1  tools/ocamlcp.ml
  74. +24 21 tools/ocamldep.ml
  75. +158 0 tools/ocamloptp.ml
  76. +1 0  tools/setignore
  77. +2 2 utils/warnings.ml
  78. +1 0  yacc/.ignore
140 Changes
@@ -39,6 +39,11 @@ Compilers:
39 39 * Warning 28 is now enabled by default.
40 40 - New option -absname to use absolute paths in error messages
41 41 - Optimize away compile-time beta-redexes, e.g. (fun x y -> e) a b.
  42 +- Added option -bin-annot to dump the AST with type annotations.
  43 +- Added lots of new warnings about unused variables, opens, fields,
  44 + constructors, etc.
  45 +* New meaning for warning 7: it is now triggered when a method is overridden
  46 + with the "method" keyword. Use "method!" to avoid the warning.
42 47
43 48 Native-code compiler:
44 49 - Optimized handling of partially-applied functions (PR#5287)
@@ -50,10 +55,23 @@ Native-code compiler:
50 55 savings of 28%.
51 56 . Added support for position-independent code, natdynlink, profiling and
52 57 exception backtraces.
53   -- In -g mode, generation of CFI information and a few filename/line
54   - number debugging annotations, enabling in particular precise stack
55   - backtraces with the gdb debugger. Currently supported for x86 32-bits
56   - and 64-bits only. (PR#5487)
  58 +- Generation of CFI information, and filename/line number debugging (with -g)
  59 + annotations, enabling in particular precise stack backtraces with
  60 + the gdb debugger. Currently supported for x86 32-bits and 64-bits only.
  61 + (PR#5487)
  62 +- New tool: ocamloptp, the equivalent of ocamlcp for the native-code compiler.
  63 +
  64 +OCamldoc:
  65 +- PR#5645: ocamldoc doesn't handle module/type substitution in signatures
  66 +- PR#5544: improve HTML output (less formatting in html code)
  67 +- PR#5522: allow refering to record fields and variant constructors
  68 +- fix PR#5419 (error message in french)
  69 +- fix PR#5535 (no cross ref to class after dump+load)
  70 +* Use first class modules for custom generators, to be able to
  71 + load various plugins incrementally adding features to the current
  72 + generator
  73 +* PR#5507: Use Location.t structures for locations.
  74 +- fix: do not keep code when not told to keep code.
57 75
58 76 Standard library:
59 77 - Added float functions "hypot" and "copysign" (PR#3806, PR#4752, PR#5246)
@@ -70,13 +88,14 @@ Standard library:
70 88 to turn randomization on by default (PR#5572, CVE-2012-0839)
71 89 . Added new functorial interface "MakeSeeded" to support randomization
72 90 with user-provided seeded hash functions.
  91 + . Install new header <caml/hash.h> for C code.
73 92 - Filename: on-demand (lazy) initialization of the PRNG used by "temp_file".
74 93 - Marshal: marshalling of function values (flag Marshal.Closures) now
75 94 also works for functions that come from dynamically-loaded modules (PR#5215)
76 95 - Random:
77 96 . More random initialization (Random.self_init()), using /dev/urandom
78 97 when available (e.g. Linux, FreeBSD, MacOS X, Solaris)
79   - . Faster implementation of Random.float
  98 + * Faster implementation of Random.float (changes the generated sequences)
80 99 - Format strings for formatted input/output revised to correct PR#5380
81 100 . Consistently treat %@ as a plain @ character
82 101 . Consistently treat %% as a plain % character
@@ -85,10 +104,29 @@ Standard library:
85 104 - Set and Map: more efficient implementation of "filter" and "partition"
86 105 - String: new function "map" (PR#3888)
87 106
  107 +Installation procedure:
  108 +- Compiler internals are now installed in `ocamlc -where`/compiler-libs.
  109 + The files available there include the .cmi interfaces for all compiler
  110 + modules, plus the following libraries:
  111 + ocamlcommon.cma/.cmxa modules common to ocamlc, ocamlopt, ocaml
  112 + ocamlbytecomp.cma/.cmxa modules for ocamlc and ocaml
  113 + ocamloptcomp.cma/.cmxa modules specific to ocamlopt
  114 + ocamltoplevel.cma modules specific to ocaml
  115 + (PR#1804, PR#4653, frequently-asked feature).
  116 +* Some .cmi for toplevel internals that used to be installed in
  117 + `ocamlc -where` are now to be found in `ocamlc -where`/compiler-libs.
  118 + Add "-I +compiler-libs" where needed.
  119 +* toplevellib.cma is no longer installed because subsumed by
  120 + ocamlcommon.cma ocamlbytecomp.cma ocamltoplevel.cma
  121 +- Added a configuration option (-with-debug-runtime) to compile and install
  122 + a debug version of the runtime system, and a compiler option
  123 + (-runtime-variant) to select the debug runtime.
  124 +
88 125 Bug Fixes:
89 126 - PR#1643: functions of the Lazy module whose named started with 'lazy_' have
90 127 been deprecated, and new ones without the prefix added
91 128 - PR#3571: in Bigarrays, call msync() before unmapping to commit changes
  129 +- PR#4292: various documentation problems
92 130 - PR#4511, PR#4838: local modules remove polymorphism
93 131 * PR#4549: Filename.dirname is not handling multiple / on Unix
94 132 - PR#4688: (Windows) special floating-point values aren't converted to strings
@@ -108,20 +146,30 @@ Bug Fixes:
108 146 otherwise. This reduces (but does not eliminate) the risk of
109 147 segmentation faults due to stack overflow in C code
110 148 - PR#5073: wrong location for 'Unbound record field label' error
  149 +- PR#5084: sub-sub-module building fails for native code compilation
  150 +- PR#5120: fix the output function of Camlp4.Debug.formatter
111 151 - PR#5131: compilation of custom runtime with g++ generates lots of warnings
112 152 - PR#5137: caml-types-explore does not work
  153 +- PR#5159: better documentation of type Lexing.position
  154 +- PR#5171: Map.join does more comparisons than needed
  155 +- PR#5176: emacs mode: stack overflow in regexp matcher
  156 +- PR#5179: port OCaml to mingw-w64
113 157 - PR#5211: updated Genlex documentation to state that camlp4 is mandatory for
114 158 'parser' keyword and associated notation
  159 +- PR#5214: ocamlfind plugin invokes 'cut' utility
115 160 - PR#5218: use $(MAKE) instead of "make" in Makefiles
116 161 - PR#5224: confusing error message in non-regular type definition
  162 +- PR#5231: camlp4: fix parsing of <:str_item< type t = $x$ >>
117 163 - PR#5233: finaliser on weak array gives dangling pointers (crash)
118 164 - PR#5238, PR#5277: Sys_error when getting error location
119 165 - PR#5261, PR#5497: Ocaml source-code examples are not "copy-paste-able"
120 166 * PR#5279: executable name is not initialized properly in caml_startup_code
  167 +- PR#5290: added hash functions for channels, nats, mutexes, conditions
121 168 - PR#5291: undetected loop in class initialization
122 169 - PR#5295: OS threads: problem with caml_c_thread_unregister()
123 170 - PR#5301: camlp4r and exception equal to another one with parameters
124 171 - PR#5305: prevent ocamlbuild from complaining about links to _build/
  172 +- PR#5306: comparing to Thread.self() raises exception at runtime
125 173 - PR#5309: Queue.add is not thread/signal safe
126 174 - PR#5310: Ratio.create_ratio/create_normalized_ratio have misleading names
127 175 - PR#5311: better message for warning 23
@@ -131,6 +179,7 @@ Bug Fixes:
131 179 - PR#5214: ocamlfind plugin invokes 'cut' utility
132 180 - PR#5316: objinfo now shows ccopts/ccobjs/force_link when applicable
133 181 - PR#5318: segfault on stack overflow when reading marshaled data
  182 +- PR#5319: %r11 clobbered by Lswitch in Windows AMD64 native-code compilation
134 183 - PR#5322: type abbreviations expanding to a universal type variable
135 184 - PR#5325: (Windows) blocked Unix.recv in one thread blocks Unix.send in
136 185 another thread
@@ -138,22 +187,40 @@ Bug Fixes:
138 187 - PR#5330: thread tag with '.top' and '.inferred.mli' targets
139 188 - PR#5331: ocamlmktop is not always a shell script
140 189 - PR#5335: Unix.environment segfaults after a call to clearenv
  190 +- PR#5338: sanitize.sh has windows style end-of-lines (mingw)
141 191 - PR#5343: ocaml -rectypes is unsound wrt module subtyping
142 192 - PR#5344: some predefined exceptions need special printing
  193 +- PR#5349: Hashtbl.replace uses new key instead of reusing old key
143 194 - PR#5356: ocamlbuild handling of 'predicates' for ocamlfind
144 195 - PR#5364: wrong compilation of "((val m : SIG1) : SIG2)"
145 196 - PR#5370: ocamldep omits filename in syntax error message
  197 +- PR#5374: camlp4 creates wrong location for type definitions
146 198 - PR#5380: strange sscanf input segfault
147   -- PR#5394: Documentation for -dtypes is missing in manpage
  199 +- PR#5382: EOPNOTSUPP and ENOTSUPP different on exotic platforms
  200 +- PR#5383: build failure in Win32/MSVC
  201 +- PR#5387: camlp4: str_item and other syntactic elements with Nils are
  202 + not very usable
  203 +- PR#5389: compaction sometimes leaves a very large heap
  204 +- PR#5393: fails to build from source on GNU/kFreeBSD because of -R link option
  205 +- PR#5394: documentation for -dtypes is missing in manpage
  206 +- PR#5397: Filename.temp_dir_name should be mutable
  207 +- PR#5410: fix printing of class application with Camlp4
148 208 - PR#5416: (Windows) Unix.(set|clear)_close_on_exec now preserves blocking mode
  209 +- PR#5435: ocamlbuild does not find .opt executables on Windows
149 210 - PR#5436: update object ids on unmarshaling
  211 +- PR#5442: camlp4: quotation issue with strings
150 212 - PR#5453: configure doesn't find X11 under Ubuntu/MultiarchSpec
151 213 - PR#5461: Double linking of bytecode modules
152 214 - PR#5463: Bigarray.*.map_file fail if empty array is requested
  215 +- PR#5465: increase stack size of ocamlopt.opt for windows
153 216 - PR#5469: private record type generated by functor loses abbreviation
154 217 - PR#5475: Wrapper script for interpreted LablTk wrongly handles command line
155 218 parameters
156 219 - PR#5476: bug in native code compilation of let rec on float arrays
  220 +- PR#5477: use pkg-config to configure graphics on linux
  221 +- PR#5481: update camlp4 magic numbers
  222 +- PR#5482: remove bashism in test suite scripts
  223 +- PR#5495: camlp4o dies on infix definition (or)
157 224 - PR#5498: Unification with an empty object only checks the absence of
158 225 the first method
159 226 - PR#5503: error when ocamlbuild is passed an absolute path as build directory
@@ -163,59 +230,108 @@ Bug Fixes:
163 230 - PR#5511: in Bigarray.reshape, unwarranted limitation on new array dimensions.
164 231 - PR#5513: Int64.div causes floating point exception (ocamlopt, x86)
165 232 - PR#5516: in Bigarray C stubs, use C99 flexible array types if possible
  233 +- PR#5518: segfault with lazy empty array
166 234 - PR#5531: Allow ocamlbuild to add ocamldoc flags through -docflag
167 235 and -docflags switches
168   -- PR#5543: in Bigarray.map_file, try to avoid using lseek() when growing file
169 236 - PR#5538: combining -i and -annot in ocamlc
  237 +- PR#5543: in Bigarray.map_file, try to avoid using lseek() when growing file
  238 +- PR#5648: (probably fixed) test failures in tests/lib-threads
  239 +- PR#5551: repeated calls to find_in_path degrade performance
  240 +- PR#5552: Mac OS X: unrecognized gcc option "-no-cpp-precomp"
  241 +- PR#5555: add Hashtbl.reset to resize the bucket table to its initial size
170 242 - PR#5560: incompatible type for tuple pattern with -principal
  243 +- PR#5575: Random states are not marshallable across architectures
  244 +- PR#5579: camlp4: when a plugin is loaded in the toplevel,
  245 + Token.Filter.define_filter has no effect before the first syntax error
  246 +- PR#5585: typo: "explicitely"
  247 +- PR#5587: documentation: "allows to" is not correct English
  248 +- PR#5593: remove C file when -output-obj fails
  249 +- PR#5597: register names for instrtrace primitives in embedded bytecode
  250 +- PR#5598: add backslash-space support in strings in ocamllex
171 251 - PR#5603: wrong .file debug info generated by ocamlopt -g
  252 +- PR#5604: fix permissions of files created by ocamlbuild itself
172 253 - PR#5610: new unmarshaler (from PR#5318) fails to freshen object identifiers
  254 +- PR#5614: add missing -linkall flag when compiling ocamldoc.opt
  255 +- PR#5616: move ocamlbuild documentation to the reference manual
  256 +- PR#5619: Uncaught CType.Unify exception in the compiler
173 257 - PR#5620: invalid printing of type manifest (camlp4 revised syntax)
174 258 - PR#5637: invalid printing of anonymous type parameters (camlp4 revised syntax)
175 259 - PR#5643: issues with .cfi and .loc directives generated by ocamlopt -g
176 260 - PR#5644: Stream.count broken when used with Sapp or Slazy nodes
177 261 - PR#5647: Cannot use install_printer in debugger
178 262 - PR#5651: printer for abstract data type (camlp4 revised syntax)
  263 +- PR#5654: self pattern variable location tweak
179 264 - PR#5655: ocamlbuild doesn't pass cflags when building C stubs
  265 +- PR#5657: wrong error location for abbreviated record fields
  266 +- PR#5659: ocamlmklib -L option breaks with MSVC
180 267 - PR#5661: fixes for the test suite
  268 +- PR#5668: Camlp4 produces invalid syntax for "let _ = ..."
181 269 - PR#5671: initialization of compare_ext field in caml_final_custom_operations()
182 270 - PR#5677: do not use "value" as identifier (genprintval.ml)
  271 +- PR#5687: dynlink broken when used from "output-obj" main program (bytecode)
183 272 - problem with printing of string literals in camlp4 (reported on caml-list)
184 273 - emacs mode: colorization of comments and strings now works correctly
  274 +- problem with forall and method (reported on caml-list on 2011-07-26)
  275 +- crash when using OCAMLRUNPARAM=a=X with invalid X (reported in private)
185 276
186 277 Feature wishes:
187 278 - PR#352: new option "-stdin" to make ocaml read stdin as a script
188   -- PR#4444: new String.trim function, removing leading and trailing whitespace
  279 +- PR#1164: better error message when mixing -a and .cmxa
  280 +- PR#1284: documentation: remove restriction on mixed streams
  281 +- PR#1496: allow configuring LIBDIR, BINDIR, and MANDIR relative to $(PREFIX)
  282 +- PR#1835: add Digest.from_hex
  283 +- PR#1898: toplevel: add option to suppress continuation prompts
  284 +- PR#4278: configure: option to disable "graph" library
  285 +- PR#4444: new String.trim function, removing leading and trailing whistespace
  286 +- PR#4549: make Filename.dirname/basename POSIX compliant
  287 +- PR#4830: add option -v to expunge.ml
189 288 - PR#4898: new Sys.big_endian boolean for machine endianness
  289 +- PR#4963, PR#5467: no extern "C" into ocaml C-stub headers
190 290 - PR#5199: tests are run only for bytecode if either native support is missing,
191 291 or a non-empty value is set to "BYTECODE_ONLY" Makefile variable
  292 +- PR#5215: marshalling of dynlinked closure
192 293 - PR#5236: new '%revapply' primitive with the semantics 'revapply x f = f x',
193 294 and '%apply' with semantics 'apply f x = f x'.
194 295 - PR#5255: natdynlink detection on powerpc, hurd, sparc
  296 +- PR#5295: OS threads: problem with caml_c_thread_unregister()
195 297 - PR#5297: compiler now checks existence of builtin primitives
196 298 - PR#5329: (Windows) more efficient Unix.select if all fd's are sockets
  299 +- PR#5357: warning for useless open statements
197 300 - PR#5358: first class modules don't allow "with type" declarations for types
198 301 in sub-modules
  302 +- PR#5385: configure: emit a warning when MACOSX_DEPLOYMENT_TARGET is set
  303 +- PR#5396: ocamldep: add options -sort, -all, and -one-line
199 304 - PR#5397: Filename.temp_dir_name should be mutable
  305 +- PR#5403: give better error message when emacs is not found in PATH
200 306 - PR#5411: new directive for the toplevel: #load_rec
201 307 - PR#5420: Unix.openfile share mode (Windows)
202   -- PR#5437: warning for useless open statements
  308 +- PR#5421: Unix: do not leak fds in various open_proc* functions
  309 +- PR#5434: implement Unix.times in win32unix (partially)
203 310 - PR#5438: new warnings for unused declarations
  311 +- PR#5439: upgrade config.guess and config.sub
  312 +- PR#5445 and others: better printing of types with user-provided names
204 313 - PR#5454: Digest.compare is missing and md5 doc update
205   -- PR#5467: no extern "C" into ocaml C-stub headers
  314 +- PR#5455: .emacs instructions, add lines to recognize ocaml scripts
  315 +- PR#5456: pa_macro: replace __LOCATION__ after macro expansion; add LOCATION_OF
  316 +- PR#5461: bytecode: emit warning when linking two modules with the same name
206 317 - PR#5478: ocamlopt assumes ar command exists
207 318 - PR#5479: Num.num_of_string may raise an exception, not reflected in the
208 319 documentation.
209   -- PR#5555: Add function Hashtbl.reset to resize the bucket table to
  320 +- PR#5501: increase IO_BUFFER_SIZE to 64KiB
  321 +- PR#5532: improve error message when bytecode file is wrong
  322 +- PR#5555: add function Hashtbl.reset to resize the bucket table to
210 323 its initial size.
  324 +- PR#5586: increase UNIX_BUFFER_SIZE to 64KiB
211 325 - PR#5597: register names for instrtrace primitives in embedded bytecode
212 326 - PR#5599: Add warn() tag in ocamlbuild to control -w compiler switch
213 327 - PR#5628: add #remove_directory and Topdirs.remove_directory to remove
214 328 a directory from the load path
215 329 - PR#5636: in system threads library, issue with linking of pthread_atfork
  330 +- PR#5666: C includes don't provide a revision number
216 331 - ocamldebug: ability to inspect values that contain code pointers
217 332 - ocamldebug: new 'environment' directive to set environment variables
218   - for debugee
  333 + for debuggee
  334 +- configure: add -no-camlp4 option
219 335
220 336 Shedding weight:
221 337 * Removed the obsolete native-code generators for Alpha, HPPA, IA64 and MIPS.
3  INSTALL
@@ -169,6 +169,9 @@ Examples:
169 169 For Sun Solaris with the "acc" compiler:
170 170 ./configure -cc "acc -fast" -libs "-lucb"
171 171
  172 + For Sun Solaris on Sparc 64bit, to compile natively (32bit only)
  173 + ./configure -cc "gcc -m32" -as "as -32" -aspp "gcc -m32 -c"
  174 +
172 175 For AIX 4.3 with the IBM compiler xlc:
173 176 ./configure -cc "xlc_r -D_AIX43 -Wl,-bexpall,-brtl -qmaxmem=8192"
174 177
10 Makefile
@@ -128,6 +128,7 @@ world:
128 128 world.opt:
129 129 $(MAKE) coldstart
130 130 $(MAKE) opt.opt
  131 + $(MAKE) ocamltoolsopt
131 132
132 133 # Hard bootstrap how-to:
133 134 # (only necessary in some cases, for example if you remove some primitive)
@@ -246,6 +247,7 @@ opt:
246 247 $(MAKE) ocamlopt
247 248 $(MAKE) libraryopt
248 249 $(MAKE) otherlibrariesopt
  250 + $(MAKE) ocamltoolsopt
249 251 $(MAKE) ocamlbuildlib.native
250 252
251 253 # Native-code versions of the tools
@@ -307,6 +309,7 @@ installopt:
307 309 for i in $(OTHERLIBRARIES); \
308 310 do (cd otherlibs/$$i; $(MAKE) installopt) || exit $$?; done
309 311 if test -f ocamlopt.opt ; then $(MAKE) installoptopt; fi
  312 + cd tools; $(MAKE) installopt
310 313
311 314 installoptopt:
312 315 cp ocamlc.opt $(BINDIR)/ocamlc.opt$(EXE)
@@ -657,6 +660,9 @@ clean::
657 660 ocamltools: ocamlc ocamlyacc ocamllex asmcomp/cmx_format.cmi
658 661 cd tools; $(MAKE) all
659 662
  663 +ocamltoolsopt: ocamlopt
  664 + cd tools; $(MAKE) opt
  665 +
660 666 ocamltoolsopt.opt: ocamlc.opt ocamlyacc ocamllex asmcomp/cmx_format.cmi
661 667 cd tools; $(MAKE) opt.opt
662 668
@@ -798,8 +804,8 @@ distclean:
798 804 .PHONY: coreboot defaultentry depend distclean install installopt
799 805 .PHONY: library library-cross libraryopt ocamlbuild-mixed-boot
800 806 .PHONY: ocamlbuild.byte ocamlbuild.native ocamldebugger ocamldoc
801   -.PHONY: ocamldoc.opt ocamllex ocamllex.opt ocamltools ocamltools.opt
802   -.PHONY: ocamlyacc opt-core opt opt.opt otherlibraries
  807 +.PHONY: ocamldoc.opt ocamllex ocamllex.opt ocamltools ocamltoolsopt
  808 +.PHONY: ocamltoolsopt.opt ocamlyacc opt-core opt opt.opt otherlibraries
803 809 .PHONY: otherlibrariesopt package-macosx promote promote-cross
804 810 .PHONY: restore runtime runtimeopt makeruntimeopt world world.opt
805 811
68 README.win32
@@ -91,8 +91,7 @@ THIRD-PARTY SOFTWARE:
91 91 Can be downloaded from http://alain.frisch.fr/flexdll.html
92 92
93 93 [3] TCL/TK version 8.5. Windows binaries are available as part of the
94   - ActiveTCL distribution at http://www.activestate.com/products/ActiveTcl/
95   -
  94 + ActiveTCL distribution at http://www.activestate.com/activetcl/downloads
96 95
97 96 RECOMPILATION FROM THE SOURCES:
98 97
@@ -186,7 +185,7 @@ contributed his changes to the OCaml project.
186 185
187 186 REQUIREMENTS:
188 187
189   -This port runs under MS Windows Vista, XP, and 2000.
  188 +This port runs under MS Windows Seven, Vista, XP, and 2000.
190 189
191 190 The base bytecode system (ocamlc, ocaml, ocamllex, ocamlyacc, ...)
192 191 runs without any additional tools.
@@ -202,10 +201,14 @@ the Setup tool from Cygwin):
202 201
203 202 mingw64-i686-binutils
204 203 mingw64-i686-gcc
  204 + mingw64-i686-gcc-core
205 205 mingw64-i686-runtime
206 206
207 207
208   -NOTE:
  208 +NOTES:
  209 +
  210 + - Do not use the Cygwin version of flexdll for this port.
  211 +
209 212 - There is another 32-bit gcc compiler, from the MinGW.org
210 213 project, packaged in Cygwin under the name mingw-gcc.
211 214 It is not currently supported by flexdll and OCaml.
@@ -223,7 +226,7 @@ NOTE:
223 226
224 227 The LablTk GUI requires Tcl/Tk 8.5. Windows binaries are available
225 228 as part of the ActiveTCL distribution at
226   -http://www.activestate.com/products/ActiveTcl/
  229 + http://www.activestate.com/activetcl/downloads
227 230 Note that you will need to install the 32-bit version of ActiveTCL,
228 231 even if you are on a 64-bit version of Windows.
229 232
@@ -246,23 +249,26 @@ environment variable. E.g. if Tcl/Tk was installed in C:\tcl, add
246 249 RECOMPILATION FROM THE SOURCES:
247 250
248 251 You will need the following software components to perform the recompilation:
249   -- Windows NT, 2000, XP, or Vista.
250   -- Cygwin: http://sourceware.cygnus.com/cygwin/
251   - Install at least the following packages:
  252 +- Windows NT, 2000, XP, Vista, or Seven.
  253 +- Cygwin: http://cygwin.com/
  254 + Install at least the following packages (and their dependencies, as
  255 + computed by Cygwin's setup.exe):
252 256 mingw64-i686-binutils
253 257 mingw64-i686-gcc
  258 + mingw64-i686-gcc-core
254 259 mingw64-i686-runtime
255 260 diffutils
256 261 make
257 262 ncurses
258   -- TCL/TK version 8.5 (see above).
259   -- The flexdll tool (see above).
  263 +- Tcl/Tk version 8.5 (see above).
  264 +- The flexdll tool (see above). Do not forget to add the flexdll directory
  265 + to your PATH
260 266
261 267 The standalone mingw toolchain from the MinGW-w64 project
262 268 (http://mingw-w64.sourceforge.net/) is not supported. Please use the
263 269 version packaged in Cygwin instead.
264 270
265   -Start a Cygwin shell and unpack the source distribution
  271 +Start a new Cygwin shell and unpack the source distribution
266 272 (ocaml-X.YY.Z.tar.gz) with "tar xzf". Change to the top-level
267 273 directory of the OCaml distribution. Then, do
268 274
@@ -273,7 +279,7 @@ directory of the OCaml distribution. Then, do
273 279 Then, edit config/Makefile as needed, following the comments in this file.
274 280 Normally, the only variables that need to be changed are
275 281 PREFIX where to install everything
276   - TK_ROOT where TCL/TK was installed
  282 + TK_ROOT where Tcl/Tk was installed
277 283
278 284 Finally, use "make -f Makefile.nt" to build the system, e.g.
279 285
@@ -317,16 +323,42 @@ the OCaml packages). Alternatively, recompile from the source distribution.
317 323
318 324 RECOMPILATION FROM THE SOURCES:
319 325
320   -Just follow the instructions for Unix machines given in the file INSTALL.
  326 +Before starting, make sure that the gcc version installed by cygwin
  327 +is not 4.5.3 (it has a bug that affects OCaml). If needed, use cygwin's
  328 +setup.exe to downgrade to 4.3.4.
  329 +
  330 +You will need to recompile (and install) flexdll from source with
  331 +Cygwin's C compiler because the official binary version of flexdll
  332 +doesn't handle Cygwin's symbolic links and sometimes fails to
  333 +launch the C compiler.
  334 +
  335 +In order to recompile flexdll, you first need to configure, compile,
  336 +and install OCaml without flexdll support (configure with options
  337 +-no-shared-libs -no-tk -no-camlp4), then modify the flexdll Makefile
  338 +to change line 51 from:
  339 + LINKFLAGS = -ccopt "-link version_res.o"
  340 +to:
  341 + LINKFLAGS = -cclib version_res.o
  342 +
  343 +Then "make CHAINS=cygwin" and add the flexdll directory to your PATH.
  344 +Make sure to add it before "/usr/bin" or you will get cygwin's flexlink.
  345 +
  346 +Then, in OCaml's source directory, type:
  347 + make clean
  348 + make distclean
  349 +and follow the instructions for Unix machines given in the file INSTALL.
321 350
322 351
323 352 NOTES:
324 353
325   -The libraries available in this port are "num", "str", "threads",
326   -"unix" and "labltk". "graph" is not available.
327   -The replay debugger is fully supported.
328   -When upgrading from 3.12.0 to 3.12.1, you will need to remove
329   -/usr/local/bin/ocamlmktop.exe before typing "make install".
  354 +- There is a problem with cygwin's port of gcc version 4.5.3. You should
  355 + use cygwin's setup program to downgrade to 4.3.4 before compiling OCaml.
  356 +- The replay debugger is fully supported.
  357 +- When upgrading from 3.12.0 to 3.12.1, you will need to remove
  358 + /usr/local/bin/ocamlmktop.exe before typing "make install".
  359 +- In order to use the "graph" and "labltk" libraries, you will need
  360 + to use Cygwin's setup.exe to install the xinit, libX11-devel, tcl,
  361 + and tcl-tk packages before compiling OCaml.
330 362
331 363 ------------------------------------------------------------------------------
332 364
2  VERSION
... ... @@ -1,4 +1,4 @@
1   -4.01.0+dev3_2012-05-30
  1 +4.01.0+dev4_2012-07-26
2 2
3 3 # The version string is the first line of this file.
4 4 # It must be in the format described in stdlib/sys.mli
72 asmcomp/emitaux.ml
@@ -111,42 +111,6 @@ let emit_float32_directive directive f =
111 111 let x = Int32.bits_of_float (float_of_string f) in
112 112 emit_printf "\t%s\t0x%lx\n" directive x
113 113
114   -(* Emit debug information *)
115   -
116   -(* This assoc list is expected to be very short *)
117   -let file_pos_nums =
118   - (ref [] : (string * int) list ref)
119   -
120   -(* Number of files *)
121   -let file_pos_num_cnt = ref 1
122   -
123   -(* Reset debug state at beginning of asm file *)
124   -let reset_debug_info () =
125   - file_pos_nums := [];
126   - file_pos_num_cnt := 1
127   -
128   -(* We only diplay .file if the file has not been seen before. We
129   - display .loc for every instruction. *)
130   -let emit_debug_info dbg =
131   - if !Clflags.debug && not (Debuginfo.is_none dbg) then (
132   - let line = dbg.Debuginfo.dinfo_line in
133   - assert (line <> 0); (* clang errors out on zero line numbers *)
134   - let file_name = dbg.Debuginfo.dinfo_file in
135   - let file_num =
136   - try List.assoc file_name !file_pos_nums
137   - with Not_found ->
138   - let file_num = !file_pos_num_cnt in
139   - incr file_pos_num_cnt;
140   - emit_string " .file ";
141   - emit_int file_num; emit_char ' ';
142   - emit_string_literal file_name; emit_char '\n';
143   - file_pos_nums := (file_name,file_num) :: !file_pos_nums;
144   - file_num in
145   - emit_string " .loc ";
146   - emit_int file_num; emit_char ' ';
147   - emit_int line; emit_char '\n'
148   - )
149   -
150 114 (* Record live pointers at call points *)
151 115
152 116 type frame_descr =
@@ -240,3 +204,39 @@ let cfi_adjust_cfa_offset n =
240 204 emit_string " .cfi_adjust_cfa_offset "; emit_int n; emit_string "\n";
241 205 end
242 206
  207 +(* Emit debug information *)
  208 +
  209 +(* This assoc list is expected to be very short *)
  210 +let file_pos_nums =
  211 + (ref [] : (string * int) list ref)
  212 +
  213 +(* Number of files *)
  214 +let file_pos_num_cnt = ref 1
  215 +
  216 +(* Reset debug state at beginning of asm file *)
  217 +let reset_debug_info () =
  218 + file_pos_nums := [];
  219 + file_pos_num_cnt := 1
  220 +
  221 +(* We only diplay .file if the file has not been seen before. We
  222 + display .loc for every instruction. *)
  223 +let emit_debug_info dbg =
  224 + if is_cfi_enabled () &&
  225 + !Clflags.debug && not (Debuginfo.is_none dbg) then begin
  226 + let line = dbg.Debuginfo.dinfo_line in
  227 + assert (line <> 0); (* clang errors out on zero line numbers *)
  228 + let file_name = dbg.Debuginfo.dinfo_file in
  229 + let file_num =
  230 + try List.assoc file_name !file_pos_nums
  231 + with Not_found ->
  232 + let file_num = !file_pos_num_cnt in
  233 + incr file_pos_num_cnt;
  234 + emit_string " .file ";
  235 + emit_int file_num; emit_char ' ';
  236 + emit_string_literal file_name; emit_char '\n';
  237 + file_pos_nums := (file_name,file_num) :: !file_pos_nums;
  238 + file_num in
  239 + emit_string " .loc ";
  240 + emit_int file_num; emit_char ' ';
  241 + emit_int line; emit_char '\n'
  242 + end
2  asmcomp/power/arch.ml
@@ -48,7 +48,7 @@ let size_float = 8
48 48
49 49 (* Behavior of division *)
50 50
51   -let division_crashes_on_overflow = false
  51 +let division_crashes_on_overflow = true
52 52
53 53 (* Operations on addressing modes *)
54 54
99 asmrun/.depend
@@ -37,9 +37,10 @@ custom.o: custom.c ../byterun/alloc.h ../byterun/misc.h \
37 37 ../byterun/mlvalues.h ../byterun/custom.h ../byterun/fail.h \
38 38 ../byterun/memory.h ../byterun/gc.h ../byterun/major_gc.h \
39 39 ../byterun/freelist.h ../byterun/minor_gc.h ../byterun/mlvalues.h
40   -debugger.o: debugger.c ../byterun/config.h ../byterun/../config/m.h \
41   - ../byterun/../config/s.h ../byterun/debugger.h ../byterun/misc.h \
42   - ../byterun/config.h ../byterun/mlvalues.h ../byterun/misc.h
  40 +debugger.o: debugger.c ../byterun/alloc.h ../byterun/misc.h \
  41 + ../byterun/config.h ../byterun/../config/m.h ../byterun/../config/s.h \
  42 + ../byterun/mlvalues.h ../byterun/config.h ../byterun/debugger.h \
  43 + ../byterun/misc.h
43 44 dynlink.o: dynlink.c ../byterun/config.h ../byterun/../config/m.h \
44 45 ../byterun/../config/s.h ../byterun/alloc.h ../byterun/misc.h \
45 46 ../byterun/config.h ../byterun/mlvalues.h ../byterun/dynlink.h \
@@ -51,9 +52,9 @@ extern.o: extern.c ../byterun/alloc.h ../byterun/misc.h \
51 52 ../byterun/config.h ../byterun/../config/m.h ../byterun/../config/s.h \
52 53 ../byterun/mlvalues.h ../byterun/custom.h ../byterun/fail.h \
53 54 ../byterun/gc.h ../byterun/intext.h ../byterun/io.h ../byterun/io.h \
54   - ../byterun/memory.h ../byterun/gc.h ../byterun/major_gc.h \
55   - ../byterun/freelist.h ../byterun/minor_gc.h ../byterun/misc.h \
56   - ../byterun/mlvalues.h ../byterun/reverse.h
  55 + ../byterun/md5.h ../byterun/memory.h ../byterun/gc.h \
  56 + ../byterun/major_gc.h ../byterun/freelist.h ../byterun/minor_gc.h \
  57 + ../byterun/misc.h ../byterun/mlvalues.h ../byterun/reverse.h
57 58 fail.o: fail.c ../byterun/alloc.h ../byterun/misc.h ../byterun/config.h \
58 59 ../byterun/../config/m.h ../byterun/../config/s.h ../byterun/mlvalues.h \
59 60 ../byterun/fail.h ../byterun/io.h ../byterun/gc.h ../byterun/memory.h \
@@ -96,14 +97,14 @@ hash.o: hash.c ../byterun/mlvalues.h ../byterun/config.h \
96 97 ../byterun/../config/m.h ../byterun/../config/s.h ../byterun/misc.h \
97 98 ../byterun/custom.h ../byterun/mlvalues.h ../byterun/memory.h \
98 99 ../byterun/gc.h ../byterun/major_gc.h ../byterun/freelist.h \
99   - ../byterun/minor_gc.h
  100 + ../byterun/minor_gc.h ../byterun/hash.h ../byterun/int64_native.h
100 101 intern.o: intern.c ../byterun/alloc.h ../byterun/misc.h \
101 102 ../byterun/config.h ../byterun/../config/m.h ../byterun/../config/s.h \
102   - ../byterun/mlvalues.h ../byterun/custom.h ../byterun/fail.h \
103   - ../byterun/gc.h ../byterun/intext.h ../byterun/io.h ../byterun/io.h \
104   - ../byterun/memory.h ../byterun/gc.h ../byterun/major_gc.h \
105   - ../byterun/freelist.h ../byterun/minor_gc.h ../byterun/mlvalues.h \
106   - ../byterun/misc.h ../byterun/reverse.h ../byterun/md5.h
  103 + ../byterun/mlvalues.h ../byterun/callback.h ../byterun/custom.h \
  104 + ../byterun/fail.h ../byterun/gc.h ../byterun/intext.h ../byterun/io.h \
  105 + ../byterun/io.h ../byterun/md5.h ../byterun/memory.h ../byterun/gc.h \
  106 + ../byterun/major_gc.h ../byterun/freelist.h ../byterun/minor_gc.h \
  107 + ../byterun/mlvalues.h ../byterun/misc.h ../byterun/reverse.h
107 108 ints.o: ints.c ../byterun/alloc.h ../byterun/misc.h ../byterun/config.h \
108 109 ../byterun/../config/m.h ../byterun/../config/s.h ../byterun/mlvalues.h \
109 110 ../byterun/custom.h ../byterun/fail.h ../byterun/intext.h \
@@ -174,7 +175,8 @@ natdynlink.o: natdynlink.c ../byterun/misc.h ../byterun/config.h \
174 175 ../byterun/misc.h ../byterun/memory.h ../byterun/gc.h \
175 176 ../byterun/mlvalues.h ../byterun/major_gc.h ../byterun/freelist.h \
176 177 ../byterun/minor_gc.h stack.h ../byterun/callback.h ../byterun/alloc.h \
177   - natdynlink.h ../byterun/osdeps.h ../byterun/fail.h
  178 + ../byterun/intext.h ../byterun/io.h natdynlink.h ../byterun/osdeps.h \
  179 + ../byterun/fail.h
178 180 obj.o: obj.c ../byterun/alloc.h ../byterun/misc.h ../byterun/config.h \
179 181 ../byterun/../config/m.h ../byterun/../config/s.h ../byterun/mlvalues.h \
180 182 ../byterun/fail.h ../byterun/gc.h ../byterun/interp.h \
@@ -216,8 +218,9 @@ signals_asm.o: signals_asm.c ../byterun/fail.h ../byterun/misc.h \
216 218 startup.o: startup.c ../byterun/callback.h ../byterun/mlvalues.h \
217 219 ../byterun/config.h ../byterun/../config/m.h ../byterun/../config/s.h \
218 220 ../byterun/misc.h ../byterun/backtrace.h ../byterun/custom.h \
219   - ../byterun/fail.h ../byterun/freelist.h ../byterun/gc.h \
220   - ../byterun/gc_ctrl.h ../byterun/memory.h ../byterun/gc.h \
  221 + ../byterun/debugger.h ../byterun/fail.h ../byterun/freelist.h \
  222 + ../byterun/gc.h ../byterun/gc_ctrl.h ../byterun/intext.h \
  223 + ../byterun/io.h ../byterun/memory.h ../byterun/gc.h \
221 224 ../byterun/major_gc.h ../byterun/freelist.h ../byterun/minor_gc.h \
222 225 ../byterun/misc.h ../byterun/mlvalues.h ../byterun/osdeps.h \
223 226 ../byterun/printexc.h stack.h ../byterun/sys.h natdynlink.h
@@ -284,9 +287,10 @@ custom.d.o: custom.c ../byterun/alloc.h ../byterun/misc.h \
284 287 ../byterun/mlvalues.h ../byterun/custom.h ../byterun/fail.h \
285 288 ../byterun/memory.h ../byterun/gc.h ../byterun/major_gc.h \
286 289 ../byterun/freelist.h ../byterun/minor_gc.h ../byterun/mlvalues.h
287   -debugger.d.o: debugger.c ../byterun/config.h ../byterun/../config/m.h \
288   - ../byterun/../config/s.h ../byterun/debugger.h ../byterun/misc.h \
289   - ../byterun/config.h ../byterun/mlvalues.h ../byterun/misc.h
  290 +debugger.d.o: debugger.c ../byterun/alloc.h ../byterun/misc.h \
  291 + ../byterun/config.h ../byterun/../config/m.h ../byterun/../config/s.h \
  292 + ../byterun/mlvalues.h ../byterun/config.h ../byterun/debugger.h \
  293 + ../byterun/misc.h
290 294 dynlink.d.o: dynlink.c ../byterun/config.h ../byterun/../config/m.h \
291 295 ../byterun/../config/s.h ../byterun/alloc.h ../byterun/misc.h \
292 296 ../byterun/config.h ../byterun/mlvalues.h ../byterun/dynlink.h \
@@ -298,9 +302,9 @@ extern.d.o: extern.c ../byterun/alloc.h ../byterun/misc.h \
298 302 ../byterun/config.h ../byterun/../config/m.h ../byterun/../config/s.h \
299 303 ../byterun/mlvalues.h ../byterun/custom.h ../byterun/fail.h \
300 304 ../byterun/gc.h ../byterun/intext.h ../byterun/io.h ../byterun/io.h \
301   - ../byterun/memory.h ../byterun/gc.h ../byterun/major_gc.h \
302   - ../byterun/freelist.h ../byterun/minor_gc.h ../byterun/misc.h \
303   - ../byterun/mlvalues.h ../byterun/reverse.h
  305 + ../byterun/md5.h ../byterun/memory.h ../byterun/gc.h \
  306 + ../byterun/major_gc.h ../byterun/freelist.h ../byterun/minor_gc.h \
  307 + ../byterun/misc.h ../byterun/mlvalues.h ../byterun/reverse.h
304 308 fail.d.o: fail.c ../byterun/alloc.h ../byterun/misc.h ../byterun/config.h \
305 309 ../byterun/../config/m.h ../byterun/../config/s.h ../byterun/mlvalues.h \
306 310 ../byterun/fail.h ../byterun/io.h ../byterun/gc.h ../byterun/memory.h \
@@ -343,14 +347,14 @@ hash.d.o: hash.c ../byterun/mlvalues.h ../byterun/config.h \
343 347 ../byterun/../config/m.h ../byterun/../config/s.h ../byterun/misc.h \
344 348 ../byterun/custom.h ../byterun/mlvalues.h ../byterun/memory.h \
345 349 ../byterun/gc.h ../byterun/major_gc.h ../byterun/freelist.h \
346   - ../byterun/minor_gc.h
  350 + ../byterun/minor_gc.h ../byterun/hash.h ../byterun/int64_native.h
347 351 intern.d.o: intern.c ../byterun/alloc.h ../byterun/misc.h \
348 352 ../byterun/config.h ../byterun/../config/m.h ../byterun/../config/s.h \
349   - ../byterun/mlvalues.h ../byterun/custom.h ../byterun/fail.h \
350   - ../byterun/gc.h ../byterun/intext.h ../byterun/io.h ../byterun/io.h \
351   - ../byterun/memory.h ../byterun/gc.h ../byterun/major_gc.h \
352   - ../byterun/freelist.h ../byterun/minor_gc.h ../byterun/mlvalues.h \
353   - ../byterun/misc.h ../byterun/reverse.h ../byterun/md5.h
  353 + ../byterun/mlvalues.h ../byterun/callback.h ../byterun/custom.h \
  354 + ../byterun/fail.h ../byterun/gc.h ../byterun/intext.h ../byterun/io.h \
  355 + ../byterun/io.h ../byterun/md5.h ../byterun/memory.h ../byterun/gc.h \
  356 + ../byterun/major_gc.h ../byterun/freelist.h ../byterun/minor_gc.h \
  357 + ../byterun/mlvalues.h ../byterun/misc.h ../byterun/reverse.h
354 358 ints.d.o: ints.c ../byterun/alloc.h ../byterun/misc.h ../byterun/config.h \
355 359 ../byterun/../config/m.h ../byterun/../config/s.h ../byterun/mlvalues.h \
356 360 ../byterun/custom.h ../byterun/fail.h ../byterun/intext.h \
@@ -421,7 +425,8 @@ natdynlink.d.o: natdynlink.c ../byterun/misc.h ../byterun/config.h \
421 425 ../byterun/misc.h ../byterun/memory.h ../byterun/gc.h \
422 426 ../byterun/mlvalues.h ../byterun/major_gc.h ../byterun/freelist.h \
423 427 ../byterun/minor_gc.h stack.h ../byterun/callback.h ../byterun/alloc.h \
424   - natdynlink.h ../byterun/osdeps.h ../byterun/fail.h
  428 + ../byterun/intext.h ../byterun/io.h natdynlink.h ../byterun/osdeps.h \
  429 + ../byterun/fail.h
425 430 obj.d.o: obj.c ../byterun/alloc.h ../byterun/misc.h ../byterun/config.h \
426 431 ../byterun/../config/m.h ../byterun/../config/s.h ../byterun/mlvalues.h \
427 432 ../byterun/fail.h ../byterun/gc.h ../byterun/interp.h \
@@ -463,8 +468,9 @@ signals_asm.d.o: signals_asm.c ../byterun/fail.h ../byterun/misc.h \
463 468 startup.d.o: startup.c ../byterun/callback.h ../byterun/mlvalues.h \
464 469 ../byterun/config.h ../byterun/../config/m.h ../byterun/../config/s.h \
465 470 ../byterun/misc.h ../byterun/backtrace.h ../byterun/custom.h \
466   - ../byterun/fail.h ../byterun/freelist.h ../byterun/gc.h \
467   - ../byterun/gc_ctrl.h ../byterun/memory.h ../byterun/gc.h \
  471 + ../byterun/debugger.h ../byterun/fail.h ../byterun/freelist.h \
  472 + ../byterun/gc.h ../byterun/gc_ctrl.h ../byterun/intext.h \
  473 + ../byterun/io.h ../byterun/memory.h ../byterun/gc.h \
468 474 ../byterun/major_gc.h ../byterun/freelist.h ../byterun/minor_gc.h \
469 475 ../byterun/misc.h ../byterun/mlvalues.h ../byterun/osdeps.h \
470 476 ../byterun/printexc.h stack.h ../byterun/sys.h natdynlink.h
@@ -531,9 +537,10 @@ custom.p.o: custom.c ../byterun/alloc.h ../byterun/misc.h \
531 537 ../byterun/mlvalues.h ../byterun/custom.h ../byterun/fail.h \
532 538 ../byterun/memory.h ../byterun/gc.h ../byterun/major_gc.h \
533 539 ../byterun/freelist.h ../byterun/minor_gc.h ../byterun/mlvalues.h
534   -debugger.p.o: debugger.c ../byterun/config.h ../byterun/../config/m.h \
535   - ../byterun/../config/s.h ../byterun/debugger.h ../byterun/misc.h \
536   - ../byterun/config.h ../byterun/mlvalues.h ../byterun/misc.h
  540 +debugger.p.o: debugger.c ../byterun/alloc.h ../byterun/misc.h \
  541 + ../byterun/config.h ../byterun/../config/m.h ../byterun/../config/s.h \
  542 + ../byterun/mlvalues.h ../byterun/config.h ../byterun/debugger.h \
  543 + ../byterun/misc.h
537 544 dynlink.p.o: dynlink.c ../byterun/config.h ../byterun/../config/m.h \
538 545 ../byterun/../config/s.h ../byterun/alloc.h ../byterun/misc.h \
539 546 ../byterun/config.h ../byterun/mlvalues.h ../byterun/dynlink.h \
@@ -545,9 +552,9 @@ extern.p.o: extern.c ../byterun/alloc.h ../byterun/misc.h \
545 552 ../byterun/config.h ../byterun/../config/m.h ../byterun/../config/s.h \
546 553 ../byterun/mlvalues.h ../byterun/custom.h ../byterun/fail.h \
547 554 ../byterun/gc.h ../byterun/intext.h ../byterun/io.h ../byterun/io.h \
548   - ../byterun/memory.h ../byterun/gc.h ../byterun/major_gc.h \
549   - ../byterun/freelist.h ../byterun/minor_gc.h ../byterun/misc.h \
550   - ../byterun/mlvalues.h ../byterun/reverse.h
  555 + ../byterun/md5.h ../byterun/memory.h ../byterun/gc.h \
  556 + ../byterun/major_gc.h ../byterun/freelist.h ../byterun/minor_gc.h \
  557 + ../byterun/misc.h ../byterun/mlvalues.h ../byterun/reverse.h
551 558 fail.p.o: fail.c ../byterun/alloc.h ../byterun/misc.h ../byterun/config.h \
552 559 ../byterun/../config/m.h ../byterun/../config/s.h ../byterun/mlvalues.h \
553 560 ../byterun/fail.h ../byterun/io.h ../byterun/gc.h ../byterun/memory.h \
@@ -590,14 +597,14 @@ hash.p.o: hash.c ../byterun/mlvalues.h ../byterun/config.h \
590 597 ../byterun/../config/m.h ../byterun/../config/s.h ../byterun/misc.h \
591 598 ../byterun/custom.h ../byterun/mlvalues.h ../byterun/memory.h \
592 599 ../byterun/gc.h ../byterun/major_gc.h ../byterun/freelist.h \
593   - ../byterun/minor_gc.h
  600 + ../byterun/minor_gc.h ../byterun/hash.h ../byterun/int64_native.h
594 601 intern.p.o: intern.c ../byterun/alloc.h ../byterun/misc.h \
595 602 ../byterun/config.h ../byterun/../config/m.h ../byterun/../config/s.h \
596   - ../byterun/mlvalues.h ../byterun/custom.h ../byterun/fail.h \
597   - ../byterun/gc.h ../byterun/intext.h ../byterun/io.h ../byterun/io.h \
598   - ../byterun/memory.h ../byterun/gc.h ../byterun/major_gc.h \
599   - ../byterun/freelist.h ../byterun/minor_gc.h ../byterun/mlvalues.h \
600   - ../byterun/misc.h ../byterun/reverse.h ../byterun/md5.h
  603 + ../byterun/mlvalues.h ../byterun/callback.h ../byterun/custom.h \
  604 + ../byterun/fail.h ../byterun/gc.h ../byterun/intext.h ../byterun/io.h \
  605 + ../byterun/io.h ../byterun/md5.h ../byterun/memory.h ../byterun/gc.h \
  606 + ../byterun/major_gc.h ../byterun/freelist.h ../byterun/minor_gc.h \
  607 + ../byterun/mlvalues.h ../byterun/misc.h ../byterun/reverse.h
601 608 ints.p.o: ints.c ../byterun/alloc.h ../byterun/misc.h ../byterun/config.h \
602 609 ../byterun/../config/m.h ../byterun/../config/s.h ../byterun/mlvalues.h \
603 610 ../byterun/custom.h ../byterun/fail.h ../byterun/intext.h \
@@ -668,7 +675,8 @@ natdynlink.p.o: natdynlink.c ../byterun/misc.h ../byterun/config.h \
668 675 ../byterun/misc.h ../byterun/memory.h ../byterun/gc.h \
669 676 ../byterun/mlvalues.h ../byterun/major_gc.h ../byterun/freelist.h \
670 677 ../byterun/minor_gc.h stack.h ../byterun/callback.h ../byterun/alloc.h \
671   - natdynlink.h ../byterun/osdeps.h ../byterun/fail.h
  678 + ../byterun/intext.h ../byterun/io.h natdynlink.h ../byterun/osdeps.h \
  679 + ../byterun/fail.h
672 680 obj.p.o: obj.c ../byterun/alloc.h ../byterun/misc.h ../byterun/config.h \
673 681 ../byterun/../config/m.h ../byterun/../config/s.h ../byterun/mlvalues.h \
674 682 ../byterun/fail.h ../byterun/gc.h ../byterun/interp.h \
@@ -710,8 +718,9 @@ signals_asm.p.o: signals_asm.c ../byterun/fail.h ../byterun/misc.h \
710 718 startup.p.o: startup.c ../byterun/callback.h ../byterun/mlvalues.h \
711 719 ../byterun/config.h ../byterun/../config/m.h ../byterun/../config/s.h \
712 720 ../byterun/misc.h ../byterun/backtrace.h ../byterun/custom.h \
713   - ../byterun/fail.h ../byterun/freelist.h ../byterun/gc.h \
714   - ../byterun/gc_ctrl.h ../byterun/memory.h ../byterun/gc.h \
  721 + ../byterun/debugger.h ../byterun/fail.h ../byterun/freelist.h \
  722 + ../byterun/gc.h ../byterun/gc_ctrl.h ../byterun/intext.h \
  723 + ../byterun/io.h ../byterun/memory.h ../byterun/gc.h \
715 724 ../byterun/major_gc.h ../byterun/freelist.h ../byterun/minor_gc.h \
716 725 ../byterun/misc.h ../byterun/mlvalues.h ../byterun/osdeps.h \
717 726 ../byterun/printexc.h stack.h ../byterun/sys.h natdynlink.h
2  boot/.ignore
... ... @@ -1,6 +1,8 @@
1 1 Saved
2 2 ocamlrun
  3 +ocamlrun.exe
3 4 ocamlyacc
  5 +ocamlyacc.exe
4 6 camlheader
5 7 myocamlbuild
6 8 myocamlbuild.native
63 byterun/.depend
@@ -6,7 +6,7 @@ array.o: array.c alloc.h compatibility.h misc.h config.h ../config/m.h \
6 6 minor_gc.h
7 7 backtrace.o: backtrace.c config.h ../config/m.h ../config/s.h \
8 8 compatibility.h mlvalues.h misc.h alloc.h io.h instruct.h intext.h \
9   - fix_code.h exec.h memory.h gc.h major_gc.h freelist.h minor_gc.h \
  9 + exec.h fix_code.h memory.h gc.h major_gc.h freelist.h minor_gc.h \
10 10 startup.h stacks.h sys.h backtrace.h
11 11 callback.o: callback.c callback.h compatibility.h mlvalues.h config.h \
12 12 ../config/m.h ../config/s.h misc.h fail.h memory.h gc.h major_gc.h \
@@ -20,15 +20,15 @@ compare.o: compare.c custom.h compatibility.h mlvalues.h config.h \
20 20 custom.o: custom.c alloc.h compatibility.h misc.h config.h ../config/m.h \
21 21 ../config/s.h mlvalues.h custom.h fail.h memory.h gc.h major_gc.h \
22 22 freelist.h minor_gc.h
23   -debugger.o: debugger.c config.h ../config/m.h ../config/s.h \
24   - compatibility.h debugger.h misc.h mlvalues.h fail.h fix_code.h \
  23 +debugger.o: debugger.c alloc.h compatibility.h misc.h config.h \
  24 + ../config/m.h ../config/s.h mlvalues.h debugger.h fail.h fix_code.h \
25 25 instruct.h intext.h io.h stacks.h memory.h gc.h major_gc.h freelist.h \
26 26 minor_gc.h sys.h
27 27 dynlink.o: dynlink.c config.h ../config/m.h ../config/s.h compatibility.h \
28 28 alloc.h misc.h mlvalues.h dynlink.h fail.h memory.h gc.h major_gc.h \
29 29 freelist.h minor_gc.h osdeps.h prims.h
30 30 extern.o: extern.c alloc.h compatibility.h misc.h config.h ../config/m.h \
31   - ../config/s.h mlvalues.h custom.h fail.h gc.h intext.h io.h fix_code.h \
  31 + ../config/s.h mlvalues.h custom.h fail.h gc.h intext.h io.h md5.h \
32 32 memory.h major_gc.h freelist.h minor_gc.h reverse.h
33 33 fail.o: fail.c alloc.h compatibility.h misc.h config.h ../config/m.h \
34 34 ../config/s.h mlvalues.h fail.h io.h gc.h memory.h major_gc.h \
@@ -38,7 +38,8 @@ finalise.o: finalise.c callback.h compatibility.h mlvalues.h config.h \
38 38 major_gc.h freelist.h minor_gc.h signals.h
39 39 fix_code.o: fix_code.c config.h ../config/m.h ../config/s.h \
40 40 compatibility.h debugger.h misc.h mlvalues.h fix_code.h instruct.h \
41   - md5.h io.h memory.h gc.h major_gc.h freelist.h minor_gc.h reverse.h
  41 + intext.h io.h md5.h memory.h gc.h major_gc.h freelist.h minor_gc.h \
  42 + reverse.h
42 43 floats.o: floats.c alloc.h compatibility.h misc.h config.h ../config/m.h \
43 44 ../config/s.h mlvalues.h fail.h memory.h gc.h major_gc.h freelist.h \
44 45 minor_gc.h reverse.h stacks.h
@@ -54,18 +55,18 @@ globroots.o: globroots.c memory.h compatibility.h config.h ../config/m.h \
54 55 roots.h globroots.h
55 56 hash.o: hash.c mlvalues.h compatibility.h config.h ../config/m.h \
56 57 ../config/s.h misc.h custom.h memory.h gc.h major_gc.h freelist.h \
57   - minor_gc.h
  58 + minor_gc.h hash.h int64_native.h
58 59 instrtrace.o: instrtrace.c
59 60 intern.o: intern.c alloc.h compatibility.h misc.h config.h ../config/m.h \
60   - ../config/s.h mlvalues.h custom.h fail.h gc.h intext.h io.h fix_code.h \
61   - memory.h major_gc.h freelist.h minor_gc.h reverse.h
  61 + ../config/s.h mlvalues.h callback.h custom.h fail.h gc.h intext.h io.h \
  62 + md5.h memory.h major_gc.h freelist.h minor_gc.h reverse.h
62 63 interp.o: interp.c alloc.h compatibility.h misc.h config.h ../config/m.h \
63 64 ../config/s.h mlvalues.h backtrace.h callback.h debugger.h fail.h \
64 65 fix_code.h instrtrace.h instruct.h interp.h major_gc.h freelist.h \
65 66 memory.h gc.h minor_gc.h prims.h signals.h stacks.h jumptbl.h
66 67 ints.o: ints.c alloc.h compatibility.h misc.h config.h ../config/m.h \
67   - ../config/s.h mlvalues.h custom.h fail.h intext.h io.h fix_code.h \
68   - memory.h gc.h major_gc.h freelist.h minor_gc.h int64_native.h
  68 + ../config/s.h mlvalues.h custom.h fail.h intext.h io.h memory.h gc.h \
  69 + major_gc.h freelist.h minor_gc.h int64_native.h
69 70 io.o: io.c config.h ../config/m.h ../config/s.h compatibility.h alloc.h \
70 71 misc.h mlvalues.h custom.h fail.h io.h memory.h gc.h major_gc.h \
71 72 freelist.h minor_gc.h signals.h sys.h
@@ -142,7 +143,7 @@ array.d.o: array.c alloc.h compatibility.h misc.h config.h ../config/m.h \
142 143 minor_gc.h
143 144 backtrace.d.o: backtrace.c config.h ../config/m.h ../config/s.h \
144 145 compatibility.h mlvalues.h misc.h alloc.h io.h instruct.h intext.h \
145   - fix_code.h exec.h memory.h gc.h major_gc.h freelist.h minor_gc.h \
  146 + exec.h fix_code.h memory.h gc.h major_gc.h freelist.h minor_gc.h \
146 147 startup.h stacks.h sys.h backtrace.h
147 148 callback.d.o: callback.c callback.h compatibility.h mlvalues.h config.h \
148 149 ../config/m.h ../config/s.h misc.h fail.h memory.h gc.h major_gc.h \
@@ -156,15 +157,15 @@ compare.d.o: compare.c custom.h compatibility.h mlvalues.h config.h \
156 157 custom.d.o: custom.c alloc.h compatibility.h misc.h config.h ../config/m.h \
157 158 ../config/s.h mlvalues.h custom.h fail.h memory.h gc.h major_gc.h \
158 159 freelist.h minor_gc.h
159   -debugger.d.o: debugger.c config.h ../config/m.h ../config/s.h \
160   - compatibility.h debugger.h misc.h mlvalues.h fail.h fix_code.h \
  160 +debugger.d.o: debugger.c alloc.h compatibility.h misc.h config.h \
  161 + ../config/m.h ../config/s.h mlvalues.h debugger.h fail.h fix_code.h \
161 162 instruct.h intext.h io.h stacks.h memory.h gc.h major_gc.h freelist.h \
162 163 minor_gc.h sys.h
163 164 dynlink.d.o: dynlink.c config.h ../config/m.h ../config/s.h compatibility.h \
164 165 alloc.h misc.h mlvalues.h dynlink.h fail.h memory.h gc.h major_gc.h \
165 166 freelist.h minor_gc.h osdeps.h prims.h
166 167 extern.d.o: extern.c alloc.h compatibility.h misc.h config.h ../config/m.h \
167   - ../config/s.h mlvalues.h custom.h fail.h gc.h intext.h io.h fix_code.h \
  168 + ../config/s.h mlvalues.h custom.h fail.h gc.h intext.h io.h md5.h \
168 169 memory.h major_gc.h freelist.h minor_gc.h reverse.h
169 170 fail.d.o: fail.c alloc.h compatibility.h misc.h config.h ../config/m.h \
170 171 ../config/s.h mlvalues.h fail.h io.h gc.h memory.h major_gc.h \
@@ -174,7 +175,8 @@ finalise.d.o: finalise.c callback.h compatibility.h mlvalues.h config.h \
174 175 major_gc.h freelist.h minor_gc.h signals.h
175 176 fix_code.d.o: fix_code.c config.h ../config/m.h ../config/s.h \
176 177 compatibility.h debugger.h misc.h mlvalues.h fix_code.h instruct.h \
177   - md5.h io.h memory.h gc.h major_gc.h freelist.h minor_gc.h reverse.h
  178 + intext.h io.h md5.h memory.h gc.h major_gc.h freelist.h minor_gc.h \
  179 + reverse.h
178 180 floats.d.o: floats.c alloc.h compatibility.h misc.h config.h ../config/m.h \
179 181 ../config/s.h mlvalues.h fail.h memory.h gc.h major_gc.h freelist.h \
180 182 minor_gc.h reverse.h stacks.h
@@ -190,20 +192,20 @@ globroots.d.o: globroots.c memory.h compatibility.h config.h ../config/m.h \
190 192 roots.h globroots.h
191 193 hash.d.o: hash.c mlvalues.h compatibility.h config.h ../config/m.h \
192 194 ../config/s.h misc.h custom.h memory.h gc.h major_gc.h freelist.h \
193   - minor_gc.h
  195 + minor_gc.h hash.h int64_native.h
194 196 instrtrace.d.o: instrtrace.c instruct.h misc.h compatibility.h config.h \
195 197 ../config/m.h ../config/s.h mlvalues.h opnames.h prims.h stacks.h \
196 198 memory.h gc.h major_gc.h freelist.h minor_gc.h
197 199 intern.d.o: intern.c alloc.h compatibility.h misc.h config.h ../config/m.h \
198   - ../config/s.h mlvalues.h custom.h fail.h gc.h intext.h io.h fix_code.h \
199   - memory.h major_gc.h freelist.h minor_gc.h reverse.h
  200 + ../config/s.h mlvalues.h callback.h custom.h fail.h gc.h intext.h io.h \
  201 + md5.h memory.h major_gc.h freelist.h minor_gc.h reverse.h
200 202 interp.d.o: interp.c alloc.h compatibility.h misc.h config.h ../config/m.h \
201 203 ../config/s.h mlvalues.h backtrace.h callback.h debugger.h fail.h \
202 204 fix_code.h instrtrace.h instruct.h interp.h major_gc.h freelist.h \
203 205 memory.h gc.h minor_gc.h prims.h signals.h stacks.h
204 206 ints.d.o: ints.c alloc.h compatibility.h misc.h config.h ../config/m.h \
205   - ../config/s.h mlvalues.h custom.h fail.h intext.h io.h fix_code.h \
206   - memory.h gc.h major_gc.h freelist.h minor_gc.h int64_native.h
  207 + ../config/s.h mlvalues.h custom.h fail.h intext.h io.h memory.h gc.h \
  208 + major_gc.h freelist.h minor_gc.h int64_native.h
207 209 io.d.o: io.c config.h ../config/m.h ../config/s.h compatibility.h alloc.h \
208 210 misc.h mlvalues.h custom.h fail.h io.h memory.h gc.h major_gc.h \
209 211 freelist.h minor_gc.h signals.h sys.h
@@ -280,7 +282,7 @@ array.pic.o: array.c alloc.h compatibility.h misc.h config.h ../config/m.h \
280 282 minor_gc.h
281 283 backtrace.pic.o: backtrace.c config.h ../config/m.h ../config/s.h \
282 284 compatibility.h mlvalues.h misc.h alloc.h io.h instruct.h intext.h \
283   - fix_code.h exec.h memory.h gc.h major_gc.h freelist.h minor_gc.h \
  285 + exec.h fix_code.h memory.h gc.h major_gc.h freelist.h minor_gc.h \
284 286 startup.h stacks.h sys.h backtrace.h
285 287 callback.pic.o: callback.c callback.h compatibility.h mlvalues.h config.h \
286 288 ../config/m.h ../config/s.h misc.h fail.h memory.h gc.h major_gc.h \
@@ -294,15 +296,15 @@ compare.pic.o: compare.c custom.h compatibility.h mlvalues.h config.h \
294 296 custom.pic.o: custom.c alloc.h compatibility.h misc.h config.h ../config/m.h \
295 297 ../config/s.h mlvalues.h custom.h fail.h memory.h gc.h major_gc.h \
296 298 freelist.h minor_gc.h
297   -debugger.pic.o: debugger.c config.h ../config/m.h ../config/s.h \
298   - compatibility.h debugger.h misc.h mlvalues.h fail.h fix_code.h \
  299 +debugger.pic.o: debugger.c alloc.h compatibility.h misc.h config.h \
  300 + ../config/m.h ../config/s.h mlvalues.h debugger.h fail.h fix_code.h \
299 301 instruct.h intext.h io.h stacks.h memory.h gc.h major_gc.h freelist.h \
300 302 minor_gc.h sys.h
301 303 dynlink.pic.o: dynlink.c config.h ../config/m.h ../config/s.h compatibility.h \
302 304 alloc.h misc.h mlvalues.h dynlink.h fail.h memory.h gc.h major_gc.h \
303 305 freelist.h minor_gc.h osdeps.h prims.h
304 306 extern.pic.o: extern.c alloc.h compatibility.h misc.h config.h ../config/m.h \
305   - ../config/s.h mlvalues.h custom.h fail.h gc.h intext.h io.h fix_code.h \
  307 + ../config/s.h mlvalues.h custom.h fail.h gc.h intext.h io.h md5.h \
306 308 memory.h major_gc.h freelist.h minor_gc.h reverse.h
307 309 fail.pic.o: fail.c alloc.h compatibility.h misc.h config.h ../config/m.h \
308 310 ../config/s.h mlvalues.h fail.h io.h gc.h memory.h major_gc.h \
@@ -312,7 +314,8 @@ finalise.pic.o: finalise.c callback.h compatibility.h mlvalues.h config.h \
312 314 major_gc.h freelist.h minor_gc.h signals.h
313 315 fix_code.pic.o: fix_code.c config.h ../config/m.h ../config/s.h \
314 316 compatibility.h debugger.h misc.h mlvalues.h fix_code.h instruct.h \
315   - md5.h io.h memory.h gc.h major_gc.h freelist.h minor_gc.h reverse.h
  317 + intext.h io.h md5.h memory.h gc.h major_gc.h freelist.h minor_gc.h \
  318 + reverse.h
316 319 floats.pic.o: floats.c alloc.h compatibility.h misc.h config.h ../config/m.h \
317 320 ../config/s.h mlvalues.h fail.h memory.h gc.h major_gc.h freelist.h \
318 321 minor_gc.h reverse.h stacks.h
@@ -328,18 +331,18 @@ globroots.pic.o: globroots.c memory.h compatibility.h config.h ../config/m.h \
328 331 roots.h globroots.h
329 332 hash.pic.o: hash.c mlvalues.h compatibility.h config.h ../config/m.h \
330 333 ../config/s.h misc.h custom.h memory.h gc.h major_gc.h freelist.h \
331   - minor_gc.h
  334 + minor_gc.h hash.h int64_native.h
332 335 instrtrace.pic.o: instrtrace.c
333 336 intern.pic.o: intern.c alloc.h compatibility.h misc.h config.h ../config/m.h \
334   - ../config/s.h mlvalues.h custom.h fail.h gc.h intext.h io.h fix_code.h \
335   - memory.h major_gc.h freelist.h minor_gc.h reverse.h
  337 + ../config/s.h mlvalues.h callback.h custom.h fail.h gc.h intext.h io.h \
  338 + md5.h memory.h major_gc.h freelist.h minor_gc.h reverse.h
336 339 interp.pic.o: interp.c alloc.h compatibility.h misc.h config.h ../config/m.h \
337 340 ../config/s.h mlvalues.h backtrace.h callback.h debugger.h fail.h \
338 341 fix_code.h instrtrace.h instruct.h interp.h major_gc.h freelist.h \
339 342 memory.h gc.h minor_gc.h prims.h signals.h stacks.h jumptbl.h
340 343 ints.pic.o: ints.c alloc.h compatibility.h misc.h config.h ../config/m.h \
341   - ../config/s.h mlvalues.h custom.h fail.h intext.h io.h fix_code.h \
342   - memory.h gc.h major_gc.h freelist.h minor_gc.h int64_native.h
  344 + ../config/s.h mlvalues.h custom.h fail.h intext.h io.h memory.h gc.h \
  345 + major_gc.h freelist.h minor_gc.h int64_native.h
343 346 io.pic.o: io.c config.h ../config/m.h ../config/s.h compatibility.h alloc.h \
344 347 misc.h mlvalues.h custom.h fail.h io.h memory.h gc.h major_gc.h \
345 348 freelist.h minor_gc.h signals.h sys.h
2  byterun/.ignore
@@ -4,7 +4,9 @@ prims.c
4 4 opnames.h
5 5 version.h
6 6 ocamlrun
  7 +ocamlrun.exe
7 8 ocamlrund
  9 +ocamlrund.exe
8 10 ld.conf
9 11 interp.a.lst
10 12 *.[sd]obj
2  byterun/Makefile
@@ -32,7 +32,7 @@ ocamlrun$(EXE): libcamlrun.a prims.o
32 32 prims.o libcamlrun.a $(BYTECCLIBS)
33 33
34 34 ocamlrund$(EXE): libcamlrund.a prims.o
35   - $(MKEXE) -g $(BYTECCLINKOPTS) -o ocamlrund$(EXE) \
  35 + $(MKEXE) $(MKEXEDEBUGFLAG) $(BYTECCLINKOPTS) -o ocamlrund$(EXE) \
36 36 prims.o libcamlrund.a $(BYTECCLIBS)
37 37
38 38 libcamlrun.a: $(OBJS)
12 byterun/compact.c
@@ -397,7 +397,7 @@ uintnat caml_percent_max; /* used in gc_ctrl.c and memory.c */
397 397
398 398 void caml_compact_heap (void)
399 399 {
400   - uintnat target_size;
  400 + uintnat target_size, live;
401 401
402 402 do_compaction ();
403 403 /* Compaction may fail to shrink the heap to a reasonable size
@@ -416,13 +416,15 @@ void caml_compact_heap (void)
416 416 /* We compute:
417 417 freewords = caml_fl_cur_size (exact)
418 418 heapsize = caml_heap_size (exact)
419   - usedwords = heap_size - freewords
420   - target_size = usedwords * (1 + caml_percent_free / 100)
  419 + live = heap_size - freewords
  420 + target_size = live * (1 + caml_percent_free / 100)
  421 + = live / 100 * (100 + caml_percent_free)
  422 + We add 1 to live/100 to make sure it isn't 0.
421 423
422 424 We recompact if target_size < heap_size / 2
423 425 */
424   - target_size = (caml_stat_heap_size - Bsize_wsize (caml_fl_cur_size))
425   - * (100 + caml_percent_free) / 100;
  426 + live = caml_stat_heap_size - Bsize_wsize (caml_fl_cur_size);
  427 + target_size = (live / 100 + 1) * (100 + caml_percent_free);
426 428 target_size = caml_round_heap_chunk_size (target_size);
427 429 if (target_size < caml_stat_heap_size / 2){
428 430 char *chunk;
4 byterun/freelist.c
@@ -532,14 +532,14 @@ void caml_set_allocation_policy (uintnat p)
532 532 switch (p){
533 533 case Policy_next_fit:
534 534 fl_prev = Fl_head;
  535 + policy = p;
535 536 break;
536 537 case Policy_first_fit:
537 538 flp_size = 0;
538 539 beyond = NULL;
  540 + policy = p;
539 541 break;
540 542 default:
541   - Assert (0);
542 543 break;
543 544 }
544   - policy = p;
545 545 }
20 byterun/gc_ctrl.c
@@ -356,21 +356,12 @@ static intnat norm_minsize (intnat s)
356 356 return s;
357 357 }
358 358
359   -static intnat norm_policy (intnat p)
360   -{
361   - if (p >= 0 && p <= 1){
362   - return p;
363   - }else{
364   - return 1;
365   - }
366   -}
367   -
368 359 CAMLprim value caml_gc_set(value v)
369 360 {
370 361 uintnat newpf, newpm;
371 362 asize_t newheapincr;
372 363 asize_t newminsize;
373   - uintnat newpolicy;
  364 + uintnat oldpolicy;
374 365
375 366 caml_verb_gc = Long_val (Field (v, 3));
376 367
@@ -396,10 +387,11 @@ CAMLprim value caml_gc_set(value v)
396 387 caml_gc_message (0x20, "New heap increment size: %luk bytes\n",
397 388 caml_major_heap_increment/1024);
398 389 }
399   - newpolicy = norm_policy (Long_val (Field (v, 6)));
400   - if (newpolicy != caml_allocation_policy){
401   - caml_gc_message (0x20, "New allocation policy: %d\n", newpolicy);
402   - caml_set_allocation_policy (newpolicy);
  390 + oldpolicy = caml_allocation_policy;
  391 + caml_set_allocation_policy (Long_val (Field (v, 6)));
  392 + if (oldpolicy != caml_allocation_policy){
  393 + caml_gc_message (0x20, "New allocation policy: %d\n",
  394 + caml_allocation_policy);
403 395 }
404 396
405 397 /* Minor heap size comes last because it will trigger a minor collection
2  byterun/io.c
@@ -284,7 +284,7 @@ CAMLexport int caml_do_read(int fd, char *p, unsigned int n)
284 284 retcode = read(fd, p, 16384);
285 285 }
286 286 #endif
287   - caml_leave_blocking_section();
  287 + caml_leave_blocking_section();
288 288 } while (retcode == -1 && errno == EINTR);
289 289 if (retcode == -1) caml_sys_io_error(NO_ARG);
290 290 return retcode;
1  camlp4/boot/.ignore
@@ -2,3 +2,4 @@ camlp4
2 2 camlp4o
3 3 camlp4r
4 4 SAVED
  5 +*.old
9 config/auto-aux/cfi.S
... ... @@ -1,3 +1,6 @@
1   -.cfi_startproc
2   -.cfi_adjust_cfa_offset 8
3   -.cfi_endproc
  1 +camlPervasives__loop_1128:
  2 + .file 1 "pervasives.ml"
  3 + .loc 1 193
  4 + .cfi_startproc
  5 + .cfi_adjust_cfa_offset 8
  6 + .cfi_endproc
7 configure
@@ -256,6 +256,7 @@ esac
256 256
257 257 bytecc="$cc"
258