summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorJun FURUSE / 古瀬 淳 <jun.furuse@gmail.com>2008-01-28 05:29:20 +0000
committerJun FURUSE / 古瀬 淳 <jun.furuse@gmail.com>2008-01-28 05:29:20 +0000
commit3f4a98da0fbf8a87c674d6737d8c6cec7e8567e5 (patch)
treef5aa13505824d708414ece1f00219b811315c44a /tools
parent30f3fa2c5bc27f8c59930741aa1b6dd5a34a6b40 (diff)
downloadocaml-gcaml3090.tar.gz
3.09.1 updategcaml3090
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/gcaml3090@8792 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'tools')
-rw-r--r--tools/Makefile3
-rw-r--r--tools/depend.ml1
-rw-r--r--tools/dumpobj.ml30
-rwxr-xr-xtools/make-package-macosx4
-rwxr-xr-xtools/ocaml-objcopy-macosx5
-rw-r--r--tools/ocamlmklib.mlp2
-rw-r--r--tools/ocamlmktop.tpl2
-rw-r--r--tools/ocamlprof.ml1
8 files changed, 32 insertions, 16 deletions
diff --git a/tools/Makefile b/tools/Makefile
index bf8c048393..213f9d0cff 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -23,7 +23,8 @@ INCLUDES=-I ../utils -I ../parsing -I ../typing -I ../bytecomp -I ../asmcomp \
COMPFLAGS= -warn-error Agy $(INCLUDES)
LINKFLAGS=$(INCLUDES) -nogcamllib
-all: ocamldep ocamlprof ocamlcp ocamlmktop ocamlmklib scrapelabels addlabels
+all: ocamldep ocamlprof ocamlcp ocamlmktop ocamlmklib scrapelabels addlabels \
+ dumpobj
opt.opt: ocamldep.opt
diff --git a/tools/depend.ml b/tools/depend.ml
index 2d3668a0d8..5abc68aae6 100644
--- a/tools/depend.ml
+++ b/tools/depend.ml
@@ -171,6 +171,7 @@ let rec add_expr bv exp =
List.iter (fun (po, e) ->
add_opt add_type bv po;
add_expr bv e) cases
+ | Pexp_regexp _ -> assert false
and add_pat_expr_list bv pel =
List.iter (fun (p, e) -> add_pattern bv p; add_expr bv e) pel
diff --git a/tools/dumpobj.ml b/tools/dumpobj.ml
index c52942a123..3f39687024 100644
--- a/tools/dumpobj.ml
+++ b/tools/dumpobj.ml
@@ -14,15 +14,16 @@
(* Disassembler for executable and .cmo object files *)
-open Obj
-open Printf
-open Config
open Asttypes
-open Lambda
+open Config
open Emitcode
-open Opcodes
open Instruct
+open Lambda
+open Location
+open Obj
+open Opcodes
open Opnames
+open Printf
(* Read signed and unsigned integers *)
@@ -107,6 +108,9 @@ let rec print_struct_const = function
(* Print an obj *)
+let same_custom x y =
+ Obj.field x 0 = Obj.field (Obj.repr y) 0
+
let rec print_obj x =
if Obj.is_block x then begin
let tag = Obj.tag x in
@@ -122,7 +126,13 @@ let rec print_obj x =
printf "%.12g" a.(i)
done;
printf "|]"
- end else if tag < Obj.no_scan_tag then begin
+ end else if tag = Obj.custom_tag && same_custom x 0l then
+ printf "%ldl" (Obj.magic x : int32)
+ else if tag = Obj.custom_tag && same_custom x 0n then
+ printf "%ndn" (Obj.magic x : nativeint)
+ else if tag = Obj.custom_tag && same_custom x 0L then
+ printf "%LdL" (Obj.magic x : int64)
+ else if tag < Obj.no_scan_tag then begin
printf "<%d>" (Obj.tag x);
match Obj.size x with
0 -> ()
@@ -388,9 +398,11 @@ let op_shapes = [
];;
let print_event ev =
- printf "File \"%s\", line %d, character %d:\n" ev.ev_char.Lexing.pos_fname
- ev.ev_char.Lexing.pos_lnum
- (ev.ev_char.Lexing.pos_cnum - ev.ev_char.Lexing.pos_bol)
+ let ls = ev.ev_loc.loc_start in
+ let le = ev.ev_loc.loc_end in
+ printf "File \"%s\", line %d, characters %d-%d:\n" ls.Lexing.pos_fname
+ ls.Lexing.pos_lnum (ls.Lexing.pos_cnum - ls.Lexing.pos_bol)
+ (le.Lexing.pos_cnum - ls.Lexing.pos_bol)
let print_instr ic =
let pos = currpos ic in
diff --git a/tools/make-package-macosx b/tools/make-package-macosx
index 8822871d71..7dd79175a2 100755
--- a/tools/make-package-macosx
+++ b/tools/make-package-macosx
@@ -103,8 +103,8 @@ mkdir -p resources
# stop here -> |
cat >resources/ReadMe.txt <<EOF
This package installs Objective Caml version ${VERSION}.
-You need Mac OS X 10.3 (panther), with X11 and the
-XCode tools installed.
+You need Mac OS X 10.4.x (Tiger), with X11 and the
+XCode tools (v2.2) installed.
Files will be installed in the following directories:
diff --git a/tools/ocaml-objcopy-macosx b/tools/ocaml-objcopy-macosx
index 31070f54b5..cb2f703b4d 100755
--- a/tools/ocaml-objcopy-macosx
+++ b/tools/ocaml-objcopy-macosx
@@ -15,8 +15,9 @@
# $Id$
-TEMP=/tmp/ocaml-objcopy-$$.o
-UNDEF=/tmp/ocaml-objcopy-$$.sym
+TMP="${TMPDIR=/tmp}"
+TEMP="${TMP}"/ocaml-objcopy-$$.o
+UNDEF="${TMP}"/ocaml-objcopy-$$.sym
usage () {
echo "usage: objcopy {--redefine-sym <old>=<new>} file.o" >&2
diff --git a/tools/ocamlmklib.mlp b/tools/ocamlmklib.mlp
index 5481b881a4..7882d00912 100644
--- a/tools/ocamlmklib.mlp
+++ b/tools/ocamlmklib.mlp
@@ -135,7 +135,7 @@ let parse_arguments argv =
if !output_c = "" then output_c := !output
let usage = "\
-Usage: ocamlmklib [options] <.cmo|.cma|.cmx|.cmxa|.ml|.mli|.o|.a files>
+Usage: gcamlmklib [options] <.cmo|.cma|.cmx|.cmxa|.ml|.mli|.o|.a files>
Options are:
-cclib <lib> C library passed to ocamlc -a or ocamlopt -a only
-ccopt <opt> C option passed to ocamlc -a or ocamlopt -a only
diff --git a/tools/ocamlmktop.tpl b/tools/ocamlmktop.tpl
index 477f7387ce..ed504f7c55 100644
--- a/tools/ocamlmktop.tpl
+++ b/tools/ocamlmktop.tpl
@@ -13,4 +13,4 @@
# $Id$
-exec %%BINDIR%%/ocamlc -linkall toplevellib.cma "$@" topstart.cmo
+exec %%BINDIR%%/gcamlc -linkall toplevellib.cma "$@" topstart.cmo
diff --git a/tools/ocamlprof.ml b/tools/ocamlprof.ml
index 564afc1034..b7cd252111 100644
--- a/tools/ocamlprof.ml
+++ b/tools/ocamlprof.ml
@@ -289,6 +289,7 @@ and rw_exp iflag sexp =
| Pexp_rtype ty -> () (* FIXME *)
| Pexp_typedecl lid -> () (* FIXME *)
| Pexp_generic cases -> () (* FIXME *)
+ | Pexp_regexp _ -> assert false (* FIXME *)
and rewrite_ifbody iflag ghost sifbody =
if !instr_if && not ghost then