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
d294b94c
Commit
d294b94c
authored
Oct 05, 2007
by
Pietro Abate
Browse files
[r2004-03-15 14:39:40 by afrisch] Accessing globals during evaluation...
Original author: afrisch Date: 2004-03-15 14:39:40+00:00
parent
ebf672ce
Changes
3
Hide whitespace changes
Inline
Side-by-side
driver/librarian.ml
View file @
d294b94c
...
...
@@ -218,5 +218,5 @@ let () =
Eval
.
from_comp_unit
:=
(
fun
cu
i
->
match
(
load
cu
)
.
vals
with
|
None
->
assert
false
|
None
->
!
Eval
.
stack
.
(
i
)
(* TODO: check that cu is being evaluated *)
|
Some
a
->
a
.
(
i
))
runtime/eval.ml
View file @
d294b94c
...
...
@@ -340,3 +340,5 @@ let comp_unit init code =
let
r
=
Array
.
sub
!
stack
0
!
sp
in
restore
()
;
r
with
exn
->
restore
()
;
raise
exn
runtime/eval.mli
View file @
d294b94c
...
...
@@ -14,3 +14,4 @@ val expr: code_item -> t
val
eval_apply
:
t
->
t
->
t
val
comp_unit
:
t
list
->
code_item
list
->
t
array
val
stack
:
t
array
ref
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