IonMonkey: CallGetProperty should accept both objects and strings

RESOLVED FIXED

Status

()

Core
JavaScript Engine
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: jandem, Assigned: jandem)

Tracking

(Blocks: 1 bug)

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

5 years ago
Created attachment 595694 [details] [diff] [review]
Patch

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+
(Assignee)

Comment 1

5 years ago
http://hg.mozilla.org/projects/ionmonkey/rev/5c6072296e4a
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.