Commits

camlspotter  committed 701cc41

removed crc thing

  • Participants
  • Parent commits e96ca91
  • Branches ocamlspot

Comments (0)

Files changed (10)

   typing/datarepr.cmo typing/env.cmo \
   typing/typedtree.cmo typing/ctype.cmo \
   typing/printtyp.cmo typing/includeclass.cmo \
-  typing/mtype.cmo typing/spotcrc.cmo typing/spot.cmo typing/includecore.cmo \
+  typing/mtype.cmo typing/spot.cmo typing/includecore.cmo \
   typing/includemod.cmo typing/parmatch.cmo \
   typing/typetexp.cmo typing/stypes.cmo typing/typecore.cmo \
   typing/typedecl.cmo typing/typeclass.cmo \
 
 beforedepend:: parsing/linenum.ml
 
-# Spot crc
-
-tools/makespotcrc: tools/makespotcrc.ml boot/ocamlc
-	$(CAMLC) -o tools/makespotcrc tools/makespotcrc.ml
-
-typing/spotcrc.ml: typing/spot.cmi tools/makespotcrc boot/ocamlrun
-	boot/ocamlrun tools/makespotcrc > typing/spotcrc.ml
-
-typing/spot.cmo: typing/spotcrc.cmo
-
-typing/spot.cmx: typing/spotcrc.cmx
-
-partialclean::
-	rm -f typing/spotcrc.ml
-	rm -f tools/makespotcrc
-
 # The bytecode compiler compiled with the native-code compiler
 
 ocamlc.opt: $(COMPOBJS:.cmo=.cmx)

File boot/ocamlc

Binary file modified.

File boot/ocamldep

Binary file modified.

File boot/ocamllex

Binary file modified.

File ocamldoc/Makefile

 	$(OCAMLSRCDIR)/typing/stypes.cmo \
 	$(OCAMLSRCDIR)/typing/includeclass.cmo \
 	$(OCAMLSRCDIR)/typing/mtype.cmo \
-	$(OCAMLSRCDIR)/typing/spotcrc.cmo \
 	$(OCAMLSRCDIR)/typing/spot.cmo \
 	$(OCAMLSRCDIR)/typing/typetexp.cmo \
 	$(OCAMLSRCDIR)/typing/typedecl.cmo \

File ocamlspot/.depend

 command.cmx: command.cmi 
 dotfile.cmo: 
 dotfile.cmx: 
-ocamlspot.cmo: utils.cmo ../typing/types.cmi treeset.cmi \
-    ../typing/spotcrc.cmo ../typing/spot.cmi ../typing/printtyp.cmi \
-    ../typing/predef.cmi ../typing/path.cmi ../typing/ident.cmi dotfile.cmo \
-    command.cmi ../typing/btype.cmi ../typing/annot.cmi 
-ocamlspot.cmx: utils.cmx ../typing/types.cmx treeset.cmx \
-    ../typing/spotcrc.cmx ../typing/spot.cmx ../typing/printtyp.cmx \
-    ../typing/predef.cmx ../typing/path.cmx ../typing/ident.cmx dotfile.cmx \
-    command.cmx ../typing/btype.cmx ../typing/annot.cmi 
+ocamlspot.cmo: utils.cmo ../typing/types.cmi treeset.cmi ../typing/spot.cmi \
+    ../typing/printtyp.cmi ../typing/predef.cmi ../typing/path.cmi \
+    ../typing/ident.cmi dotfile.cmo command.cmi ../typing/btype.cmi \
+    ../typing/annot.cmi 
+ocamlspot.cmx: utils.cmx ../typing/types.cmx treeset.cmx ../typing/spot.cmx \
+    ../typing/printtyp.cmx ../typing/predef.cmx ../typing/path.cmx \
+    ../typing/ident.cmx dotfile.cmx command.cmx ../typing/btype.cmx \
+    ../typing/annot.cmi 
 treeset.cmo: xset.cmo treeset.cmi 
 treeset.cmx: xset.cmx treeset.cmi 
 tst.cmo: 

File ocamlspot/Makefile

   typing/datarepr typing/env \
   typing/typedtree typing/ctype \
   typing/printtyp typing/includeclass \
-  typing/mtype typing/spotcrc typing/spot typing/includecore \
+  typing/mtype typing/spot typing/includecore \
   typing/includemod typing/parmatch \
   typing/typetexp typing/stypes typing/typecore \
   typing/typedecl typing/typeclass \

File ocamlspot/ocamlspot.ml

 	| Some _ -> failwith "you can specify only one search"
 	| None -> spec := Some s)
       (Printf.sprintf 
-	  "ocamlspot search\nversion %s (spot file version %d.%d:%s)\n\
+	  "ocamlspot search\nversion %s (spot file version %d.%d)\n\
 \tsearch ::= file | file:pos | file:kind:path\n\
 \tpos ::= l<line>c<column> | b<bytes>\n\
 \tkind ::= v|t|e|m|mt|c|ct"
 	  version (* ? version *)
 	  version_major
-	  version_minor
-          (Digest.to_hex Spotcrc.crc))
+	  version_minor)
 
   let (* dump_file => *) dump_file (* <= dump_file *) = !dump_file (* ? dump_file_ref *)
   let dump_lannots = !dump_lannots
     path : string; (* "" means no source *)
     cwd : string;
     load_paths : string list;
-    version : int * int * Digest.t;
+    version : int * int;
     argv : string array;
     top : Abstraction.structure;
     flat : Abstraction.structure;
   }
 
   let dump file =
-    let majour, minor, crc = file.version in
-    Format.eprintf "@[<2>{ path= %S;@ cwd= %S;@ load_paths= [ @[%a@] ];@ version= %d.%d:%s;@ argv= [| @[%a@] |]; ... }@]@."
+    let majour, minor = file.version in
+    Format.eprintf "@[<2>{ path= %S;@ cwd= %S;@ load_paths= [ @[%a@] ];@ version= %d.%d;@ argv= [| @[%a@] |]; ... }@]@."
       (match file.path with 
       | "" -> "NONE"
       | s -> s)
 	file.cwd
       (Format.list "; " (fun ppf s -> Format.fprintf ppf "%S" s)) file.load_paths
-      majour minor (Digest.to_hex crc)
+      majour minor
 	(Format.list "; " (fun ppf s -> Format.fprintf ppf "%S" s)) (Array.to_list file.argv)
 
   (* xxx.{ml,cmo,cmx,spot} => xxx.spot 
 	failwith (Printf.sprintf "Not a spot file: %s" file);
       let file_version_major = input_binary_int ic in
       let file_version_minor = input_binary_int ic in
-      let file_version_crc = 
-        let length = String.length Spotcrc.crc in
-        let buffer = String.create length in
-        really_input ic buffer 0 length;
-        buffer
-      in
       if version_major <> file_version_major ||
 	version_minor < file_version_minor then begin
 	  failwith (Printf.sprintf "Incompatible spot file version %d.%d (must be %d.%d)" 
                        file_version_major file_version_minor 
                        version_major version_minor);
 	end;
-      if file_version_crc <> Spotcrc.crc then 
-        Format.eprintf "Warning: spot file CRC conflict. ocamlspot may crash.@.";
-
       let v = input_value ic in
       close_in ic;
-      (file_version_major, file_version_minor, file_version_crc), (v : File.t)
+      (file_version_major, file_version_minor), (v : File.t)
 
     let load_directly path : file =
       Debug.format "spot loading from %s@." path;

File tools/makespotcrc.ml

-let _ = 
-  Printf.printf "let crc = %S;;\n" (Digest.file "typing/spot.cmi")
-;;

File typing/spot.ml

    Annotations are stored in .spot with their locations
 *)
 
-let version_major = 2
+let version_major = 3
 let version_minor = 0
 let magic_number = "OCamlSpot"
 
       output_string oc magic_number;
       output_binary_int oc version_major;
       output_binary_int oc version_minor;
-      output_string oc Spotcrc.crc;
       Marshal.to_channel oc 
         [ Argv Sys.argv;
 	  Source_path source;