Initial Bytecode Interface

RESOLVED FIXED in Firefox 65

Status

()

enhancement
P3
normal
RESOLVED FIXED
9 months ago
10 days ago

People

(Reporter: mgaudet, Assigned: mgaudet)

Tracking

(Blocks 1 bug)

Trunk
mozilla65
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox64 wontfix, firefox65 fixed)

Details

Attachments

(2 attachments)

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: 9 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla65
You need to log in before you can comment on or make changes to this bug.