Last Comment Bug 706611 - Remove JSOP_NOTRACE
: Remove JSOP_NOTRACE
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: JavaScript Engine (show other bugs)
: unspecified
: x86 Mac OS X
: -- normal (vote)
: mozilla11
Assigned To: Brian Hackett (:bhackett)
:
:
Mentors:
Depends on: 707384
Blocks: 698201
  Show dependency treegraph
 
Reported: 2011-11-30 12:10 PST by Brian Hackett (:bhackett)
Modified: 2011-12-02 17:56 PST (History)
3 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
patch (36.70 KB, patch)
2011-11-30 13:07 PST, Brian Hackett (:bhackett)
dvander: review+
Details | Diff | Splinter Review

Description Brian Hackett (:bhackett) 2011-11-30 12:10:54 PST
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.
Comment 1 Brian Hackett (:bhackett) 2011-11-30 13:07:22 PST
Created attachment 578050 [details] [diff] [review]
patch
Comment 2 Chris Leary [:cdleary] (not checking bugmail) 2011-11-30 14:13:05 PST
OOC, is it more useful as a bytecode than as a source note?
Comment 3 Brian Hackett (:bhackett) 2011-11-30 14:22:10 PST
(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.
Comment 4 Nicholas Nethercote [:njn] 2011-11-30 15:23:20 PST
> 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!
Comment 5 Brian Hackett (:bhackett) 2011-12-01 15:14:25 PST
https://hg.mozilla.org/integration/mozilla-inbound/rev/d32ccb2b8a05
Comment 6 Marco Bonardo [::mak] 2011-12-02 03:22:15 PST
https://hg.mozilla.org/mozilla-central/rev/d32ccb2b8a05

Note You need to log in before you can comment on or make changes to this bug.