Skip to content
GitLab
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
a8bd0e39
Commit
a8bd0e39
authored
Sep 21, 2015
by
Laszlo Domoszlai
Browse files
inline createF
parent
91d7bddb
Changes
3
Hide whitespace changes
Inline
Side-by-side
interpreter/code.c
View file @
a8bd0e39
...
...
@@ -44,7 +44,8 @@
struct
Thunk
*
create_thunk_app_static
(
Code
*
expr
,
int
frame_ptr
)
{
Thunk
*
thunk
=
createF
(((
AppEntry
*
)
expr
)
->
f
);
Thunk
*
thunk
=
(
Thunk
*
)
alloc_heap
(((
AppEntry
*
)
expr
)
->
f
->
thunk_size
);
thunk
->
desc
=
((
AppEntry
*
)
expr
)
->
f
;
assert
(
thunk
->
desc
->
arity
==
expr
->
nr_args
);
...
...
@@ -64,7 +65,8 @@ struct Thunk* create_thunk_app_dyn(Code* expr, int frame_ptr)
get_slice
(
basethunk
->
desc
->
type
==
FT_SLICE
?
((
SliceEntry
*
)
basethunk
->
desc
)
->
forward_ptr
:
basethunk
->
desc
,
basethunk
->
desc
->
arity
+
expr
->
nr_args
);
Thunk
*
thunk
=
createF
(
slice
);
Thunk
*
thunk
=
(
Thunk
*
)
alloc_heap
(
slice
->
thunk_size
);
thunk
->
desc
=
slice
;
assert
(
thunk
->
desc
->
arity
==
basethunk
->
desc
->
arity
+
expr
->
nr_args
);
...
...
interpreter/thunk.c
View file @
a8bd0e39
...
...
@@ -52,14 +52,6 @@ struct Thunk* updateF(Thunk* target, Desc* f) {
return
thunk
;
}
struct
Thunk
*
createF
(
Desc
*
f
)
{
assert
(
f
!=
NULL
);
Thunk
*
thunk
=
(
Thunk
*
)
alloc_heap
(
f
->
thunk_size
);
thunk
->
desc
=
f
;
return
thunk
;
}
bool
is_hnf
(
Thunk
*
thunk
)
{
return
thunk
->
desc
->
hnf
;
...
...
interpreter/thunk.h
View file @
a8bd0e39
...
...
@@ -47,7 +47,6 @@ int readB(Thunk* thunk);
#endif
struct
Thunk
*
updateF
(
Thunk
*
target
,
Desc
*
f
);
struct
Thunk
*
createF
(
Desc
*
f
);
bool
is_hnf
(
Thunk
*
thunk
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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