Closed Bug 1499544 Opened 6 years ago Closed 6 years ago

Initial Bytecode Interface

Categories

(Core :: JavaScript Engine, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
mozilla65
Tracking Status
firefox64 --- wontfix
firefox65 --- fixed

People

(Reporter: mgaudet, Assigned: mgaudet)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

This bug covers the preliminary steps to provide a bytecode interface.
Severity: normal → enhancement
Status: NEW → ASSIGNED
Priority: -- → P3
This is an initial skeleton of an inteface for bytecode. There are 6
major portions included in this patch.

- RawBytecode: A typedef to expose jsbytecode* in a controlled manner, to allow
  easy future audits.

- BytecodeLocation: This is an immutable view of a single program operation (a
  bytecode). There is is some basic functionality in here included for
  experimentation sake.

- BytecodeLocationOffset: An immutable view of a source location offset, (and
  RawBytecodeLocationOffset, another typedef to ease future auditing)

- BytecodeIterator: A forward iterator over BytecodeLocations, using program
  text order.

- AllBytecodeIterable: A wrapper class that allows the use of a range-based
  for-loop over BytecodeLocations in a Script.

- Modifications to JSScript to expose BytecodeLocations and answer some queries
  about containment.

The interface is experimentally tested using JSScript::initScriptCounts as a
simple playground for demonstrating the use of the interface.
The interface is expanded and refined in this patch, showing a more
complicated set of requirements and the answers to those requirements

Depends on D8918
Pushed by mgaudet@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/908a0972c1b5
[Part 1] Foundational implementation of BytecodeIterator r=djvj
https://hg.mozilla.org/integration/mozilla-inbound/rev/1417a92298ff
[Part 2] Use ByteCodeLocation and ByteCodeIterator r=djvj
https://hg.mozilla.org/mozilla-central/rev/908a0972c1b5
https://hg.mozilla.org/mozilla-central/rev/1417a92298ff
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla65
You need to log in before you can comment on or make changes to this bug.