Closed
Bug 1169511
Opened 9 years ago
Closed 9 years ago
Split PNK_TYPEOF into one kind for application to names, one kind for application to other expressions
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla41
Tracking | Status | |
---|---|---|
firefox41 | --- | fixed |
People
(Reporter: Waldo, Assigned: Waldo)
Details
Attachments
(1 file)
17.95 KB,
patch
|
efaust
:
review+
|
Details | Diff | Splinter Review |
PNK_DELETE emboldened me to finish the job and deal with the other single-kind-that-should-be-many.
Assignee | ||
Comment 1•9 years ago
|
||
Attachment #8612682 -
Flags: review?(efaustbmo)
Comment 2•9 years ago
|
||
Comment on attachment 8612682 [details] [diff] [review] Patch Review of attachment 8612682 [details] [diff] [review]: ----------------------------------------------------------------- r=me with comment about unifying the emitter functions answered. ::: js/src/frontend/BytecodeEmitter.cpp @@ +7012,5 @@ > + return emit1(JSOP_TYPEOF); > +} > + > +bool > +BytecodeEmitter::emitTypeofExpr(ParseNode* node) bool BytecodeEmitter::emitTypeof(ParseNode* pn, JSOp op) { MOZ_ASSERT(op == JSOP_TYPEOF || op == JSOP_TYPEOFEXPR); <Identical code from both methods> return emit1(op); } Are we building towards making these do different things, or something? @@ +7495,5 @@ > break; > } > > + case PNK_TYPEOFNAME: > + ok = emitTypeofName(pn); we can do this |ok =| business, but Jason and I were trying to make new ones |return emitTypeofName(pn)|. What do you think?
Attachment #8612682 -
Flags: review?(efaustbmo) → review+
Assignee | ||
Comment 4•9 years ago
|
||
(In reply to Eric Faust [:efaust] from comment #2) > > +bool > > +BytecodeEmitter::emitTypeofExpr(ParseNode* node) > > bool > BytecodeEmitter::emitTypeof(ParseNode* pn, JSOp op) > { > MOZ_ASSERT(op == JSOP_TYPEOF || op == JSOP_TYPEOFEXPR); > > <Identical code from both methods> > > return emit1(op); > } > > Are we building towards making these do different things, or something? I think so, yes. That JSOP_TYPEOF and JSOP_TYPEOFEXPR share the same code is pretty bonkers, versus having separate code paths. But for another day. I unified for now, it's easy to split these later. > > + case PNK_TYPEOFNAME: > > + ok = emitTypeofName(pn); > > we can do this |ok =| business, but Jason and I were trying to make new ones > |return emitTypeofName(pn)|. What do you think? The code after the overall switch doesn't obviously not apply to these cases, so I left this as-is.
I had to back this out so I could cleanly back out bug 1141865 for bustage. Feel free to reland this as soon as I reopen the tree.
Comment 8•9 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/d86e23a06839
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
status-firefox41:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla41
You need to log in
before you can comment on or make changes to this bug.
Description
•