-
Notifications
You must be signed in to change notification settings - Fork 1.2k
JsSerializeParserState
Parses a script and stores the generated parser state cache into a buffer which can be reused.
CHAKRA_API
JsSerializeParserState(
_In_ JsValueRef scriptVal,
_Out_ JsValueRef *bufferVal,
_In_ JsParseScriptAttributes parseAttributes);
- scriptVal: The script to parse.
- bufferVal: The buffer to put the serialized parser state cache into.
- parseAttributes: Encoding for the script.
The code JsNoError if the operation succeeded, a failure code otherwise.
This API is experimental and may have breaking changes later.
JsSerializeParserState parses a script and then stores a cache of the parser state in a runtime-independent format. The parser state may be deserialized in any runtime along with the same script to skip the initial parse phase. Requires an active script context. Script source can be either JavascriptString or JavascriptExternalArrayBuffer. In case it is an ExternalArrayBuffer, and the encoding of the buffer is Utf16, JsParseScriptAttributeArrayBufferIsUtf16Encoded is expected on parseAttributes. Use JavascriptExternalArrayBuffer with Utf8/ASCII script source for better performance and smaller memory footprint.
- Architecture Overview
- Building ChakraCore
- ChakraCore Code Structure
- Contributor Guidance
- Engineering Notes
- Embedding ChakraCore
- Testing ChakraCore
- Getting ChakraCore binaries
- Label Glossary
- Resources
- Roadmap / Release Notes
Want to contribute to this Wiki? Fork it and send a pull request!