Javascript:SpiderMonkey:OdinMonkey: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
(Wipe contents of old stuff.)
 
(84 intermediate revisions by one other user not shown)
Line 1: Line 1:
== Active ==
OdinMonkey was the optimizing AsmJS compiler.  
* Move code generation into the parallel compilation tasks ({{bug|959263}})
* Optimize constant-additions in masked heap accessed: {{bug|915157}}
* Standardize and implement SIMD extensions to JS ({{bug|894105}}) and then incorporate into asm.js
* Land experimental SharedArrayBuffer (pref'd off, {{bug|933001}}) and use this to add experimental pthreads support to Emscripten and evaluate on threaded codebases in preparation for a standards proposal.


== Planned next projects ==
* Mitigate 32-bit OOM problems: ({{bug|865959}})
* Record enough information at compile time so that asm.js functions show up in:
** the builtin FF profiler ({{bug|947996}})
** Error.stack
* Add && and || to asm.js to avoid sub-optimal control flow ({{bug|919052}}).
* Add Math.min/max to asm.js standard math library (they have more optimal implementations than you can express with just ternary)
* Add missing math constants ({{bug|878488}})
* ArrayBuffer.prototype.resize ({{bug|927182}}): to allow growable heap
* Fully optimize calls into ({{bug|962641}}) and out of ({{bug|882399}}) asm.js
* Remove async-script requirement for asm.js caching: ({{bug|961057}})
== Possible further optimization projects ==
* Further improve load-time:
** Start general JS parsing before the entire JS script has completed downloading so that asm.js compilation can overlap (and we'd be justified in doing all script parsing off the main thread)
** asm.js parser: Avoid building an intermediate parse tree; type check during recursive descent {{bug|854061}}
* Compress more than just the source in asm.js cache entries
* Further improve heap access performance : {{bug|870743}}, {{bug|897425}}
* Improve x86/ARM asm.js-to-asm.js ABI : {{bug|861785}}
* Extend the asm.js signal handler tricks to:
** Remove stack overflow checks
** Remove idiv branching
** Remove double-to-int conversion branching (see also {{bug|818750}})
== Possible asm.js extensions that don't require new JS features ==
* Effectively support 'goto' (even computed 'goto') by formalizing a pattern of while+switch that gets compiled as if it was goto
* Extend asm.js to better support dynamically linking asm.js modules (a mutable, callable array argument to asm.js module, like the PLT)
* Add enough try/catch to asm.js to allow compilation of C++ exceptions using the zero-cost implementation strategy
* Add DataView to avoid the alignment mask on asm.js heap accesses (this is mostly a problem of DataView being slow in all browsers)
== Proposed future JS features that would be useful to asm.js ==
* ArrayBuffer.prototype.discard ({{bug|855669}}): to allow madvise(DONTNEED)
* Typed Objects: ([http://wiki.ecmascript.org/doku.php?id=harmony:typed_objects Typed Objects])
** This feature comes with float32/uint64/int64 value types, which would be useful as scalar types in asm.js.
** Formalize Typed Object "class declarations" in asm.js which could make asm.js a target for JVM/CLR/TypeScript (and allow these languages to reuse the builtin JS GC)
* FunctionPromise: {{bug|854627}}
* Add "AsmFunction" constructor that threw informative exception on validation failure.: ({{bug|952847}})
== Current asm.js spec bugs ==
https://github.com/dherman/asm.js/issues?state=open
== Logo ==
[[File:Odinmonkey800.jpg]]<br>
[[File:Odinmonkey800.jpg]]<br>
Credit to John Howard
Credit to John Howard

Latest revision as of 20:55, 27 April 2021

OdinMonkey was the optimizing AsmJS compiler.

Odinmonkey800.jpg
Credit to John Howard