Closed
Bug 933293
Opened 11 years ago
Closed 4 years ago
Optimize ConvertAndCopyTo calls in MIR code
Categories
(Core :: JavaScript Engine: JIT, defect, P5)
Tracking
()
RESOLVED
INVALID
People
(Reporter: nmatsakis, Assigned: nmatsakis)
References
Details
Attachments
(2 obsolete files)
Both new object creation (bug 933277) and assignments (bug 933289) can result in calls to the self-hosted helper ConvertAndCopyTo. In some cases we should be able to further optimize these calls by "unrolling" them into a series of accesses and assignments. We have to be very careful because if a jit bailout should occur it may not be observable, and there is no convenient bytecode to jump back into. Therefore I would probably write this optimization to examine the value being converted and handle two cases:
1. The value being converted is known to be a typed object of equivalent type. We can use memcpy in that case. This may be better done in IonBuilder directly.
2. TI can guarantee for us that loading the properties and converting the values we need to load/convert will not have side-effects, so it's okay for these loads/conversions to be replayed if necessary. This will frequently occur in the common case of users using literal syntax (`new Point({x: 22, y: 44})`) -- in that case we should be able to determine the precise *value* that is being loaded (22 for `x`, etc).
Assignee | ||
Updated•11 years ago
|
Blocks: harmony:typedobjects
Assignee | ||
Comment 1•11 years ago
|
||
Some discussion of my plan here: http://smallcultfollowing.com/babysteps/blog/2013/11/04/optimizing-complex-typed-object-assignments/
Assignee | ||
Updated•11 years ago
|
Assignee: nobody → nmatsakis
Assignee | ||
Comment 2•11 years ago
|
||
Attachment #830572 -
Flags: review?(jdemooij)
Attachment #830572 -
Flags: feedback?(pnkfelix)
Assignee | ||
Comment 3•11 years ago
|
||
Test case that performs better. I'm reluctant to add this as a jit-test, instead I'd like to setup some benchmarks in awfy (perhaps including this one).
Assignee | ||
Comment 4•11 years ago
|
||
Attachment #830572 -
Attachment is obsolete: true
Attachment #830572 -
Flags: review?(jdemooij)
Attachment #830572 -
Flags: feedback?(pnkfelix)
Assignee | ||
Comment 5•11 years ago
|
||
Comment on attachment 830574 [details]
jaswanth.js
Attached to wrong bug (argh).
Attachment #830574 -
Attachment is obsolete: true
Comment 6•8 years ago
|
||
Assuming p5 because related to typed objects, which are nightly-only and not specced yet.
Priority: -- → P5
Comment 7•4 years ago
|
||
No longer valid, self-hosting code for typed object has been removed.
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•