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
clean-and-itasks
sapl-interpreter
Commits
298ff6ad
Commit
298ff6ad
authored
Mar 19, 2016
by
Laszlo Domoszlai
Browse files
unboxable let bindings
parent
e8fd4279
Changes
1
Hide whitespace changes
Inline
Side-by-side
interpreter/code.c
View file @
298ff6ad
...
...
@@ -896,15 +896,19 @@ void exec(Code* expr, int frame_ptr, int root_frame_ptr)
{
LetBindingEntry
*
binding
=
((
LetEntry
*
)
expr
)
->
bindings
[
i
];
// Normal
if
(
binding
->
type
==
0
)
switch
(
binding
->
type
)
{
binding
->
body
->
create_thunk
(
binding
->
body
,
&
stack_a
[
stack_top_a
++
],
frame_ptr
);
}
else
// strict (including unboxed))
{
push_a
(
NULL
);
exec
(
binding
->
body
,
frame_ptr
,
stack_top_a
);
case
0
:
// normal
binding
->
body
->
create_thunk
(
binding
->
body
,
&
stack_a
[
stack_top_a
++
],
frame_ptr
);
break
;
case
1
:
// strict
push_a
(
NULL
);
exec
(
binding
->
body
,
frame_ptr
,
stack_top_a
);
break
;
case
2
:
// unboxable
push_a
(
alloc_b
());
exec
(
binding
->
body
,
frame_ptr
,
stack_top_a
);
break
;
}
}
...
...
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