(feat) Static analysis, pull only what is needed to optimize build for size (and speed) #1588
|
Let's say you start with source code const u8 = new Uint8Array(4096);We can see we don't need a whole bunch (or all) of ECMAScript interfaces for that code to compile/execute. We don't need The execution environment is not necessarily a browser, so we are not concerned with JIT, or having any/all interfaces available for whatever a Web site might have by way of scripting. We are not concerned with passing every test in test262 just because it's there. We are only concerned with creating the engine to fulfill what the source code says is needed to complete the instruction(s). Additionally, starting out from the outset with the idea that WASM is a target for the engine, too. Feasibility? |
Replies: 2 comments 23 replies
|
That kind of analysis is not an ambition we have. With that out of the way: you can strip the standard environment down to almost nothing by replacing |
|
Removing |
That kind of analysis is not an ambition we have.
With that out of the way: you can strip the standard environment down to almost nothing by replacing
JS_NewContext()withJS_NewContextRaw()+JS_AddIntrinsicXXX()calls. That's a manual process though.