-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Wasm: deferred parsing #1243
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
Wasm: deferred parsing #1243
Conversation
|
This change is mostly related to WebAssembly/design#719 |
|
@MikeHolman @commonlisp Can you review this please? |
|
ping |
| mov eax, ecx | ||
| #endif | ||
| pop ebp | ||
| // Although we don't restore ESP here on WinCE, this is fine because script profiler is not shipped for WinCE. |
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 this comment mean?
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 got this from another thunk in this file, I don't really know what it means exactly either
|
right now this will have memory cost, so a bit hesitant about merging unless it will be used |
Made some Wasm tracing available in test build Update basic.wast to latest syntax (haven't update the baseline, because I am unsure what it is supposed to do)
Added new class WasmModuleGenerator which reads only what is necessary to create the wasm module. Then WasmBytecodeGenerator only generates the bytecode for the function bodies. Added thunks for x64/x86 for deferred parsing entry points. Simplified logic for LazyTraps
Create a new ArenaAllocator on the WasmBinaryReader that has the same lifetime as the reader
| m_scriptContext(scriptContext), | ||
| m_recycler(scriptContext->GetRecycler()) | ||
| { | ||
| m_reader = RecyclerNew(m_recycler, Binary::WasmBinaryReader, scriptContext, binaryBuffer, binaryBufferLength); |
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 this can be leaf.
|
|
| body->GetAsmJsFunctionInfo()->SetIsHeapBufferConst(true); | ||
|
|
||
| WasmReaderInfo* readerInfo = RecyclerNew(m_recycler, WasmReaderInfo); | ||
| WasmReaderInfo* readerInfo = RecyclerNewLeaf(m_recycler, WasmReaderInfo); |
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 this can't be leaf
This reverts commit 1692559.
Merge pull request chakra-core#1243 from Cellule:wasm/deferred Implement deferred parsing for Wasm functions under a flag `-on:wasmdeferred` Added new class WasmModuleGenerator which reads only what is necessary to create the wasm module. Then WasmBytecodeGenerator only generates the bytecode for the function bodies. Simplified logic for LazyTraps Added instrumentation for `-profile` with Wasm Took the opportunity to do some cleanup in the Wasm classes notably some unused methods and some rearrangement.
Implement deferred parsing for Wasm functions under a flag
-on:wasmdeferredAdded new class WasmModuleGenerator which reads only what is necessary to create the wasm module.
Then WasmBytecodeGenerator only generates the bytecode for the function bodies.
Simplified logic for LazyTraps
Added instrumentation for
-profilewith WasmTook the opportunity to do some cleanup in the Wasm classes notably some unused methods and some rearrangement.
This change is