Closed
Bug 701965
Opened 13 years ago
Closed 12 years ago
IonMonkey: Compile JSOP_ITER
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
People
(Reporter: nbp, Assigned: bhackett1024)
References
(Blocks 1 open bug)
Details
Attachments
(1 file, 1 obsolete file)
23.30 KB,
patch
|
Details | Diff | Splinter Review |
Necessary for benchmarks.
Assignee | ||
Updated•12 years ago
|
Assignee: general → bhackett1024
Assignee | ||
Comment 1•12 years ago
|
||
Stub calls for the iterator opcodes, works on x86. Needs fast paths for native iterators.
Reporter | ||
Comment 2•12 years ago
|
||
Comment on attachment 584471 [details] [diff] [review] WIP (edde637d2661) Review of attachment 584471 [details] [diff] [review]: ----------------------------------------------------------------- ::: js/src/ion/CodeGenerator.cpp @@ +687,5 @@ > +bool > +CodeGenerator::visitCallIteratorStart(LCallIteratorStart *lir) > +{ > + static const VMFunction info( > + JS_FUNC_TO_DATA_PTR(void *, GetIteratorObject), We no longer declare the VMFunction by hand, use templates here with the redefinition of the arguments in a typedef. See NewArray and InvokeFunction to have examples of usage. @@ +705,5 @@ > +bool > +CodeGenerator::visitCallIteratorNext(LCallIteratorNext *lir) > +{ > + static const VMFunction info( > + JS_FUNC_TO_DATA_PTR(void *, js_IteratorNext), idem. @@ +721,5 @@ > +bool > +CodeGenerator::visitCallIteratorMore(LCallIteratorMore *lir) > +{ > + static const VMFunction info( > + JS_FUNC_TO_DATA_PTR(void *, js_IteratorMore), idem. @@ +744,5 @@ > +bool > +CodeGenerator::visitCallIteratorEnd(LCallIteratorEnd *lir) > +{ > + static const VMFunction info( > + JS_FUNC_TO_DATA_PTR(void *, js_CloseIterator), idem. ::: js/src/ion/LIR-Common.h @@ +1159,5 @@ > + return mir_->toIteratorMore(); > + } > +}; > + > +class LCallIteratorEnd : public LVMCallInstructionHelper<LDefinition::INTEGER, 0, 1, 0> This is wrong, the value returned by the function must correspond to the number of definition. Failing to respect this rule implies the production of corrupted snapshot/safepoint generated for the call. The call is the last instruction generated. ::: js/src/ion/LIR.h @@ +818,5 @@ > > private: > static uint32 defMask() { > + if (Defs == 0) > + return 0; This is wrong, because the call must be the last instruction in the CodeGenerator visit function. ::: js/src/ion/Lowering.cpp @@ +858,5 @@ > +bool > +LIRGenerator::visitIteratorMore(MIteratorMore *ins) > +{ > + LCallIteratorMore *lir = new LCallIteratorMore(useRegister(ins->iterator())); > + return defineVMReturn(lir, ins) && assignSafepoint(lir, ins); Nice, usually we do the opposite order, I don't think there is one. But I am not sure we want to change the writting style for this file … if (!assignSafepoint(lir, ins)) return false; return defineVMReturn(lir, ins); dvander ? ::: js/src/ion/MIRGraph.cpp @@ +143,5 @@ > > void > MBasicBlock::copySlots(MBasicBlock *from) > { > + JS_ASSERT(stackPosition_ == from->stackPosition_); I am not sure to understand the impliciation of the modification made in this file … anyone else ?
Comment 3•12 years ago
|
||
We need this for ss-fasta. Brian, since you're working on other things atm, I can also rebase and land this for you, if you want.
Status: NEW → ASSIGNED
Assignee | ||
Comment 4•12 years ago
|
||
(In reply to Jan de Mooij (:jandem) from comment #3) > We need this for ss-fasta. Brian, since you're working on other things atm, > I can also rebase and land this for you, if you want. Sure, go ahead. This just has slow paths for iteration stuff, but with bug 713754 landed it should not be hard to add fast paths.
Comment 5•12 years ago
|
||
Rebased, will land this tomorrow.
Attachment #584471 -
Attachment is obsolete: true
Comment 6•12 years ago
|
||
Pushed (with bhackett as author): http://hg.mozilla.org/projects/ionmonkey/rev/e4fb2cc5006a Filed bug 725241 for the fast paths.
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•