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
c541564d
Commit
c541564d
authored
Apr 02, 2014
by
Julien Lopez
Browse files
Small change in master to compile until types/sample.ml
parent
c097776b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Makefile.distrib
View file @
c541564d
...
...
@@ -147,7 +147,7 @@ OBJECTS = \
\
types/compunit.cmo types/sortedList.cmo misc/bool.cmo types/ident.cmo
\
types/intervals.cmo types/chars.cmo types/atoms.cmo types/normal.cmo
\
types/types.cmo compile/auto_pat.cmo
\
types/var.cmo types/boolVar.cmo
types/types.cmo compile/auto_pat.cmo
\
types/sequence.cmo types/builtin_defs.cmo
\
\
runtime/value.cmo
\
...
...
@@ -309,14 +309,26 @@ misc/q_symbol.cmo: misc/q_symbol.ml
@
echo
"Build
$@
"
$(HIDE)$(CAMLC)
-c
-pp
camlp4orf
$<
types/%.cmo
:
types/%.ml
@
echo
"Build
$@
"
$(HIDE)$(CAMLC)
-c
$(INCLUDES)
$<
.ml.cmo
:
@
echo
"Build
$@
"
$(HIDE)$(CAMLC)
-c
$(INCLUDES)
$(SYNTAX_PARSER)
$<
types/%.cmx
:
types/%.ml
@
echo
"Build
$@
"
$(HIDE)$(CAMLOPT)
$(FORPACKOPT)
-c
$(INCLUDES)
$<
.ml.cmx
:
@
echo
"Build
$@
"
$(HIDE)$(CAMLOPT)
$(FORPACKOPT)
-c
$(SYNTAX_PARSER)
$(INCLUDES)
$<
types/%.cmi
:
types/%.mli
@
echo
"Build
$@
"
$(HIDE)$(CAMLC)
-c
$(INCLUDES)
$<
.mli.cmi
:
@
echo
"Build
$@
"
$(HIDE)$(CAMLC)
-c
$(SYNTAX_PARSER)
$(INCLUDES)
$<
...
...
compile/compile.ml
View file @
c541564d
...
...
@@ -55,6 +55,7 @@ and compile_aux env = function
let
d
=
Patterns
.
Compile
.
make_checker
!
t0
(
Types
.
descr
t
)
in
Check
(
compile
env
e
,
d
)
|
Typed
.
Var
x
->
Var
(
find
x
env
)
|
Typed
.
TVar
x
->
Var
(
find
x
env
)
|
Typed
.
ExtVar
(
cu
,
x
,_
)
->
Var
(
find_ext
cu
x
)
|
Typed
.
Apply
(
e1
,
e2
)
->
Apply
(
compile
env
e1
,
compile
env
e2
)
|
Typed
.
Abstraction
a
->
compile_abstr
env
a
...
...
@@ -121,7 +122,7 @@ and compile_abstr env a =
let
slots
=
Array
.
of_list
(
List
.
rev
slots
)
in
let
env
=
{
env
with
vars
=
fun_env
;
stack_size
=
0
;
max_stack
=
ref
0
}
in
let
body
=
compile_branches
env
a
.
Typed
.
fun_body
in
Abstraction
(
slots
,
a
.
Typed
.
fun_iface
,
body
,
!
(
env
.
max_stack
))
Abstraction
(
slots
,
a
.
Typed
.
fun_iface
,
body
,
!
(
env
.
max_stack
)
,
true
,
List
[[]]
)
and
compile_branches
env
(
brs
:
Typed
.
branches
)
=
(* Don't compile unused branches, because they have not been
...
...
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