summaryrefslogtreecommitdiff
path: root/tools/dumpobj.ml
diff options
context:
space:
mode:
authorJun FURUSE / 古瀬 淳 <jun.furuse@gmail.com>2004-06-18 05:04:14 +0000
committerJun FURUSE / 古瀬 淳 <jun.furuse@gmail.com>2004-06-18 05:04:14 +0000
commit5e1bf20850aaa9b1ceb86a971848609ee9e84c47 (patch)
treef3a6e5b5c38263fe527e6275ff95425f12637226 /tools/dumpobj.ml
parent8ec769214e067da9ee8b33d05f4ef275e9269dd5 (diff)
downloadocaml-gcaml.tar.gz
port to the latest ocaml (2004/06/18)gcaml
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/gcaml@6419 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'tools/dumpobj.ml')
-rw-r--r--tools/dumpobj.ml15
1 files changed, 13 insertions, 2 deletions
diff --git a/tools/dumpobj.ml b/tools/dumpobj.ml
index 4605b765ad..a362c91a10 100644
--- a/tools/dumpobj.ml
+++ b/tools/dumpobj.ml
@@ -234,6 +234,7 @@ type shape =
| Uint_Primitive
| Switch
| Closurerec
+ | Pubmet
;;
let op_shapes = [
@@ -368,6 +369,8 @@ let op_shapes = [
opOFFSETREF, Sint;
opISINT, Nothing;
opGETMETHOD, Nothing;
+ opGETDYNMET, Nothing;
+ opGETPUBMET, Pubmet;
opBEQ, Sint_Disp;
opBNEQ, Sint_Disp;
opBLTINT, Sint_Disp;
@@ -436,6 +439,10 @@ let print_instr ic =
print_string ", ";
print_int (orig + inputu ic);
done;
+ | Pubmet
+ -> let tag = inputs ic in
+ let cache = inputu ic in
+ print_int tag
| Nothing -> ()
with Not_found -> print_string "(unknown arguments)"
end;
@@ -522,13 +529,17 @@ let dump_exe ic =
let main() =
for i = 1 to Array.length Sys.argv - 1 do
- let ic = open_in_bin Sys.argv.(i) in
+ let filnam = Sys.argv.(i) in
+ let ic = open_in_bin filnam in
+ if i>1 then print_newline ();
+ printf "## start of ocaml dump of %S\n%!" filnam;
begin try
objfile := false; dump_exe ic
with Bytesections.Bad_magic_number ->
objfile := true; seek_in ic 0; dump_obj (Sys.argv.(i)) ic
end;
- close_in ic
+ close_in ic;
+ printf "## end of ocaml dump of %S\n%!" filnam;
done;
exit 0