<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>67690</bug_id>
          
          <creation_ts>2011-09-06 18:28:20 -0700</creation_ts>
          <short_desc>Remove virtual functions from JSCell</short_desc>
          <delta_ts>2011-10-27 10:17:37 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>JavaScriptCore</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>67691</dependson>
    
    <dependson>67727</dependson>
    
    <dependson>67875</dependson>
    
    <dependson>67902</dependson>
    
    <dependson>67909</dependson>
    
    <dependson>67911</dependson>
    
    <dependson>68404</dependson>
    
    <dependson>68651</dependson>
    
    <dependson>68741</dependson>
    
    <dependson>68839</dependson>
    
    <dependson>68851</dependson>
    
    <dependson>68937</dependson>
    
    <dependson>69024</dependson>
    
    <dependson>69156</dependson>
    
    <dependson>69186</dependson>
    
    <dependson>69311</dependson>
    
    <dependson>69593</dependson>
    
    <dependson>69659</dependson>
    
    <dependson>69673</dependson>
    
    <dependson>69677</dependson>
    
    <dependson>69679</dependson>
    
    <dependson>69807</dependson>
    
    <dependson>69810</dependson>
    
    <dependson>69851</dependson>
    
    <dependson>69858</dependson>
    
    <dependson>69872</dependson>
    
    <dependson>69884</dependson>
    
    <dependson>70162</dependson>
    
    <dependson>70163</dependson>
    
    <dependson>70257</dependson>
    
    <dependson>70271</dependson>
    
    <dependson>70281</dependson>
    
    <dependson>70439</dependson>
    
    <dependson>70638</dependson>
    
    <dependson>70738</dependson>
    
    <dependson>70740</dependson>
    
    <dependson>70741</dependson>
    
    <dependson>70958</dependson>
          <blocked>69382</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Mark Hahnenberg">mhahnenberg</reporter>
          <assigned_to name="Mark Hahnenberg">mhahnenberg</assigned_to>
          
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>463043</commentid>
    <comment_count>0</comment_count>
    <who name="Mark Hahnenberg">mhahnenberg</who>
    <bug_when>2011-09-06 18:28:20 -0700</bug_when>
    <thetext>In order to maintain more control over exactly how JS objects are laid out, we need to remove the C++ virtual functions from JS object implementations due to the freedom that C++ compilers are given with how they lay out objects with vtable pointers.  We can also save a little bit of memory due to the lack of vtable pointer in each object.  The methods in JSCell that either need to be made non-virtual or removed are the following:

isGetterSetter
isAPIValueWrapper
isPropertyNameIterator
getCallData
getConstructData
getUInt32
toPrimitive
getPrimitive
toBoolean
toNumber
toString
toObject
visitChildren
put(ExecState*, const Identifier&amp;, JSValue, PutPropertySlot&amp;)
put(ExecState*, unsigned, JSValue)
deleteProperty(ExecState*, const Identifier&amp;)
deleteProperty(ExecState*, unsigned)
toThisObject
getJSNumber
getOwnPropertySlot(ExecState*, const Identifier&amp;, PropertySlot&amp;)
getOwnPropertySlot(ExecState*, unsigned, PropertySlot&amp;)

Destructors will be taken care of by Oliver :-)  There will be a patch for each function, roughly.  This will serve as the tracking bug for this task.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>467484</commentid>
    <comment_count>1</comment_count>
    <who name="Mark Hahnenberg">mhahnenberg</who>
    <bug_when>2011-09-14 17:15:53 -0700</bug_when>
    <thetext>Sam helped me out a little bit and de-virtualized isGetterSetter, isAPIValueWrapper, and killed isPropertyNameIterator :-)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>491676</commentid>
    <comment_count>2</comment_count>
    <who name="Mark Hahnenberg">mhahnenberg</who>
    <bug_when>2011-10-27 10:17:37 -0700</bug_when>
    <thetext>Except the virtual destructor, which will remain for a while longer until we get around to replacing virtual destructors with finalizers, there are no longer any virtual functions in JSCell.  Closing this bug.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>