Closed
Bug 714218
Opened 14 years ago
Closed 14 years ago
Move element/property/special-specific handling for a few classes out of getGeneric methods into specific get* methods
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla12
People
(Reporter: Waldo, Assigned: Waldo)
References
Details
Attachments
(1 file)
|
10.92 KB,
patch
|
bhackett1024
:
review+
|
Details | Diff | Splinter Review |
No description provided.
Attachment #584904 -
Flags: review?(bhackett1024)
Comment 1•14 years ago
|
||
Comment on attachment 584904 [details] [diff] [review]
Patch
Review of attachment 584904 [details] [diff] [review]:
-----------------------------------------------------------------
::: js/src/jsarray.cpp
@@ +871,1 @@
> }
Will the getGeneric hooks be going away entirely soon?
Attachment #584904 -
Flags: review?(bhackett1024) → review+
Comment 2•14 years ago
|
||
Comment on attachment 584904 [details] [diff] [review]
Patch
> array_getSpecial(JSContext *cx, JSObject *obj, JSObject *receiver, SpecialId sid, Value *vp)
> {
>- return array_getGeneric(cx, obj, receiver, SPECIALID_TO_JSID(sid), vp);
>+ if (obj->isDenseArray()) {
>+ JSObject *proto = obj->getProto();
>+ if (!proto) {
>+ vp->setUndefined();
>+ return true;
>+ }
>+ }
Perhaps rewrite this as
if (obj->isDenseArray() && !obj->getProto()) {
vp->setUndefined();
return true;
}
?
| Assignee | ||
Comment 3•14 years ago
|
||
All the generic hooks will be going away "soon". I'm not sure exactly what will replace them. v8 just has all callsites convert to string, then fork on index-or-name at that point. With our special junk, we can't do that so tersely. It's an ugly problem I plan to think about today and hopefully come to some idea of a solution.
| Assignee | ||
Comment 4•14 years ago
|
||
Target Milestone: --- → mozilla12
Comment 5•14 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•