Commit 9d6768d2 authored by Pietro Abate's avatar Pietro Abate
Browse files

[r2005-02-04 20:41:47 by afrisch] Empty log message

Original author: afrisch
Date: 2005-02-04 20:41:47+00:00
parent 3e8bdf54
...@@ -38,7 +38,12 @@ SRC= \ ...@@ -38,7 +38,12 @@ SRC= \
types/types.mli \ types/types.mli \
types/types.ml \ types/types.ml \
types/sequence.mli \ types/sequence.mli \
types/sequence.ml types/sequence.ml \
types/sample.mli \
types/sample.ml \
types/patterns.mli \
types/patterns.ml
ML_SRC=$(filter %.ml,$(SRC)) ML_SRC=$(filter %.ml,$(SRC))
OBJECTS=$(ML_SRC:.ml=.$(EXT)) OBJECTS=$(ML_SRC:.ml=.$(EXT))
......
...@@ -49,9 +49,7 @@ module Put = struct ...@@ -49,9 +49,7 @@ module Put = struct
let rec bits nb t i = (* TODO: opt *) let rec bits nb t i = (* TODO: opt *)
if (nb > 0) then (bool t ((i land 1) <> 0); bits (pred nb) t (i lsr 1)) if (nb > 0) then (bool t ((i land 1) <> 0); bits (pred nb) t (i lsr 1))
(* TODO: handle negative ints better !! *)
let rec int t i = let rec int t i =
assert (i >= 0);
bits 4 t i; bits 4 t i;
let i = i lsr 4 in let i = i lsr 4 in
if i <> 0 then (bool t true; int t i) else (bool t false) if i <> 0 then (bool t true; int t i) else (bool t false)
......
...@@ -800,7 +800,7 @@ module Normal = struct ...@@ -800,7 +800,7 @@ module Normal = struct
let src_p = IdMap.constant SLeft xsp let src_p = IdMap.constant SLeft xsp
and src_q = IdMap.constant SRight xsq in and src_q = IdMap.constant SRight xsq in
let src = IdMap.merge_elem SRecompose src_p src_q in let src = IdMap.merge_elem SRecompose src_p src_q in
{ nempty lab with { (nempty lab) with
nfv = xs; nfv = xs;
na = acc; na = acc;
nprod = single_prod src (nnode p xsp) (nnode q xsq) nprod = single_prod src (nnode p xsp) (nnode q xsq)
...@@ -811,7 +811,7 @@ module Normal = struct ...@@ -811,7 +811,7 @@ module Normal = struct
let src_p = IdMap.constant SLeft xsp let src_p = IdMap.constant SLeft xsp
and src_q = IdMap.constant SRight xsq in and src_q = IdMap.constant SRight xsq in
let src = IdMap.merge_elem SRecompose src_p src_q in let src = IdMap.merge_elem SRecompose src_p src_q in
{ nempty lab with { (nempty lab) with
nfv = xs; nfv = xs;
na = acc; na = acc;
nxml = single_prod src (nnode p xsp) (nnode q xsq) nxml = single_prod src (nnode p xsp) (nnode q xsq)
...@@ -828,7 +828,7 @@ module Normal = struct ...@@ -828,7 +828,7 @@ module Normal = struct
else SRight, ncany_abs, nnode (cons p.fv (record l p)) xs else SRight, ncany_abs, nnode (cons p.fv (record l p)) xs
in in
let src = IdMap.constant src xs in let src = IdMap.constant src xs in
{ nempty lab with { (nempty lab) with
nfv = xs; nfv = xs;
na = acc; na = acc;
nrecord = RecLabel(label, single_prod src lft rgt) } nrecord = RecLabel(label, single_prod src lft rgt) }
...@@ -843,7 +843,7 @@ module Normal = struct ...@@ -843,7 +843,7 @@ module Normal = struct
(if y then Some empty_res else None)) (if y then Some empty_res else None))
| Some l -> | Some l ->
RecLabel (l,aux (Types.Record.split_normal t l)) in RecLabel (l,aux (Types.Record.split_normal t l)) in
{ nempty lab with { (nempty lab) with
na = t; na = t;
nbasic = single_basic empty_res (Types.cap t any_basic); nbasic = single_basic empty_res (Types.cap t any_basic);
nprod = aux (Types.Product.normal t); nprod = aux (Types.Product.normal t);
......
...@@ -40,7 +40,8 @@ module CompUnit = struct ...@@ -40,7 +40,8 @@ module CompUnit = struct
let stack = ref [] let stack = ref []
let enter i = stack := !current :: !stack; current := i let enter i =
stack := !current :: !stack; current := i
let leave () = let leave () =
match !stack with match !stack with
......
...@@ -69,3 +69,18 @@ types/types.cmx: types/atoms.cmx misc/bool.cmx types/chars.cmx \ ...@@ -69,3 +69,18 @@ types/types.cmx: types/atoms.cmx misc/bool.cmx types/chars.cmx \
types/sequence.cmi: types/atoms.cmi types/types.cmi types/sequence.cmi: types/atoms.cmi types/types.cmi
types/sequence.cmo: types/atoms.cmi types/types.cmi types/sequence.cmi types/sequence.cmo: types/atoms.cmi types/types.cmi types/sequence.cmi
types/sequence.cmx: types/atoms.cmx types/types.cmx types/sequence.cmi types/sequence.cmx: types/atoms.cmx types/types.cmx types/sequence.cmi
types/sample.cmi: types/types.cmi
types/sample.cmo: types/atoms.cmi types/chars.cmi types/ident.cmo \
types/intervals.cmi types/types.cmi types/sample.cmi
types/sample.cmx: types/atoms.cmx types/chars.cmx types/ident.cmx \
types/intervals.cmx types/types.cmx types/sample.cmi
types/patterns.cmi: types/atoms.cmi types/chars.cmi misc/custom.cmo \
types/ident.cmo types/types.cmi
types/patterns.cmo: types/atoms.cmi types/chars.cmi misc/custom.cmo \
types/ident.cmo types/sample.cmi types/sequence.cmi misc/serialize.cmi \
types/sortedList.cmi misc/state.cmi misc/stats.cmi types/types.cmi \
types/patterns.cmi
types/patterns.cmx: types/atoms.cmx types/chars.cmx misc/custom.cmx \
types/ident.cmx types/sample.cmx types/sequence.cmx misc/serialize.cmx \
types/sortedList.cmx misc/state.cmx misc/stats.cmx types/types.cmx \
types/patterns.cmi
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment