Commits

camlspotter  committed 44af6d9 Merge

merge

  • Participants
  • Parent commits cf8f011, c49e9bb
  • Branches custom

Comments (0)

Files changed (1287)

 bytecomp/typeopt.cmi: typing/typedtree.cmi typing/path.cmi \
     bytecomp/lambda.cmi
 bytecomp/bytegen.cmo: typing/types.cmi bytecomp/switch.cmi typing/subst.cmi \
-    typing/stypes.cmi typing/primitive.cmi utils/misc.cmi bytecomp/lambda.cmi \
+    typing/primitive.cmi utils/misc.cmi bytecomp/lambda.cmi \
     bytecomp/instruct.cmi typing/ident.cmi utils/config.cmi \
-    parsing/asttypes.cmi typing/annot.cmi bytecomp/bytegen.cmi
+    parsing/asttypes.cmi bytecomp/bytegen.cmi
 bytecomp/bytegen.cmx: typing/types.cmx bytecomp/switch.cmx typing/subst.cmx \
-    typing/stypes.cmx typing/primitive.cmx utils/misc.cmx bytecomp/lambda.cmx \
+    typing/primitive.cmx utils/misc.cmx bytecomp/lambda.cmx \
     bytecomp/instruct.cmx typing/ident.cmx utils/config.cmx \
-    parsing/asttypes.cmi typing/annot.cmi bytecomp/bytegen.cmi
+    parsing/asttypes.cmi bytecomp/bytegen.cmi
 bytecomp/bytelibrarian.cmo: utils/misc.cmi utils/config.cmi \
     bytecomp/cmo_format.cmi utils/clflags.cmi bytecomp/bytelink.cmi \
     bytecomp/bytelibrarian.cmi
     parsing/asttypes.cmi bytecomp/printlambda.cmi
 bytecomp/runtimedef.cmo: bytecomp/runtimedef.cmi
 bytecomp/runtimedef.cmx: bytecomp/runtimedef.cmi
-bytecomp/simplif.cmo: bytecomp/lambda.cmi typing/ident.cmi utils/clflags.cmi \
-    parsing/asttypes.cmi bytecomp/simplif.cmi
-bytecomp/simplif.cmx: bytecomp/lambda.cmx typing/ident.cmx utils/clflags.cmx \
-    parsing/asttypes.cmi bytecomp/simplif.cmi
+bytecomp/simplif.cmo: typing/stypes.cmi bytecomp/lambda.cmi typing/ident.cmi \
+    utils/clflags.cmi parsing/asttypes.cmi typing/annot.cmi \
+    bytecomp/simplif.cmi
+bytecomp/simplif.cmx: typing/stypes.cmx bytecomp/lambda.cmx typing/ident.cmx \
+    utils/clflags.cmx parsing/asttypes.cmi typing/annot.cmi \
+    bytecomp/simplif.cmi
 bytecomp/switch.cmo: bytecomp/switch.cmi
 bytecomp/switch.cmx: bytecomp/switch.cmi
 bytecomp/symtable.cmo: utils/tbl.cmi bytecomp/runtimedef.cmi \
 asmcomp/coloring.cmo: asmcomp/reg.cmi asmcomp/proc.cmi asmcomp/coloring.cmi
 asmcomp/coloring.cmx: asmcomp/reg.cmx asmcomp/proc.cmx asmcomp/coloring.cmi
 asmcomp/comballoc.cmo: asmcomp/reg.cmi asmcomp/mach.cmi utils/config.cmi \
-    asmcomp/comballoc.cmi
+    asmcomp/arch.cmo asmcomp/comballoc.cmi
 asmcomp/comballoc.cmx: asmcomp/reg.cmx asmcomp/mach.cmx utils/config.cmx \
-    asmcomp/comballoc.cmi
+    asmcomp/arch.cmx asmcomp/comballoc.cmi
 asmcomp/compilenv.cmo: utils/misc.cmi typing/ident.cmi typing/env.cmi \
     utils/config.cmi asmcomp/cmx_format.cmi asmcomp/clambda.cmi \
     asmcomp/compilenv.cmi
     asmcomp/schedgen.cmi
 asmcomp/scheduling.cmo: asmcomp/schedgen.cmi asmcomp/scheduling.cmi
 asmcomp/scheduling.cmx: asmcomp/schedgen.cmx asmcomp/scheduling.cmi
-asmcomp/selectgen.cmo: utils/tbl.cmi asmcomp/reg.cmi asmcomp/proc.cmi \
-    utils/misc.cmi asmcomp/mach.cmi typing/ident.cmi asmcomp/debuginfo.cmi \
-    asmcomp/cmm.cmi asmcomp/arch.cmo asmcomp/selectgen.cmi
-asmcomp/selectgen.cmx: utils/tbl.cmx asmcomp/reg.cmx asmcomp/proc.cmx \
-    utils/misc.cmx asmcomp/mach.cmx typing/ident.cmx asmcomp/debuginfo.cmx \
-    asmcomp/cmm.cmx asmcomp/arch.cmx asmcomp/selectgen.cmi
+asmcomp/selectgen.cmo: utils/tbl.cmi bytecomp/simplif.cmi asmcomp/reg.cmi \
+    asmcomp/proc.cmi utils/misc.cmi asmcomp/mach.cmi typing/ident.cmi \
+    asmcomp/debuginfo.cmi asmcomp/cmm.cmi asmcomp/arch.cmo \
+    asmcomp/selectgen.cmi
+asmcomp/selectgen.cmx: utils/tbl.cmx bytecomp/simplif.cmx asmcomp/reg.cmx \
+    asmcomp/proc.cmx utils/misc.cmx asmcomp/mach.cmx typing/ident.cmx \
+    asmcomp/debuginfo.cmx asmcomp/cmm.cmx asmcomp/arch.cmx \
+    asmcomp/selectgen.cmi
 asmcomp/selection.cmo: asmcomp/selectgen.cmi asmcomp/reg.cmi asmcomp/proc.cmi \
     utils/misc.cmi asmcomp/mach.cmi asmcomp/debuginfo.cmi asmcomp/cmm.cmi \
     asmcomp/arch.cmo asmcomp/selection.cmi
+7a2411ecdbf4c48f092840debcbc6fe75a84ce5f v3.12.1-ocamlspot-1.3.0

File 0scripts/0CHECKOUT-SVN

 #!/bin/sh
-# rev 10643
-svn co http://caml.inria.fr/svn/ocaml/release/3.12.0/
-
+# rev 11110
+VERSION=3.12.1
+/bin/rm -rf [A-z]* \#*
+svn co http://caml.inria.fr/svn/ocaml/release/$VERSION/
+(cd $VERSION; tar cf - .) | tar xvf -
+/bin/rm -rf $VERSION
+hg rm `hg status | grep '^!' | awk '{ print $2 }'`
+hg add [A-z]*
+echo OCaml $VERSION svn source is copied. Now ready to commit.

File 0scripts/0CONF.sh

 #!/bin/sh
 
-SVNREV=10643
-VERSION=3.12.0
-SPOTVERSION=1.2.1
+SVNREV=11094
+VERSION=3.12.1+rc1
+SPOTVERSION=1.3.0
 
 BIGVERSION=`echo $VERSION | sed -r -e 's/^([0-9]+\.[0-9]+)\..*$/\1/'`
 

File 0scripts/0README.txt

+Files here are small build scripts for Jun FURUSE. Just ignore them.

File 0scripts/Makefile

+.DEFAULT: BRAIN_DEAD_INSTALL.sh INSTALL-ocamlspot.txt VERIFY.sh
+
+BRAIN_DEAD_INSTALL.sh INSTALL-ocamlspot.txt VERIFY.sh: BRAIN_DEAD_INSTALL.sh.in INSTALL-ocamlspot.txt.in VERIFY.sh.in 0MAKESCRIPTS.sh
+	./0MAKESCRIPTS.sh
+

File 0scripts/recover_mode.pl

-#!/usr/bin/perl
-
-# ocaml svn site tar ball has no file perm info. This script tries to fix it from hg diff -g output
-
-$rev = $ARGV[0];
-print STDERR "rev=$rev\n";
-open(IN, "hg diff -g -r $rev |");
-while(<IN>){
-    if( /^diff --git a\/([^ ]+)/ ){
-	$target = $1;
-    }
-    if( /^old mode ([0-9]+)/ ){
-	$mod = $1;
-	print "$target : $mod\n";
-	$mod =~ s/^100//;
-	`chmod $mod $target`;
-    }
-}
-
 Objective Caml 3.12.1:
 ----------------------
 
-- Changed default minor heap size from 32k to 256k words.
-
 Bug fixes:
 - PR#4345, PR#4767: problems with camlp4 printing of float values
 - PR#4380: ocamlbuild should not use tput on windows
+- PR#4487, PR#5164: multiple 'module type of' are incompatible
 - PR#4552: ocamlbuild does not create symlinks when using '.itarget' file
 - PR#4673, PR#5144: camlp4 fails on object copy syntax
+- PR#4702: system threads: cleanup tick thread at exit
+- PR#4732: camlp4 rejects polymorphic variants using keywords from macros
+- PR#4778: Win32/MSVC port: rare syntax error in generated MASM assembly file
 - PR#4794, PR#4959: call annotations not generated by ocamlopt
 - PR#4820: revised syntax pretty printer crashes with 'Stack_overflow'
 - PR#4928: wrong printing of classes and class types by camlp4
+- PR#4939: camlp4 rejects patterns of the '?x:_' form
 - PR#4967: ocamlbuild passes wrong switches to ocamldep through menhir
 - PR#4972: mkcamlp4 does not include 'dynlink.cma'
 - PR#5039: ocamlbuild should use '-linkpkg' only when linking programs
+- PR#5066: ocamldoc: add -charset option used in html generator
+- PR#5069: fcntl() in caml_sys_open may block, do it within blocking section
 - PR#5071, PR#5129, PR#5134: inconsistencies between camlp4 and camlp4* binaries
 - PR#5080, PR#5104: regression in type constructor handling by camlp4
+- PR#5090: bad interaction between toplevel and camlp4
 - PR#5095: ocamlbuild ignores some tags when building bytecode objects
 - PR#5100: ocamlbuild always rebuilds a 'cmxs' file
 - PR#5103: build and install objinfo when building with ocamlbuild
+- PR#5109: crash when a parser calls a lexer that calls another parser
 - PR#5110: invalid module name when using optional argument
+- PR#5115: bytecode executables produced by msvc64 port crash on 32-bit versions
+- PR#5117: bigarray: wrong function name without HAS_MMAP; missing include
 - PR#5118: Camlp4o and integer literals
+- PR#5122: camlp4 rejects lowercase identifiers for module types
+- PR#5123: shift_right_big_int returns a wrong zero
+- PR#5124: substitution inside a signature leads to odd printing
 - PR#5128: typo in 'Camlp4ListComprehension' syntax extension
+- PR#5136: obsolete function used in emacs mode
+- PR#5145: ocamldoc: missing html escapes
+- PR#5146: problem with spaces in multi-line string constants
+- PR#5149: (partial) various documentation problems
+- PR#5156: rare compiler crash with objects
 - PR#5165: ocamlbuild does not pass '-thread' option to ocamlfind
 - PR#5167: camlp4r loops when printing package type
 - PR#5172: camlp4 support for 'module type of' construct
+- PR#5175: in bigarray accesses, make sure bigarray expr is evaluated only once
 - PR#5177: Gc.compact implies Gc.full_major
+- PR#5182: use bytecode version of ocamldoc to generate man pages
+- PR#5184: under Windows, alignment issue with bigarrays mapped from files
+- PR#5188: double-free corruption in bytecode system threads
+- PR#5192: mismatch between words and bytes in interpreting max_young_wosize
+- PR#5202: error in documentation of atan2
 - PR#5209: natdynlink incorrectly detected on BSD systems
 - PR#5213: ocamlbuild should pass '-rectypes' to ocamldoc when needed
 - PR#5217: ocamlfind plugin should add '-linkpkg' for toplevel
+- PR#5228: document the exceptions raised by functions in 'Filename'
+- PR#5229: typo in build script ('TAG_LINE' vs 'TAGLINE')
+- PR#5230: error in documentation of Scanf.Scanning.open_in
+- PR#5234: option -shared reverses order of -cclib options
 - PR#5237: incorrect .size directives generated for x86-32 and x86-64
+- PR#5244: String.compare uses polymorphic compare_val (regression of PR#4194)
+- PR#5248: regression introduced while fixing PR#5118
+- PR#5252: typo in docs
+- PR#5258: win32unix: unix fd leak under windows
+- PR#5269: (tentative fix) Wrong ext_ref entries in .annot files
+- PR#5272: caml.el doesn't recognize downto as a keyword
+- PR#5276: issue with ocamlc -pack and recursively-packed modules
+- PR#5280: alignment constraints incorrectly autodetected on MIPS 32
+- PR#5281: typo in error message
+- PR#5308: unused variables not detected in "include (struct .. end)"
+- camlp4 revised syntax printing bug in the toplevel (reported on caml-list)
+- configure: do not define _WIN32 under cygwin
+- Hardened generic comparison in the case where two custom blocks
+  are compared and have different sets of custom operations.
+- Hardened comparison between bigarrays in the case where the two
+  bigarrays have different kinds.
+- Fixed wrong autodetection of expm1() and log1p().
+- don't add .exe suffix when installing the ocamlmktop shell script
+- ocamldoc: minor fixes related to the display of ocamldoc options
+- fixed bug with huge values in OCAMLRUNPARAM
+- mismatch between declaration and definition of caml_major_collection_slice
 
 Feature wishes:
 - PR#4992: added '-ml-synonym' and '-mli-synonym' options to ocamldep
 - PR#5139: added possibility to add options to ocamlbuild
 - PR#5158: added access to current camlp4 parsers and printers
 - PR#5180: improved instruction selection for float operations on amd64
-
+- stdlib: added a 'usage_string' function to Arg
+- allow with constraints to add a type equation to a datatype definition
+- ocamldoc: allow to merge '@before' tags like other ones
+- ocamlbuild: allow dependency on file "_oasis"
+
+Other changes:
+- Changed default minor heap size from 32k to 256k words.
+- Added new operation 'compare_ext' to custom blocks, called when
+  comparing a custom block value with an unboxed integer.
 
 Objective Caml 3.12.0:
 ----------------------
 
 * First public release.
 
-$Id$
+$Id: Changes 11110 2011-07-04 21:15:01Z doligez $

File INSTALL-ocamlspot.txt

+0. OCamlSpotter requires patching against the OCaml compiler, but now, 
+   thanks to the very kind interpretation of the OCaml license, OCamlSpot can be distributed
+   as an entire modified source code tree of OCaml.
+
+   In the following, some step numbers are gone, they were required when OCamlSpotter is distributed
+   as a patch.
+
+4. Build a bytecode compiler
+
+  - ./configure
+  - make core coreboot
+
+6. Continue building
+
+  - make world
+  - make opt
+  - make opt.opt
+
+8. Install it
+
+  - make install
+
+9. Emacs interface
+
+  Write the following into your .emacs:
+
+  ; load-path
+  (setq load-path (cons "WHERE-YOU-HAVE-INSTALLED-THE-ELISP" load-path))
+ 
+  ; set the path of the ocamlspot binary
+  (setq ocamlspot-path "WHERE-YOU-HAVE-INSTALLED-THE-BINARIES/ocamlspot")
+ 
+  ; autoload
+  (autoload 'ocamlspot-query "ocamlspot" "OCamlSpot")
+ 
+  ; tuareg mode hook (use caml-mode-hook instead if you use caml-mode)
+    (add-hook 'tuareg-mode-hook 
+    	  '(lambda ()
+  	     (local-set-key "\C-c;" 'ocamlspot-query)
+  	     (local-set-key "\C-c\C-t" 'ocamlspot-type)
+             (local-set-key "\C-c\C-y" 'ocamlspot-type-and-copy)
+  	     (local-set-key "\C-c\C-u" 'ocamlspot-use)
+  	     (local-set-key "\C-ct" 'caml-types-show-type)))
+ 
+10. How to use
+
+  Compiler your ML project by this patched compiler with -annot option to create .spot files. Open one of the source files in Emacs and place the cursor at the name whose definition is in question. Type C-c; will show you the defintion.
+
+11. bug report
+
+  Please report bugs to jun.furuse at gmail.
 and "the Compiler" refers to all files marked "Copyright INRIA" in the
 following directories and their sub-directories:
 
-  asmcomp, boot, bytecomp, debugger, driver, lex, ocamldoc, parsing,
-  tools, toplevel, typing, utils, yacc
+  asmcomp, boot, build, bytecomp, debugger, driver, lex, man,
+  ocamlbuild, ocamldoc, parsing, testsuite, tools, toplevel, typing,
+  utils, yacc
 
 The Compiler is distributed under the terms of the Q Public License
 version 1.0 with a change to choice of law (included below).
 #                                                                       #
 #########################################################################
 
-# $Id$
+# $Id: Makefile 10566 2010-06-16 01:32:26Z garrigue $
 
 # The main Makefile
 
 #                                                                       #
 #########################################################################
 
-# $Id$
+# $Id: Makefile.nt 10616 2010-07-06 10:02:53Z doligez $
 
 # The main Makefile
 
 
 Tier 1 (actively used and maintained by the core Caml team):
 
-    AMD64 (Opteron)    Linux
+    AMD64 (Opteron)    Linux, MacOS X, MS Windows
     IA32 (Pentium)     Linux, FreeBSD, MacOS X, MS Windows
     PowerPC            MacOS X
 
 
 
 ----
-$Id$
+$Id: README 11017 2011-04-29 09:10:12Z doligez $

File README-ocamlspot.txt

+OCamlSpotter : OCaml source browsing
+====================================
+
+  Camel spotter: Oh, it was extremely interesting, very, very -
+    quite... it was dull; dull, dull, dull, oh God it was dull. 
+    Sitting in the Waterloo waiting room. ...
+
+                                     from You're No Fun Anymore, 
+                                    Monty Python's Flying Circus
+
+OCaml module language is powerful. So extremely powerful that you can
+be lost yourself easily inside a huge OCaml project with tons of
+modules and functors. Spotting the definition of a variable is
+sometimes "extremely interesting". Let's see such an example:
+
+  include M
+  open N
+  open O
+  let _ = f 1
+
+Suppose you are not familiar with the function f and want to spot its
+definition. Where to find it? Just from the code you are looking at,
+it is not sure: if you are enough lucky it may be f in m.ml, n.ml or
+o.ml in your current working directory. Otherwise, it may be O.f in
+n.ml. Or probably N.O.f in m.ml. If you are unlucky and the project is
+so sophisticated, there could be complex module operations in m.ml
+(i.e includes, functor applications) and therefore the definition
+might be found somewhere completely unexpected. Module packing, module
+load paths and library installation without .ml files complicate the
+situation even worse.
+
+You first days after joining a large OCaml project should be this kind
+of manual value definition spotting with find + grep commands. Yes,
+actually it is very educational: you can learn a lot about the project
+struggling in the source tree (only if your collegues have organized
+things very well :-P), but it is still a dull job...
+
+To say short, OCamlSpotter is a tool which does this dull job
+automatically for you and permits your energy for something more
+"interesting" like Yeti spotting:
+
+ - The -annot option of ocamlc and ocamlopt is extended and creates 
+   <module>.spot files (<module>.spit for .mli), which record the
+   location information of the names defined and used in the module.
+
+ - A small application ocamlspot provides automatic where-about
+   spotting of the definition of the name you are interested in.
+
+ - ocamlspot.el provides interactive ocaml-spotting of definition 
+   locations in emacs.
+
+ - Interfaces for other editors such as vi can be built easily, if you
+   want. I do not want.
+   
+Spotting / Definition analysis
+==============================
+
+SYNOPSIS
+
+      ocamlspot [search]
+            search ::= [file] | [file]:[pos] | [file]:[kind]:[path]
+            pos ::= l[line]c[column_bytes] | b[bytes] | [bytes]
+            kind ::= v|t|e|m|mt|c|ct
+
+DESCRIPTION
+
+      Retrieve various annotation information from .spot or .spit files
+      of the source code position or identifier, specified by the
+      search spec. Information is prited to stdout. They are:
+
+      Spot: file:pos
+          The definition position of the object which the search spec
+          points to, if available.
+
+      Type: type
+      XType: type     
+          The type of the object which the search spec points to, if
+          available. In XType, paths are printed with position
+          informaiton: for example, "unit__6" instead of "unit".
+
+SEARCH
+
+      Three kinds of searches are available: file-name-only, 
+      by-position and by-path:
+
+      File-name-only search show the position independent information
+      of the module specified by [file].
+
+        Example:
+
+	$ ocamlspot -i ocamlspot.ml
+	Compile: ../ocamlc -nostdlib -I ../stdlib -annot -annot -w Ae -warn-error Ae -I ../parsing -I ../utils -I ../typing -I ../driver -I ../bytecomp -I ../tools -I ../toplevel/ -I ../otherlibs/unix -c ocamlspot.ml
+	Included_dirs:
+	  /..../ocaml/ocamlspot/
+	  /..../ocaml/ocamlspot/../stdlib
+	  /..../ocaml/ocamlspot/../parsing
+	  /..../ocaml/ocamlspot/../utils
+	  /..../ocaml/ocamlspot/../typing
+	  /..../ocaml/ocamlspot/../driver
+	  /..../ocaml/ocamlspot/../bytecomp
+	  /..../ocaml/ocamlspot/../tools
+	  /..../ocaml/ocamlspot/../toplevel/
+	  /..../ocaml/ocamlspot/../otherlibs/unix
+	BYE!
+
+      By-position search has the form [file]:[pos]. [file] is the path
+      of the target ml/mli file and [pos] is the position in the
+      target file. [pos] has three formats: l[line]c[column_bytes] by the
+      line number and column bytes, b[bytes] (and [bytes] for backward
+      compatibility) by the bytes from the beginning of the source
+      code. 
+
+        Example:
+
+	$ ocamlspot ocamlspot.ml:l129c14
+	Tree: l129c8b4035:l129c28b4055           # pos of the inner most node
+	In_module: With_pos.Fix
+	Use: Type, Path__360.t__G
+	Type: Path.t
+	XType: Path__360.t__G                    # type with ident id numbers
+	Spot: /..../ocaml/typing/path.ml:l15c5b875:l18c19b949 # the definition
+	BYE!