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)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla12

People

(Reporter: Waldo, Assigned: Waldo)

References

Details

Attachments

(1 file)

Attached patch PatchSplinter Review
No description provided.
Attachment #584904 - Flags: review?(bhackett1024)
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 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; } ?
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.
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.

Attachment

General

Created:
Updated:
Size: