Confirmed users, Bureaucrats and Sysops emeriti
695
edits
mNo edit summary |
m (Reverted edits by Couponcodez (talk) to last revision by Curtisk) |
||
| (19 intermediate revisions by 9 users not shown) | |||
| Line 1: | Line 1: | ||
{{FeatureStatus | {{FeatureStatus | ||
|Feature name=Modern JIT Compiler for JavaScript | |Feature name=Modern JIT Compiler for JavaScript (IonMonkey) | ||
|Feature stage= | |Feature stage=Landed | ||
|Feature status=In progress | |||
|Feature version=Firefox 18 | |||
|Feature health=OK | |Feature health=OK | ||
}} {{FeatureTeam | }} | ||
{{FeatureTeam | |||
|Feature product manager=Chris Blizzard | |||
|Feature feature manager=David Anderson | |Feature feature manager=David Anderson | ||
|Feature lead engineer=David Anderson, David Mandelin | |Feature lead engineer=David Anderson, David Mandelin | ||
}} {{FeaturePageBody | |Feature qa lead=Paul Silaghi | ||
}} | |||
{{FeaturePageBody | |||
|Feature overview=IonMonkey is a new JIT for SpiderMonkey. Our goal is to implement a new compiler to enable many new JavaScript optimizations. In particular IonMonkey will feature much more organized and explicit data structures typical of advanced compilers. This goal of being clean and flexible will be extremely important for future optimization work and experimentation. | |Feature overview=IonMonkey is a new JIT for SpiderMonkey. Our goal is to implement a new compiler to enable many new JavaScript optimizations. In particular IonMonkey will feature much more organized and explicit data structures typical of advanced compilers. This goal of being clean and flexible will be extremely important for future optimization work and experimentation. | ||
|Feature users and use cases=Goals: | |Feature users and use cases=Goals: | ||
| Line 26: | Line 32: | ||
See [[/RegisterAllocator]] for information on the register allocator interfaces. | See [[/RegisterAllocator]] for information on the register allocator interfaces. | ||
|Feature implementation notes= | |Feature implementation notes=#<s> '''Bailouts'''</s> | ||
## <s>What: Bailouts are the heart of the optimizing compiler. When speculation fails (triggering a type, shape, overflow guard, etc), or C++ throws an exception, or needs to GC, we must be able to inspect the JIT frame, and if needed, reconstruct an interpreter frame.</s> | |||
#<s> '''Bailouts'''</s> | ## <s>Dependencies:</s> | ||
## What: Bailouts are the heart of the optimizing compiler. When speculation fails (triggering a type, shape, overflow guard, etc), or C++ throws an exception, or needs to GC, we must be able to inspect the JIT frame, and if needed, reconstruct an interpreter frame. | ### <s>Register allocator</s> | ||
## Dependencies: | ### <s>Code Generator</s> | ||
### Register allocator | ## <s>Work involved:</s> | ||
### Code Generator | ### <s>Implementing guards</s> | ||
## Work involved: | ### <s>Snapshot building at guard points</s> | ||
### Implementing guards | ### <s>Bailout trampoline</s> | ||
### Snapshot building at guard points | ### <s>Frame reconstruction</s> | ||
### Bailout trampoline | ## <s>Priority: Critical, blocks testing</s> | ||
### Frame reconstruction | ## <s>Time: 2-3 weeks</s> | ||
## Priority: Critical, blocks testing | ## <s>Owner: dvander</s> | ||
## Time: 2-3 weeks | ## <s>Status: <b>DONE</b></s> | ||
## Owner: dvander | |||
## Status: <b>DONE</b> | |||
# '''Calls out to C++''' | # '''Calls out to C++''' | ||
## What: Ability to call into C++ from JIT code. | ## What: Ability to call into C++ from JIT code. | ||
| Line 53: | Line 57: | ||
## Priority: Very high | ## Priority: Very high | ||
## Time: 4+ weeks | ## Time: 4+ weeks | ||
## Owner: | ## Owner: <b>npierron</b> | ||
# '''Property Access and Inline Caches''' | # '''Property Access and Inline Caches''' | ||
## What: Code to handle property access sites | ## What: Code to handle property access sites | ||
| Line 64: | Line 68: | ||
## Time: 4-5 weeks? | ## Time: 4-5 weeks? | ||
## Owner: TBD | ## Owner: TBD | ||
# '''Function calls''' | # <s>'''Function calls'''</s> | ||
## What: Ability to call other Ion or interpreter JS functions | ## <s>What: Ability to call other Ion or interpreter JS functions</s> | ||
## Dependencies: Bailouts | ## <s>Dependencies: Bailouts</s> | ||
## Work involved: | ## <s>Work involved:</s> | ||
### Handle monomorphic versus polymorphic calls (ICs). | ### <s>Handle monomorphic versus polymorphic calls (ICs).</s> | ||
### Handle arity mismatches. | ### <s>Handle arity mismatches.</s> | ||
### Modify trampolines and calling convention so frame reconstruction can restore nested frames. | ### <s>Modify trampolines and calling convention so frame reconstruction can restore nested frames.</s> | ||
## Priority: High | ## <s>Priority: High</s> | ||
## Time: 4+ weeks | ## <s>Time: 4+ weeks</s> | ||
## Owner: | ## <s>Status: <b>Done, except for TI integration.</b></s> | ||
## <s>Owner: sstangl</s> | |||
# '''Baseline Compiler''' | # '''Baseline Compiler''' | ||
## What: A compiler that replaces JägerMonkey as an untyped and fast compiler. | ## What: A compiler that replaces JägerMonkey as an untyped and fast compiler. | ||
| Line 99: | Line 104: | ||
## Dependencies: None | ## Dependencies: None | ||
## Work involved: | ## Work involved: | ||
### | ### Use Type Inference to determine specializations and inlining. | ||
### Make a TypeOracle that uses inference results to inform IonMonkey. | ### Make a TypeOracle that uses inference results to inform IonMonkey. | ||
## Priority: | ### Support on-stack invalidation. | ||
## Time: | ## Priority: High | ||
## Owner: | ## Time: 4 weeks | ||
# '''Method Inlining''' | ## Owner: <b>dvander</b> | ||
## What: Inline methods | # <s>'''Method Inlining'''</s> | ||
## Dependencies: Bailouts, either profiling, ICs, or calls out to C++ | ## <s>What: Inline methods</s> | ||
## <s>Dependencies: Bailouts, either profiling, ICs, or calls out to C++</s> | |||
## <s>Work involved:</s> | |||
### <s>Some heuristic to determine whether methods should be inlined (this can be totally bogus, but maybe better to start with simple methods).</s> | |||
### <s>Changing IonBuilder such that JSScripts bytecode parsing can be "stacked" so inner SSA graph is inlined.</s> | |||
### <s>Change M/LSnapshots to be nested, so snapshots in an inner frame all point to the same outer snapshot.</s> | |||
### <s>Change snapshot encoding and frame reconstruction to support inlining.</s> | |||
## <s>Priority: Medium</s> | |||
## <s>Time: 3 weeks</s> | |||
## <s>Owner: <b>cdleary</b></s> | |||
# <s>'''On-Stack Replacement'''</s> | |||
## <s>What: Jump into JIT code at loop headers, possibly by profiling off-thread.</s> | |||
## <s>Work involved:</s> | |||
### <s>Explore ways to monitor hotness of JIT code.</s> | |||
### <s>Implement the ability to jump into Ion-compiled code at loop headers, possibly by inserting special OSR nodes in the IR.</s> | |||
## <s>Priority: Medium</s> | |||
## <s>Time: 4 weeks</s> | |||
## <s>Owner: <b>sstangl</b></s> | |||
# '''ARM Port''' | |||
## What: Port IonMonkey to ARM | |||
## Work involved: | ## Work involved: | ||
### | ### Bootstrap ARM to x86 parity so both develop at the same time. | ||
## Priority: High | |||
## Time: 4 weeks | |||
## <b>Owner: mrosenberg</b> | |||
## Priority: | |||
## Time: 4 | |||
## Owner: | |||
# '''Debugging''' | # '''Debugging''' | ||
## What: Work with jsd/jsdbg2 or whatever debugging APIs are required. | ## What: Work with jsd/jsdbg2 or whatever debugging APIs are required. | ||
| Line 143: | Line 156: | ||
## Time: Continuous | ## Time: Continuous | ||
## Owner: everyone | ## Owner: everyone | ||
}} {{FeatureInfo | }} | ||
{{FeatureInfo | |||
|Feature priority=P1 | |Feature priority=P1 | ||
|Feature rank=1 | |||
|Feature roadmap=Platform | |Feature roadmap=Platform | ||
|Feature list=Platform | |Feature list=Platform | ||
|Feature project=Responsiveness | |||
|Feature engineering team=JavaScript | |Feature engineering team=JavaScript | ||
}} {{FeatureTeamStatus}} | }} | ||
{{FeatureTeamStatus | |||
|Feature security status=sec-review-unnecessary | |||
|Feature security health=OK | |||
}} | |||