Remove JSOP_NOTRACE

RESOLVED FIXED in mozilla11

Status

()

Core
JavaScript Engine
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: bhackett, Assigned: bhackett)

Tracking

unspecified
mozilla11
x86
Mac OS X
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

6 years ago
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.
(Assignee)

Comment 1

6 years ago
Created attachment 578050 [details] [diff] [review]
patch
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?
(Assignee)

Comment 3

6 years ago
(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!
(Assignee)

Comment 5

6 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/d32ccb2b8a05
https://hg.mozilla.org/mozilla-central/rev/d32ccb2b8a05
Status: NEW → RESOLVED
Last Resolved: 6 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.