Closed Bug 714397 Opened 14 years ago Closed 14 years ago

IonMonkey: Cannot inline functions with too many provided arguments.

Categories

(Core :: JavaScript Engine, defect)

12 Branch
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: sstangl, Assigned: cdleary)

Details

Attachments

(2 files)

The attached test case asserts with --ion -n: > Assertion failure: args.length() == info().nargs(), at /home/sstangl/dev/ionmonkey/js/src/ion/IonBuilder.cpp:290 It looks like inlining does not yet handle the case where too many arguments are provided.
Assignee: general → christopher.leary
Status: NEW → ASSIGNED
Attachment #585838 - Flags: review? → review?(sstangl)
Comment on attachment 585838 [details] [diff] [review] Pad to nargs if necessary. Review of attachment 585838 [details] [diff] [review]: ----------------------------------------------------------------- ::: js/src/ion/IonBuilder.cpp @@ +295,5 @@ > + const size_t nargs = info().nargs(); > + if (args.length() < nargs) { > + for (size_t i = 0, missing = nargs - args.length(); i < missing; ++i) { > + MConstant *undef = MConstant::New(UndefinedValue()); > + current->add(undef); Do we have to add so many distinct constants? Can we just add one outside of the for() loop, then append it multiple times to args? GVN will wind up undoing the work here, but we can avoid it early.
Attachment #585838 - Flags: review?(sstangl) → review+
(In reply to Sean Stangl from comment #2) > Do we have to add so many distinct constants? Can we just add one outside of > the for() loop, then append it multiple times to args? GVN will wind up > undoing the work here, but we can avoid it early. We can't constant propagate until SSA is finished (see the big comment above MBasicBlock::setVariable - when rewriting a loop we could accidentally overwrite uses of the wrong argument).
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: