Bug 750279 (UntangleFrontEnd)

[meta] Untangle front-end state

RESOLVED FIXED

Status

()

Core
JavaScript Engine
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: njn, Assigned: njn)

Tracking

({meta})

Firefox Tracking Flags

(Not tracked)

Details

(Assignee)

Description

5 years ago
The front-end is a big ball of mud.  In particular, the state is very intertwined.  Examples:

- Parser has a pointer to TreeContext, and TreeContext has a pointer to Parser.  

- Parser.cpp includes BytecodeEmitter.h;  BytecodeEmitter.cpp includes Parser.h.

- BytecodeEmitter is a sub-class of TreeContext, but sometimes we down-cast TreeContext to BytecodeEmitter.

- The tcflags are a mish-mash of values with a range of lifetimes and mutability.  Some are set up-front and not changed;  some are set and cleared multiple times.  Some are relevant only in the parser; some are relevant in the parser and bytecode emitter.

As a result, any function that has access to any of the major pieces of front-end state -- Parser, TreeContext, BytecodeEmitter -- has access to pretty much all of it.  Speaking as someone who's only just started looking closely at the front-end, this makes things really hard to understand.

This is a tracking bug for cleaning this up.
(Assignee)

Updated

5 years ago
Alias: UntangleFrontEnd
(Assignee)

Updated

5 years ago
Depends on: 750282

Comment 1

5 years ago
\o/
(Assignee)

Updated

5 years ago
Depends on: 750580
(Assignee)

Updated

5 years ago
Depends on: 750606
(Assignee)

Updated

5 years ago
Depends on: 751818
(Assignee)

Updated

5 years ago
Depends on: 752758
(Assignee)

Updated

5 years ago
Depends on: 752793
(Assignee)

Updated

5 years ago
Depends on: 752816
(Assignee)

Updated

5 years ago
Depends on: 753249
(Assignee)

Updated

5 years ago
Depends on: 753657
(Assignee)

Updated

5 years ago
Depends on: 754179
(Assignee)

Updated

5 years ago
Depends on: 754180
(Assignee)

Updated

5 years ago
Depends on: 754181
(Assignee)

Updated

5 years ago
Depends on: 754739
(Assignee)

Updated

5 years ago
Depends on: 757336
(Assignee)

Updated

5 years ago
Depends on: 757690
(Assignee)

Updated

5 years ago
Depends on: 759246
(Assignee)

Updated

5 years ago
Depends on: 761914
(Assignee)

Updated

5 years ago
Depends on: 764714
(Assignee)

Updated

5 years ago
Depends on: 767202
(Assignee)

Updated

5 years ago
Depends on: 770067
(Assignee)

Comment 2

5 years ago
I think I'm done with this.
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.