Closed
Bug 769363
Opened 12 years ago
Closed 12 years ago
IonMonkey: LBoundsCheck should not require a register for the length operand
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
People
(Reporter: jandem, Assigned: evilpie)
References
(Blocks 1 open bug)
Details
(Whiteboard: [ion:t])
Attachments
(1 file)
7.52 KB,
patch
|
jandem
:
review+
|
Details | Diff | Splinter Review |
On x86, we want to allow using a stack slot for LBoundsCheck's length operand to avoid a register (load) on am3 (and hoisting an array length is pretty common).
Updated•12 years ago
|
Whiteboard: [ion:t]
Assignee | ||
Updated•12 years ago
|
Assignee: general → evilpies
Assignee | ||
Comment 1•12 years ago
|
||
This passes try, but I haven't found time yet to figure out if it actually helps on x86.
Assignee | ||
Updated•12 years ago
|
Attachment #655367 -
Flags: review?(jdemooij)
Reporter | ||
Comment 2•12 years ago
|
||
Comment on attachment 655367 [details] [diff] [review] v1 Review of attachment 655367 [details] [diff] [review]: ----------------------------------------------------------------- Looks good, thanks! ::: js/src/ion/Lowering.cpp @@ +1303,5 @@ > { > LInstruction *check; > if (ins->minimum() || ins->maximum()) { > check = new LBoundsCheckRange(useRegisterOrConstant(ins->index()), > + useAnyOrConstant(ins->length()), You should add useAny (similar to useAnyOrConstant) and call it here, since BoundsCheckRange codegen doesn't handle a constant length operand. Not sure if this case will actually end up here, but it's best to be safe. ::: js/src/ion/shared/MacroAssembler-x86-shared.h @@ +101,5 @@ > } > + void cmp32(const Operand &src, const Imm32 &imm) { > + cmpl(src, imm); > + } > + void cmp32(const Operand &lhs, const Register &rhs) { Nit: please change the other cmp32 methods to also use lhs/rhs for the argument names.
Attachment #655367 -
Flags: review?(jdemooij) → review+
Assignee | ||
Comment 3•12 years ago
|
||
http://hg.mozilla.org/projects/ionmonkey/rev/2257377e7972
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Assignee | ||
Updated•12 years ago
|
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Assignee | ||
Comment 4•12 years ago
|
||
Second try: http://hg.mozilla.org/projects/ionmonkey/rev/93ebcdb7b37b
Assignee | ||
Comment 5•12 years ago
|
||
This wasn't a very obvious win, but the patch is small.
Status: REOPENED → RESOLVED
Closed: 12 years ago → 12 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•