Closed
Bug 881536
Opened 12 years ago
Closed 12 years ago
PJS: Support GetElementIC in parallel
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla25
People
(Reporter: shu, Assigned: shu)
References
Details
Attachments
(4 files, 3 obsolete files)
|
4.45 KB,
patch
|
nbp
:
review+
|
Details | Diff | Splinter Review |
|
5.76 KB,
patch
|
nbp
:
review+
|
Details | Diff | Splinter Review |
|
36.13 KB,
patch
|
nbp
:
review+
|
Details | Diff | Splinter Review |
|
8.88 KB,
patch
|
bhackett1024
:
review+
|
Details | Diff | Splinter Review |
Should be fairly straightforward.
| Assignee | ||
Comment 1•12 years ago
|
||
Assignee: general → shu
Attachment #760631 -
Flags: review?(nicolas.b.pierron)
| Assignee | ||
Comment 2•12 years ago
|
||
Attachment #760644 -
Flags: review?(nicolas.b.pierron)
| Assignee | ||
Comment 3•12 years ago
|
||
Attachment #760652 -
Flags: review?(bhackett1024)
| Assignee | ||
Comment 4•12 years ago
|
||
Attachment #760631 -
Attachment is obsolete: true
Attachment #760631 -
Flags: review?(nicolas.b.pierron)
Attachment #760671 -
Flags: review?(nicolas.b.pierron)
| Assignee | ||
Comment 5•12 years ago
|
||
Attachment #760652 -
Attachment is obsolete: true
Attachment #760652 -
Flags: review?(bhackett1024)
Attachment #760672 -
Flags: review?(bhackett1024)
| Assignee | ||
Comment 6•12 years ago
|
||
Attachment #760688 -
Flags: review?(nicolas.b.pierron)
Comment 7•12 years ago
|
||
Comment on attachment 760672 [details] [diff] [review]
Part 3: Pure VM path for GetElement
Review of attachment 760672 [details] [diff] [review]:
-----------------------------------------------------------------
::: js/src/jsobj.cpp
@@ +4131,5 @@
> + /* Fast-path typed array index accesses. */
> + if (obj->isTypedArray() && index < TypedArray::length(obj)) {
> + TypedArray::copyTypedArrayElement(obj, index, MutableHandleValue::fromMarkedLocation(vp));
> + return true;
> + }
This looks like more than just a fast path, it seems GetPropertyPure will fail if passed a typed array due to typed arrays being non-native classes. Could this special casing be done in GetPropertyPure / LookupPropertyPure themselves? It seems like looking for typed arrays there would be more robust and allow accesses like typedArray.length to work in PJS.
@@ +4148,5 @@
> + uint32_t index;
> + if (IsDefinitelyIndex(prop, &index))
> + return GetElementPure(obj, index, vp);
> +
> + /* Atomizing the property value is effectful and not threadsafe. */
(well, not yet anyways)
Attachment #760672 -
Flags: review?(bhackett1024)
Comment 8•12 years ago
|
||
Comment on attachment 760671 [details] [diff] [review]
Part 1: Factor out stubbedShape to ParallelIonCache
Review of attachment 760671 [details] [diff] [review]:
-----------------------------------------------------------------
This is a good patch which extract the ShapeSet and the logic for attaching stubs to a ParallelIonCache. For parallel caches which will not rely on shapes this will just create an extra NULL pointer, but this sounds fine for now.
::: js/src/ion/IonCaches.h
@@ +881,5 @@
> + bool initStubbedShapes(JSContext *cx);
> +
> + public:
> + virtual void reset();
> + virtual void destroy();
nit: Usually we do not repeat the virtual keyword.
Attachment #760671 -
Flags: review?(nicolas.b.pierron) → review+
Updated•12 years ago
|
Attachment #760644 -
Flags: review?(nicolas.b.pierron) → review+
Comment 9•12 years ago
|
||
Comment on attachment 760688 [details] [diff] [review]
Part 4: Implement ParallelGetElementIC
Review of attachment 760688 [details] [diff] [review]:
-----------------------------------------------------------------
Good job, thanks for refactoring the can* functions and use them in assertions of the code-gen part of ICs.
::: js/src/ion/IonCaches.cpp
@@ +2854,5 @@
> +
> + // Avoid unnecessary locking if cannot attach stubs and idempotent.
> + if (cache.idempotent() && !cache.canAttachStub())
> + return TP_SUCCESS;
> + {
nit: This is weird. Either add a space before the curly brace or remove them.
Attachment #760688 -
Flags: review?(nicolas.b.pierron) → review+
Comment 10•12 years ago
|
||
Comment on attachment 760688 [details] [diff] [review]
Part 4: Implement ParallelGetElementIC
Review of attachment 760688 [details] [diff] [review]:
-----------------------------------------------------------------
I think you might need to add ParallelElementIC::initializeAddCacheState in CodeGenerator-x86.cpp
| Assignee | ||
Comment 11•12 years ago
|
||
(In reply to Nicolas B. Pierron [:nbp] from comment #10)
> Comment on attachment 760688 [details] [diff] [review]
> Part 4: Implement ParallelGetElementIC
>
> Review of attachment 760688 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> I think you might need to add ParallelElementIC::initializeAddCacheState in
> CodeGenerator-x86.cpp
Ah, good catch!
Comment 12•12 years ago
|
||
(In reply to Nicolas B. Pierron [:nbp] from comment #8)
> nit: Usually we do not repeat the virtual keyword.
MOZ_OVERRIDE is a better idea, and it makes sure signature changes happen properly if the base class signature changes.
| Assignee | ||
Comment 13•12 years ago
|
||
Hopefully addressed comments.
Attachment #760672 -
Attachment is obsolete: true
Attachment #765093 -
Flags: review?(bhackett1024)
Updated•12 years ago
|
Attachment #765093 -
Flags: review?(bhackett1024) → review+
| Assignee | ||
Comment 15•12 years ago
|
||
remote: https://hg.mozilla.org/integration/mozilla-inbound/rev/eb6222cdc410
remote: https://hg.mozilla.org/integration/mozilla-inbound/rev/50339ff1412f
remote: https://hg.mozilla.org/integration/mozilla-inbound/rev/b050f72961f0
remote: https://hg.mozilla.org/integration/mozilla-inbound/rev/cc695d611390
Comment 16•12 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/eb6222cdc410
https://hg.mozilla.org/mozilla-central/rev/50339ff1412f
https://hg.mozilla.org/mozilla-central/rev/b050f72961f0
https://hg.mozilla.org/mozilla-central/rev/cc695d611390
Status: NEW → RESOLVED
Closed: 12 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla25
You need to log in
before you can comment on or make changes to this bug.
Description
•