Closed
Bug 826691
Opened 12 years ago
Closed 12 years ago
BaselineCompiler: Add optimized SETPROP stub
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
People
(Reporter: jandem, Assigned: jandem)
References
(Blocks 1 open bug)
Details
Attachments
(2 files)
21.62 KB,
patch
|
djvj
:
review+
|
Details | Diff | Splinter Review |
6.05 KB,
patch
|
djvj
:
review+
|
Details | Diff | Splinter Review |
No description provided.
Assignee | ||
Comment 1•12 years ago
|
||
Adds a stub to handle SETPROP/SETGNAME/SETNAME of (existing) native object properties. This patch also changes the type update fallback stub, we now pass the object on which we are setting the property. This is necessary so that we can use the TI AddTypePropertyId functions (using TypeObject::addPropertyType directly is wrong if, for instance, TI is disabled).
With this patch we have some new jit-test failures, because SETPROP requires a write barrier during incremental GC. I will attach a patch for that next week (and I won't land this patch before that's done).
Attachment #697979 -
Flags: review?(kvijayan)
Comment 2•12 years ago
|
||
Comment on attachment 697979 [details] [diff] [review]
Patch
Review of attachment 697979 [details] [diff] [review]:
-----------------------------------------------------------------
::: js/src/ion/BaselineIC.cpp
@@ +1899,5 @@
> +
> + // Guard that the type object matches.
> + masm.loadPtr(Address(BaselineStubReg, ICSetProp_Native::offsetOfType()), scratch);
> + masm.branchPtr(Assembler::NotEqual, Address(objReg, JSObject::offsetOfType()), scratch,
> + &failureUnstow);
The EmitStowICValues could be moved to happen after the guard that follows (changing the branchPtr to jump to |&failure| instead of |&failureUnstow|). In the case of where the guard fails, this saves us an extra stow and and an unstow. Moreover, it brings the EmitStowICValues and EmitUnstowICValues calls closer together, which helps clarity.
::: js/src/ion/BaselineIC.h
@@ +468,5 @@
> + inline ICFallbackStub *getFallbackStub() {
> + ICStub *stub = this;
> + while (!stub->isFallback())
> + stub = stub->next();
> + return stub->toFallbackStub();
nit: JS_ASSERT(!stub->next()) before return.
Attachment #697979 -
Flags: review?(kvijayan) → review+
Assignee | ||
Comment 3•12 years ago
|
||
Add incremental GC barriers; fixes the test failures I got with the previous patch. With the (disabled) barriers, I didn't notice any slowdown, so this always adds the patchable barriers to the stubs. This is nice because it makes toggling barriers very fast, since we don't have to walk over scripts/IC's.
Attachment #707635 -
Flags: review?(kvijayan)
Updated•12 years ago
|
Attachment #707635 -
Flags: review?(kvijayan) → review+
Assignee | ||
Comment 4•12 years ago
|
||
Pushed with nits addressed:
https://hg.mozilla.org/projects/ionmonkey/rev/6a3cf1c0b0fb
https://hg.mozilla.org/projects/ionmonkey/rev/b2be0e8a374f
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.
Description
•