-
Notifications
You must be signed in to change notification settings - Fork 688
Support static snapshots. #2239
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
50d3193 to
f6d938a
Compare
18e5646 to
493f60b
Compare
Unlike normal snapshots, no part of a static snapshot is loaded into the RAM when executed from ROM. Static snapshots rely heavily on external magic strings. JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
493f60b to
ea53cd9
Compare
| - `is_for_global` - snapshot would be executed as global (true) or eval (false). | ||
| - `is_strict` - strict mode | ||
| - `buffer_p` - buffer to save snapshot to. | ||
| - `buffer_size` - the buffer's size. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does the size mean here? Byte size? or element size?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Byte size just like the other cases (this is mostly a copy-paste). And the plan is rewriting the saving API anyway.
|
|
||
| Unlike normal snaphots static snaphots are fully executed from ROM. Not | ||
| even their header is loaded into the RAM. However they can only depend | ||
| on magic strings and 28 bit integer numbers. Regular expression literals |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should emphasise that the magic strings during the snapshot generation must be the same as the magic strings during execution.
| #endif /* !CONFIG_DISABLE_ES2015_ARROW_FUNCTION */ | ||
|
|
||
| ecma_value_t | ||
| ecma_op_function_has_instance (ecma_object_t *func_obj_p, ecma_value_t value); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need to move this function prototype?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to keep the .c side order. Not a critical change though.
LaszloLango
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
LGTM |
Unlike normal snapshots, no part of a static snapshot is loaded into the RAM when executed from ROM. Static snapshots rely heavily on external magic strings.