Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
cduce
cduce
Commits
7e22c2f3
Commit
7e22c2f3
authored
Jul 10, 2007
by
Pietro Abate
Browse files
[r2005-03-25 18:12:37 by afrisch] Empty log message
Original author: afrisch Date: 2005-03-25 18:12:37+00:00
parent
1ce4b183
Changes
5
Hide whitespace changes
Inline
Side-by-side
runtime/serial.ml
View file @
7e22c2f3
...
...
@@ -37,6 +37,7 @@ module PM = Mk(Custom.Pair(Types)(Custom.List(Patterns.Node)))
module
CONST
=
Mk
(
Types
.
Const
)
module
LAB
=
Mk
(
Ident
.
LabelPool
)
module
T
=
Mk
(
Types
)
module
LABA
=
Mk
(
Custom
.
Array
(
Ident
.
LabelPool
))
module
P
=
struct
type
chunk
=
...
...
@@ -44,24 +45,29 @@ module P = struct
cst
:
CONST
.
pchunk
;
lab
:
LAB
.
pchunk
;
typ
:
T
.
pchunk
;
}
laba
:
LABA
.
pchunk
;
}
let
init
()
=
{
pm
=
PM
.
init
()
;
cst
=
CONST
.
init
()
;
lab
=
LAB
.
init
()
;
typ
=
T
.
init
()
}
typ
=
T
.
init
()
;
laba
=
LABA
.
init
()
;
}
let
serialize
s
c
=
PM
.
serialize
s
c
.
pm
;
CONST
.
serialize
s
c
.
cst
;
LAB
.
serialize
s
c
.
lab
;
T
.
serialize
s
c
.
typ
T
.
serialize
s
c
.
typ
;
LABA
.
serialize
s
c
.
laba
let
pm
c
=
PM
.
put
c
.
pm
let
const
c
=
CONST
.
put
c
.
cst
let
label
c
=
LAB
.
put
c
.
lab
let
typ
c
=
T
.
put
c
.
typ
let
label_array
c
=
LABA
.
put
c
.
laba
let
mk
c
=
let
s
=
Serialize
.
Put
.
run
serialize
c
in
...
...
@@ -78,6 +84,7 @@ module G = struct
cst
:
Value
.
t
CONST
.
chunk
;
lab
:
Ident
.
label
LAB
.
chunk
;
typ
:
Types
.
t
T
.
chunk
;
laba
:
Ident
.
label
array
LABA
.
chunk
;
}
let
deserialize
s
=
...
...
@@ -85,7 +92,8 @@ module G = struct
let
cst
=
CONST
.
deserialize
s
in
let
lab
=
LAB
.
deserialize
s
in
let
typ
=
T
.
deserialize
s
in
{
pm
=
pm
;
cst
=
cst
;
lab
=
lab
;
typ
=
typ
}
let
laba
=
LABA
.
deserialize
s
in
{
pm
=
pm
;
cst
=
cst
;
lab
=
lab
;
typ
=
typ
;
laba
=
laba
}
let
mk
s
=
Types
.
clear_deserialize_table
()
;
...
...
@@ -116,5 +124,8 @@ module G = struct
let
typ
chunk
i
=
T
.
get
(
fun
x
->
x
)
chunk
.
typ
i
let
record
chunk
i
vs
=
Value
.
mk_record
(
LABA
.
get
(
fun
x
->
x
)
chunk
.
laba
i
)
vs
end
runtime/serial.mli
View file @
7e22c2f3
...
...
@@ -7,6 +7,7 @@ module P : sig
val
const
:
chunk
->
Types
.
const
->
int
val
label
:
chunk
->
Ident
.
label
->
int
val
typ
:
chunk
->
Types
.
t
->
int
val
label_array
:
chunk
->
Ident
.
label
array
->
int
end
module
G
:
sig
...
...
@@ -17,6 +18,7 @@ module G : sig
val
const
:
chunk
->
int
->
Value
.
t
val
remove_label
:
chunk
->
int
->
Value
.
t
->
Value
.
t
val
typ
:
chunk
->
int
->
Types
.
t
val
record
:
chunk
->
int
->
Value
.
t
array
->
Value
.
t
end
runtime/value.ml
View file @
7e22c2f3
...
...
@@ -698,8 +698,7 @@ let mk_record labels fields =
let
l
=
ref
[]
in
assert
(
Array
.
length
labels
==
Array
.
length
fields
);
for
i
=
0
to
Array
.
length
labels
-
1
do
let
(
ns
,
lab
)
=
labels
.
(
i
)
in
l
:=
(
LabelPool
.
mk
(
Ns
.
mk
ns
,
lab
)
,
fields
.
(
i
))
::
!
l
l
:=
(
labels
.
(
i
)
,
fields
.
(
i
))
::
!
l
;
done
;
Record
(
LabelMap
.
from_list_disj
!
l
)
...
...
runtime/value.mli
View file @
7e22c2f3
...
...
@@ -134,7 +134,7 @@ val add: t -> t -> t
val
sub
:
t
->
t
->
t
val
pair
:
t
->
t
->
t
val
xml
:
t
->
t
->
t
->
t
val
mk_record
:
(
U
.
t
*
U
.
t
)
array
->
t
array
->
t
val
mk_record
:
label
array
->
t
array
->
t
val
transform
:
(
t
->
t
)
->
t
->
t
val
xtransform
:
(
t
->
t
)
->
t
->
t
...
...
types_depend
View file @
7e22c2f3
cduce/misc/serialize.cmo:
array.cmi buffer.cmi char.cmi list.cmi string
.cmi \
cduce/misc/serialize.cmo:
string.cmi list.cmi char.cmi buffer.cmi array
.cmi \
cduce/misc/serialize.cmi
cduce/misc/serialize.cmx:
array.cmx buffer.cmx char.cmx list.cmx string
.cmx \
cduce/misc/serialize.cmx:
string.cmx list.cmx char.cmx buffer.cmx array
.cmx \
cduce/misc/serialize.cmi
cduce/misc/custom.cmo:
array.cmi char.cmi forma
t.cmi hashtbl.cmi
list.cmi
\
pervasives.cmi string
.cmi
cduce/misc/custom.cmx:
array.cmx char.cmx forma
t.cmx hashtbl.cmx
list.cmx
\
pervasives.cmx string
.cmx
cduce/misc/custom.cmo:
array.cmi char.cmi forma
t.cmi hashtbl.cmi
list.cmi
\
pervasives.cmi string
.cmi
cduce/misc/custom.cmx:
array.cmx char.cmx forma
t.cmx hashtbl.cmx
list.cmx
\
pervasives.cmx string
.cmx
cduce/misc/encodings.cmi:
buffer.cmi format
.cmi
cduce/misc/encodings.cmo:
buffer.cmi char
.cmi format.cmi
printf
.cmi \
string
.cmi cduce/misc/encodings.cmi
cduce/misc/encodings.cmx:
buffer.cmx char
.cmx format.cmx
printf
.cmx \
string
.cmx cduce/misc/encodings.cmi
cduce/misc/custom.cmo:
string.cmi pervasives.cmi lis
t.cmi hashtbl.cmi \
format.cmi char.cmi array
.cmi
cduce/misc/custom.cmx:
string.cmx pervasives.cmx lis
t.cmx hashtbl.cmx \
format.cmx char.cmx array
.cmx
cduce/misc/custom.cmo:
string.cmi pervasives.cmi lis
t.cmi hashtbl.cmi \
format.cmi char.cmi array
.cmi
cduce/misc/custom.cmx:
string.cmx pervasives.cmx lis
t.cmx hashtbl.cmx \
format.cmx char.cmx array
.cmx
cduce/misc/encodings.cmi:
format.cmi buffer
.cmi
cduce/misc/encodings.cmo:
string.cmi printf
.cmi format.cmi
char
.cmi \
buffer
.cmi cduce/misc/encodings.cmi
cduce/misc/encodings.cmx:
string.cmx printf
.cmx format.cmx
char
.cmx \
buffer
.cmx cduce/misc/encodings.cmi
cduce/misc/imap.cmi: format.cmi
cduce/misc/imap.cmo: format.cmi cduce/misc/imap.cmi
cduce/misc/imap.cmx: format.cmx cduce/misc/imap.cmi
cduce/misc/state.cmo:
list
.cmi
obj
.cmi cduce/misc/state.cmi
cduce/misc/state.cmx:
list
.cmx
obj
.cmx cduce/misc/state.cmi
cduce/misc/pool.cmo:
array
.cmi hashtbl.cmi
map.cmi weak
.cmi \
cduce/misc/state.cmo:
obj
.cmi
list
.cmi cduce/misc/state.cmi
cduce/misc/state.cmx:
obj
.cmx
list
.cmx cduce/misc/state.cmi
cduce/misc/pool.cmo:
weak.cmi map
.cmi hashtbl.cmi
array
.cmi \
cduce/misc/pool.cmi
cduce/misc/pool.cmx:
array
.cmx hashtbl.cmx
map.cmx weak
.cmx \
cduce/misc/pool.cmx:
weak.cmx map
.cmx hashtbl.cmx
array
.cmx \
cduce/misc/pool.cmi
cduce/misc/ns.cmi: format.cmi
cduce/misc/ns.cmo:
array.cmi format.cmi hashtbl
.cmi list.cmi
map
.cmi \
printf.cmi string
.cmi cduce/misc/ns.cmi
cduce/misc/ns.cmx:
array.cmx format.cmx hashtbl
.cmx list.cmx
map
.cmx \
printf.cmx string
.cmx cduce/misc/ns.cmi
cduce/types/sortedList.cmo:
forma
t.cmi
lis
t.cmi cduce/types/sortedList.cmi
cduce/types/sortedList.cmx:
forma
t.cmx
lis
t.cmx cduce/types/sortedList.cmi
cduce/misc/ns.cmo:
string.cmi printf.cmi map
.cmi list.cmi
hashtbl
.cmi \
format.cmi array
.cmi cduce/misc/ns.cmi
cduce/misc/ns.cmx:
string.cmx printf.cmx map
.cmx list.cmx
hashtbl
.cmx \
format.cmx array
.cmx cduce/misc/ns.cmi
cduce/types/sortedList.cmo:
lis
t.cmi
forma
t.cmi cduce/types/sortedList.cmi
cduce/types/sortedList.cmx:
lis
t.cmx
forma
t.cmx cduce/types/sortedList.cmi
cduce/types/atoms.cmi: format.cmi
cduce/types/atoms.cmo:
forma
t.cmi
hashtbl
.cmi list.cmi
pervasives.cmi se
t.cmi \
cduce/types/atoms.cmo:
se
t.cmi
pervasives
.cmi list.cmi
hashtbl.cmi forma
t.cmi \
cduce/types/atoms.cmi
cduce/types/atoms.cmx:
forma
t.cmx
hashtbl
.cmx list.cmx
pervasives.cmx se
t.cmx \
cduce/types/atoms.cmx:
se
t.cmx
pervasives
.cmx list.cmx
hashtbl.cmx forma
t.cmx \
cduce/types/atoms.cmi
cduce/misc/bool.cmi: format.cmi
cduce/misc/bool.cmo: format.cmi cduce/misc/bool.cmi
cduce/misc/bool.cmx: format.cmx cduce/misc/bool.cmi
cduce/types/chars.cmi: format.cmi
cduce/types/chars.cmo:
char
.cmi format.cmi
list
.cmi cduce/types/chars.cmi
cduce/types/chars.cmx:
char
.cmx format.cmx
list
.cmx cduce/types/chars.cmi
cduce/types/chars.cmo:
list
.cmi format.cmi
char
.cmi cduce/types/chars.cmi
cduce/types/chars.cmx:
list
.cmx format.cmx
char
.cmx cduce/types/chars.cmi
cduce/types/ident.cmo: map.cmi
cduce/types/ident.cmx: map.cmx
cduce/types/intervals.cmi: format.cmi
cduce/types/intervals.cmo:
format
.cmi list.cmi
obj
.cmi \
cduce/types/intervals.cmo:
obj
.cmi list.cmi
format
.cmi \
cduce/types/intervals.cmi
cduce/types/intervals.cmx:
format
.cmx list.cmx
obj
.cmx \
cduce/types/intervals.cmx:
obj
.cmx list.cmx
format
.cmx \
cduce/types/intervals.cmi
cduce/misc/inttbl.cmo: array.cmi cduce/misc/inttbl.cmi
cduce/misc/inttbl.cmx: array.cmx cduce/misc/inttbl.cmi
cduce/types/normal.cmo: list.cmi cduce/types/normal.cmi
cduce/types/normal.cmx: list.cmx cduce/types/normal.cmi
cduce/misc/pretty.cmi: hashtbl.cmi
cduce/misc/pretty.cmo:
format.cmi hashtbl.cmi list.cmi pervasives
.cmi \
cduce/misc/pretty.cmo:
pervasives.cmi list.cmi hashtbl.cmi format
.cmi \
cduce/misc/pretty.cmi
cduce/misc/pretty.cmx:
format.cmx hashtbl.cmx list.cmx pervasives
.cmx \
cduce/misc/pretty.cmx:
pervasives.cmx list.cmx hashtbl.cmx format
.cmx \
cduce/misc/pretty.cmi
cduce/misc/stats.cmi: format.cmi
cduce/misc/stats.cmo:
format.cmi hashtbl.cmi list.cmi printf
.cmi \
cduce/misc/stats.cmo:
printf.cmi list.cmi hashtbl.cmi format
.cmi \
cduce/misc/stats.cmi
cduce/misc/stats.cmx:
format.cmx hashtbl.cmx list.cmx printf
.cmx \
cduce/misc/stats.cmx:
printf.cmx list.cmx hashtbl.cmx format
.cmx \
cduce/misc/stats.cmi
cduce/types/ident.cmo: map.cmi
cduce/types/ident.cmx: map.cmx
cduce/types/types.cmi:
format.cmi obj
.cmi
cduce/types/types.cmo:
array.cmi format.cmi hashtbl
.cmi
list
.cmi
map
.cmi \
obj.cmi pervasives.cmi set
.cmi cduce/types/types.cmi
cduce/types/types.cmx:
array.cmx format.cmx hashtbl
.cmx
list
.cmx
map
.cmx \
obj.cmx pervasives.cmx set
.cmx cduce/types/types.cmi
cduce/types/sequence.cmo:
list
.cmi
map
.cmi cduce/types/sequence.cmi
cduce/types/sequence.cmx:
list
.cmx
map
.cmx cduce/types/sequence.cmi
cduce/types/types.cmi:
obj.cmi format
.cmi
cduce/types/types.cmo:
set.cmi pervasives.cmi obj
.cmi
map
.cmi
list
.cmi \
hashtbl.cmi format.cmi array
.cmi cduce/types/types.cmi
cduce/types/types.cmx:
set.cmx pervasives.cmx obj
.cmx
map
.cmx
list
.cmx \
hashtbl.cmx format.cmx array
.cmx cduce/types/types.cmi
cduce/types/sequence.cmo:
map
.cmi
list
.cmi cduce/types/sequence.cmi
cduce/types/sequence.cmx:
map
.cmx
list
.cmx cduce/types/sequence.cmi
cduce/types/sample.cmi: format.cmi
cduce/types/sample.cmo:
li
st.cmi s
e
t.cmi cduce/types/sample.cmi
cduce/types/sample.cmx:
li
st.cmx s
e
t.cmx cduce/types/sample.cmi
cduce/types/sample.cmo: s
e
t.cmi
li
st.cmi cduce/types/sample.cmi
cduce/types/sample.cmx: s
e
t.cmx
li
st.cmx cduce/types/sample.cmi
cduce/types/patterns.cmi: format.cmi
cduce/types/patterns.cmo:
array.cmi for
ma
t
.cmi list.cmi
map.cmi queue
.cmi \
set
.cmi cduce/types/patterns.cmi
cduce/types/patterns.cmx:
array.cmx for
ma
t
.cmx list.cmx
map.cmx queue
.cmx \
set
.cmx cduce/types/patterns.cmi
cduce/compile/lambda.cmi:
format.cmi obj
.cmi
cduce/compile/lambda.cmo:
array.cmi forma
t.cmi
lis
t.cmi
obj
.cmi \
cduce/types/patterns.cmo:
set.cmi queue.cmi
ma
p
.cmi list.cmi
format
.cmi \
array
.cmi cduce/types/patterns.cmi
cduce/types/patterns.cmx:
set.cmx queue.cmx
ma
p
.cmx list.cmx
format
.cmx \
array
.cmx cduce/types/patterns.cmi
cduce/compile/lambda.cmi:
obj.cmi format
.cmi
cduce/compile/lambda.cmo:
obj.cmi lis
t.cmi
forma
t.cmi
array
.cmi \
cduce/compile/lambda.cmi
cduce/compile/lambda.cmx:
array.cmx forma
t.cmx
lis
t.cmx
obj
.cmx \
cduce/compile/lambda.cmx:
obj.cmx lis
t.cmx
forma
t.cmx
array
.cmx \
cduce/compile/lambda.cmi
cduce/runtime/value.cmi:
forma
t.cmi
se
t.cmi
cduce/runtime/value.cmo:
array.cmi buffer.cmi char
.cmi format.cmi
list.cmi
\
obj
.cmi
set.cmi string
.cmi cduce/runtime/value.cmi
cduce/runtime/value.cmx:
array.cmx buffer.cmx char
.cmx format.cmx
list.cmx
\
obj
.cmx
set.cmx string
.cmx cduce/runtime/value.cmi
cduce/runtime/run_dispatch.cmo:
array
.cmi format.cmi
string
.cmi \
cduce/runtime/value.cmi:
se
t.cmi
forma
t.cmi
cduce/runtime/value.cmo:
string.cmi set.cmi obj.cmi list
.cmi format.cmi \
char
.cmi
buffer.cmi array
.cmi cduce/runtime/value.cmi
cduce/runtime/value.cmx:
string.cmx set.cmx obj.cmx list
.cmx format.cmx \
char
.cmx
buffer.cmx array
.cmx cduce/runtime/value.cmi
cduce/runtime/run_dispatch.cmo:
string
.cmi format.cmi
array
.cmi \
cduce/runtime/run_dispatch.cmi
cduce/runtime/run_dispatch.cmx:
array
.cmx format.cmx
string
.cmx \
cduce/runtime/run_dispatch.cmx:
string
.cmx format.cmx
array
.cmx \
cduce/runtime/run_dispatch.cmi
cduce/runtime/serial.cmo:
array.cmi list
.cmi cduce/runtime/serial.cmi
cduce/runtime/serial.cmx:
array.cmx list
.cmx cduce/runtime/serial.cmi
cduce/runtime/serial.cmo:
list.cmi array
.cmi cduce/runtime/serial.cmi
cduce/runtime/serial.cmx:
list.cmx array
.cmx cduce/runtime/serial.cmi
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment