Closed Bug 1585234 Opened 4 months ago Closed 3 months ago

[BinAST} Remove unnecessary Variant on Context

Categories

(Core :: JavaScript Engine, task, P3)

task

Tracking

()

RESOLVED FIXED
mozilla71
Tracking Status
firefox71 --- fixed

People

(Reporter: arai, Assigned: arai)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

In several cases the actual content of Context variant is fixed to 1 type, and in some case 2.
we can specialize each code and remove Variant::match invocation.

A half of Parser methods are using single context type, and remaining are using
2 context types. There are no place that uses 3 context types necessarily.

Part 1 modifies the code generator to collect context type information, and
reflect the information to Parser methods, to use single non-Variant type
if possible.

Also changed corresponding TokenReader methods to use single non-Variant type.

Part 2 addes smaller Variant types (FieldOrRootContext and FieldOrListContext),
and modifies the code generator to use smaller Variant instead of Context.

Depends on D48011

Pushed by arai_a@mac.com:
https://hg.mozilla.org/integration/autoland/rev/a384b2a67709
Part 1: Remove unnecessary Variant wrap/match on context. r=Yoric
https://hg.mozilla.org/integration/autoland/rev/8f3223ff55e2
Part 2: Use smaller Variant for context. r=Yoric
Status: ASSIGNED → RESOLVED
Closed: 3 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla71
You need to log in before you can comment on or make changes to this bug.