Closed Bug 706611 Opened 8 years ago Closed 8 years ago

Remove JSOP_NOTRACE

Categories

(Core :: JavaScript Engine, defect)

x86
macOS
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla11

People

(Reporter: bhackett, Assigned: bhackett)

References

Details

Attachments

(1 file)

This opcode is irrelevant with the tracer gone.  JSOP_TRACE could also be renamed to JSOP_LOOPHEAD, to be more explicit about its function.  This opcode should not be removed, as it is very helpful for doing loop related analysis and compilation.
Attached patch patchSplinter Review
Assignee: general → bhackett1024
Attachment #578050 - Flags: review?(dvander)
Attachment #578050 - Flags: review?(dvander) → review+
OOC, is it more useful as a bytecode than as a source note?
(In reply to Chris Leary [:cdleary] from comment #2)
> OOC, is it more useful as a bytecode than as a source note?

Yeah, it is.  A lot of analysis information is stored in terms of bytecode offsets (e.g. analysis->getCode(pc)), and without strategically placed opcodes in the stream itself we could have, e.g. multiple loops that shared the same header opcode, which would make distinguishing them different.

Storing things in the bytecode stream is less error prone, is easier to understand and access, and uses less memory.  My own (evolving) view is that source notes should really just be used for help in decompilation, and if we get to the point where we keep (compressed) source around and are lazily compiling scripts to bytecode, then there is no need for the decompiler and the bytecode should not have any source notes at all.
> Storing things in the bytecode stream is less error prone, is easier to
> understand and access, and uses less memory.  My own (evolving) view is that
> source notes should really just be used for help in decompilation, and if we
> get to the point where we keep (compressed) source around and are lazily
> compiling scripts to bytecode, then there is no need for the decompiler and
> the bytecode should not have any source notes at all.

IME source notes are a pain, the decompiler is a pain, and lazy bytecode compilation will be a big memory and speed win.  So three cheers for that idea!
https://hg.mozilla.org/mozilla-central/rev/d32ccb2b8a05
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla11
Depends on: 707384
You need to log in before you can comment on or make changes to this bug.