Summary: | [[SetPrototypeOf]] should be a fully virtual method in ClassInfo::methodTable | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Saam Barati <saam> | ||||||
Component: | JavaScriptCore | Assignee: | Saam Barati <saam> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | benjamin, fpizlo, ggaren, gskachkov, keith_miller, mark.lam, msaboff, oliver, sukolsak, ysuzuki | ||||||
Priority: | P2 | ||||||||
Version: | WebKit Nightly Build | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Attachments: |
|
Description
Saam Barati
2016-03-01 17:22:10 PST
Created attachment 272677 [details]
perf results
looks neutral
Created attachment 272678 [details]
patch
landed in: http://trac.webkit.org/changeset/197467 Comment on attachment 272678 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=272678&action=review > Source/JavaScriptCore/runtime/ClassInfo.h:113 > + typedef bool (*SetPrototypeOfFunctionPtr)(JSObject*, ExecState*, JSValue); > + SetPrototypeOfFunctionPtr setPrototypeOf; When referring to the object constructor, the spec says "setPrototypeOf" because the object constructor sets the prototype *of* another object. But when we refer to an object setting its own prototype, that should be called "setPrototype". This applies to lots of places in this patch. > Source/JavaScriptCore/runtime/JSObject.h:122 > + ALWAYS_INLINE bool setPrototypeOfInline(VM& vm, ExecState* exec, JSValue prototype) Why do we have this inline variant? I think you should remove it. (In reply to comment #4) > Comment on attachment 272678 [details] > patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=272678&action=review > > > Source/JavaScriptCore/runtime/ClassInfo.h:113 > > + typedef bool (*SetPrototypeOfFunctionPtr)(JSObject*, ExecState*, JSValue); > > + SetPrototypeOfFunctionPtr setPrototypeOf; > > When referring to the object constructor, the spec says "setPrototypeOf" > because the object constructor sets the prototype *of* another object. > > But when we refer to an object setting its own prototype, that should be > called "setPrototype". This applies to lots of places in this patch. > > > Source/JavaScriptCore/runtime/JSObject.h:122 > > + ALWAYS_INLINE bool setPrototypeOfInline(VM& vm, ExecState* exec, JSValue prototype) > > Why do we have this inline variant? I think you should remove it. Follow up to your comment in: http://trac.webkit.org/changeset/197484 |