Closed Bug 725605 Opened 12 years ago Closed 12 years ago

IonMonkey: CallGetProperty should accept both objects and strings

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: jandem, Assigned: jandem)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Attached patch PatchSplinter Review
date-format-xparb has this function:
--
var result = new String(val);
// ...
while (result.length < size) {
    result = ch + result;
}
--
result.length bails out because result is a string after the first iteration and is unboxed as object. The patch changes CallGetProperty to accept a Value so that we can handle both objects and strings without bailing out.

The patch may regress some other tests a bit, but I think this is the right way forward and we can use IC's or fast paths to fix these regressions.
Attachment #595694 - Flags: review?(dvander)
Attachment #595694 - Flags: review?(dvander) → review+
http://hg.mozilla.org/projects/ionmonkey/rev/5c6072296e4a
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.