Platform/Features/IonMonkey

From MozillaWiki
< Platform‎ | Features
Revision as of 15:08, 12 July 2011 by Dria (talk | contribs)
Jump to navigation Jump to search
Please use "Edit with form" above to edit this page.

Status

Modern JIT Compiler for JavaScript
Stage Definition
Status `
Release target `
Health OK
Status note `

{{#set:Feature name=Modern JIT Compiler for JavaScript

|Feature stage=Definition |Feature status=` |Feature version=` |Feature health=OK |Feature status note=` }}

Team

Product manager `
Directly Responsible Individual `
Lead engineer David Anderson, David Mandelin
Security lead `
Privacy lead `
Localization lead `
Accessibility lead `
QA lead `
UX lead `
Product marketing lead `
Operations lead `
Additional members `

{{#set:Feature product manager=`

|Feature feature manager=` |Feature lead engineer=David Anderson, David Mandelin |Feature security lead=` |Feature privacy lead=` |Feature localization lead=` |Feature accessibility lead=` |Feature qa lead=` |Feature ux lead=` |Feature product marketing lead=` |Feature operations lead=` |Feature additional members=` }}

Open issues/risks

`

Stage 1: Definition

1. 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.

2. Users & use cases

Goals:

  • Provide a backend that can match or beat the Trace JIT or Crankshaft in speed. Sub-goals:
    • Fine-grained specialization and de-specialization.
    • Integration with type inference.
  • Clean, textbook IR so optimization passes can be separated and pipelined with well-known algorithms.
  • Document and comment well so the implementation and its side effects can be easily understood.
  • Recompilation, debugging, bailouts are all related - and should be solved up-front.
  • First SpiderMonkey JIT that starts off with peer reviews!
  • (Unknown feasibility) Act as a baseline compiler to replace JM2.
  • Manage memory much better, in part to avoid range problems on x64.

Avoiding these:

  • Aggressive stores. We should move state syncing to bailout points.

3. Dependencies

`

4. Requirements

  • Does not regress correctness.
  • Does not regress usability or bench-marketing performance.

Non-goals

`

Stage 2: Design

5. Functional specification

See bug 646923 for an experimental design in Python, and bug 650181 for IR plans.

See /RegisterAllocator for information on the register allocator interfaces.

6. User experience design

`

Stage 3: Planning

7. Implementation plan

`

8. Reviews

Security review

`

Privacy review

`

Localization review

`

Accessibility

`

Quality Assurance review

`

Operations review

`

Stage 4: Development

9. Implementation

  • Immediate worklist:
    • Prototype model backend (bug 646923)
    • Design and implement new IRs (bug 650181)
    • Create a code generator and simple register allocator
  • Long-term worklist:
    • Implement method inlining
    • Implement advanced linear-scan register allocation
    • Implement loop invariant code motion
    • Implement constant sub-expression elimination
    • Implement type-profiling
    • Implement enough functionality to replace existing JITs
    • Implement proper memory management of code
    • Implement interval analysis

Stage 5: Release

10. Landing criteria

` {{#set:Feature open issues and risks=` |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:

  • Provide a backend that can match or beat the Trace JIT or Crankshaft in speed. Sub-goals:
    • Fine-grained specialization and de-specialization.
    • Integration with type inference.
  • Clean, textbook IR so optimization passes can be separated and pipelined with well-known algorithms.
  • Document and comment well so the implementation and its side effects can be easily understood.
  • Recompilation, debugging, bailouts are all related - and should be solved up-front.
  • First SpiderMonkey JIT that starts off with peer reviews!
  • (Unknown feasibility) Act as a baseline compiler to replace JM2.
  • Manage memory much better, in part to avoid range problems on x64.

Avoiding these:

  • Aggressive stores. We should move state syncing to bailout points.

|Feature dependencies=` |Feature requirements=* Does not regress correctness.

  • Does not regress usability or bench-marketing performance.

|Feature non-goals=` |Feature functional spec=See bug 646923 for an experimental design in Python, and bug 650181 for IR plans.

See /RegisterAllocator for information on the register allocator interfaces. |Feature ux design=` |Feature implementation plan=` |Feature security review=` |Feature privacy review=` |Feature localization review=` |Feature accessibility review=` |Feature qa review=` |Feature operations review=` |Feature implementation notes=* Immediate worklist:

    • Prototype model backend (bug 646923)
    • Design and implement new IRs (bug 650181)
    • Create a code generator and simple register allocator
  • Long-term worklist:
    • Implement method inlining
    • Implement advanced linear-scan register allocation
    • Implement loop invariant code motion
    • Implement constant sub-expression elimination
    • Implement type-profiling
    • Implement enough functionality to replace existing JITs
    • Implement proper memory management of code
    • Implement interval analysis

|Feature landing criteria=` }}

Feature details

Priority P1
Rank 999
Theme / Goal `
Roadmap Platform
Secondary roadmap `
Feature list Platform
Project `
Engineering team JavaScript

{{#set:Feature priority=P1

|Feature rank=999 |Feature theme=` |Feature roadmap=Platform |Feature secondary roadmap=` |Feature list=Platform |Feature project=` |Feature engineering team=JavaScript }}

Team status notes

  status notes
Products tbd `
Engineering tbd `
Security tbd `
Privacy tbd `
Localization tbd `
Accessibility tbd `
Quality assurance tbd `
User experience tbd `
Product marketing tbd `
Operations ` `

{{#set:Feature products status=tbd

|Feature products notes=` |Feature engineering status=tbd |Feature engineering notes=` |Feature security status=tbd |Feature security health=` |Feature security notes=` |Feature privacy status=tbd |Feature privacy notes=` |Feature localization status=tbd |Feature localization notes=` |Feature accessibility status=tbd |Feature accessibility notes=` |Feature qa status=tbd |Feature qa notes=` |Feature ux status=tbd |Feature ux notes=` |Feature product marketing status=tbd |Feature product marketing notes=` |Feature operations status=` |Feature operations notes=` }}