Bug 20862

Summary: Inline code generation of eq_null/neq_null for CTI.
Product: WebKit Reporter: Gavin Barraclough <barraclough>
Component: JavaScriptCoreAssignee: Gavin Barraclough <barraclough>
Status: RESOLVED FIXED    
Severity: Normal    
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Mac   
OS: OS X 10.5   
Attachments:
Description Flags
The patch ggaren: review+

Description Gavin Barraclough 2008-09-15 15:29:31 PDT
Inline code generation of eq_null/neq_null for CTI.  Uses vptr checking for StringObjectsThatAreMasqueradingAsBeingUndefined.  In the long run, the masquerading may be handled differently (through the StructureIDs - see bug #20823).

>1% on v8-tests.
Comment 1 Gavin Barraclough 2008-09-15 15:31:28 PDT
Created attachment 23448 [details]
The patch
Comment 2 Geoffrey Garen 2008-09-15 15:40:34 PDT
Comment on attachment 23448 [details]
The patch

r=me, but i give a stern parental was of the index finger at this vptr abuse -- we need to get off of it!

Also, please add a comment in JSObject.h by the declaration of JSObject::masqueradesAsUndefined that basically says, "You can't usefully override this virtual function without hand-coding some assembly in CTI.cpp"
Comment 3 Geoffrey Garen 2008-09-15 15:41:03 PDT
*wag

I said wag!
Comment 4 Gavin Barraclough 2008-09-15 16:33:52 PDT
Sending        JavaScriptCore/ChangeLog
Sending        JavaScriptCore/VM/CTI.cpp
Sending        JavaScriptCore/VM/CTI.h
Sending        JavaScriptCore/VM/Machine.cpp
Sending        JavaScriptCore/VM/Machine.h
Sending        JavaScriptCore/kjs/JSCell.h
Sending        JavaScriptCore/kjs/JSWrapperObject.h
Sending        JavaScriptCore/kjs/StringObject.h
Sending        JavaScriptCore/kjs/StringObjectThatMasqueradesAsUndefined.h
Transmitting file data .........
Committed revision 36462.