Closed
Bug 930048
Opened 11 years ago
Closed 11 years ago
Remove need to read objects directly when optimizing singleton accesses
Categories
(Core :: JavaScript Engine: JIT, defect)
Tracking
()
RESOLVED
FIXED
mozilla28
People
(Reporter: bhackett1024, Assigned: bhackett1024)
References
Details
(Whiteboard: [qa-])
Attachments
(1 file, 1 obsolete file)
64.20 KB,
patch
|
jandem
:
review+
|
Details | Diff | Splinter Review |
When optimizing accesses on singleton objects (global/call accesses as well as baking in singleton object results) Ion reads from the objects directly to make sure the property still exists. With off thread IonBuilder this won't be possible, but since property types only reflect 'own' properties now it is possible to get this information by only inspecting the object's type information.
Attachment #821055 -
Flags: review?(jdemooij)
Comment 1•11 years ago
|
||
Comment on attachment 821055 [details] [diff] [review] patch Review of attachment 821055 [details] [diff] [review]: ----------------------------------------------------------------- Nice de-cx-ification but a few issues I'd like to understand better. I think we can also fix/rename GetPropertyIC::canMonitorSingletonUndefinedSlot to check for is-global instead of is-singleton? ::: js/src/jit/IonBuilder.cpp @@ -5988,5 @@ > - return true; > - if (!shape->hasSlot()) > - return true; > - if (holder->getSlot(shape->slot()).isUndefined()) > - return true; As discussed on IRC, we still need to check this for global objects. @@ -6350,5 @@ > MIRType slotType = MIRType_None; > - if (!staticObject->getSlot(shape->slot()).isUndefined()) { > - JSValueType knownType = propertyTypes.knownTypeTag(constraints()); > - if (knownType != JSVAL_TYPE_UNKNOWN) > - slotType = MIRTypeFromValueType(knownType); Same here: if a global object property has its initial undefined type we don't want to perform a typed store.
Attachment #821055 -
Flags: review?(jdemooij)
Assignee | ||
Comment 2•11 years ago
|
||
The canMonitorSingletonUndefinedSlot stuff shouldn't be necessary for get property ICs anymore, as PropertyReadNeedsTypeBarrier will return true when reading from global objects with no type information for the property. Optimizing the slot type when writing to global objects doesn't need more changes, as the property type set for an initial-undefined global property will be empty and knownTypeTag will be JSVAL_TYPE_UNKNOWN.
Assignee: nobody → bhackett1024
Attachment #821055 -
Attachment is obsolete: true
Attachment #823636 -
Flags: review?(jdemooij)
Updated•11 years ago
|
Attachment #823636 -
Flags: review?(jdemooij) → review+
Assignee | ||
Comment 3•11 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/636620b3af0a
https://hg.mozilla.org/mozilla-central/rev/636620b3af0a
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla28
Updated•10 years ago
|
Whiteboard: [qa-]
You need to log in
before you can comment on or make changes to this bug.
Description
•