Closed Bug 1473796 Opened 3 years ago Closed 2 years ago

Add helper classes to emit bytecode for function


(Core :: JavaScript Engine, enhancement, P3)




Tracking Status
firefox67 --- fixed


(Reporter: arai, Assigned: arai)


(Blocks 1 open bug)



(4 files)

Just like others (bug 1456006, bug 1456404).

Emitting function consists of two parts:
  1. emitting function declaration/expression on the parent script
  2. emitting parameters/body in the child script

To reuse the classes in BinAST streaming compilation which uses different compiler than current BytecodeEmitter which does "ParseNode=>bytecode",
those 2 parts should be separated into 2 classes.
Summary: Add classes helper to emit bytecode for function → Add helper classes to emit bytecode for function
bug 1475458 needs to be addressed, in order to design the interface.
Depends on: 1475458
See Also: → 1518391
Depends on: 1519005
Depends on: 1284719
Depends on: es-fields

bug 1530324 removes wrapper for async, and also modifies the async body.

Depends on: 1530324
Pushed by
Part 1: Add DefaultEmitter. r=jorendorff
Part 2: Do not use TokenPos in BytecodeEmitter::{setFunctionBodyEndPos,setScriptStartOffsetIfUnset}. r=jorendorff
Part 3: Move DestructuringFlavor into its own header. r=jorendorff
Part 4: Add FunctionEmitter, FunctionScriptEmitter, and FunctionParamsEmitter. r=jorendorff
You need to log in before you can comment on or make changes to this bug.