<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - LLInt should support other types of prototype GetById caching."
   href="https://bugs.webkit.org/show_bug.cgi?id=158083#c45">Comment # 45</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - LLInt should support other types of prototype GetById caching."
   href="https://bugs.webkit.org/show_bug.cgi?id=158083">bug 158083</a>
              from <span class="vcard"><a class="email" href="mailto:ticaiolima&#64;gmail.com" title="Caio Lima &lt;ticaiolima&#64;gmail.com&gt;"> <span class="fn">Caio Lima</span></a>
</span></b>
        <pre>(In reply to <a href="show_bug.cgi?id=158083#c44">comment #44</a>)
<span class="quote">&gt; A PropertyName is identical to a UniquedStringImpl* so you can just pass
&gt; that.
&gt; A PropertyName is a struct with a single UniquedStringImpl* field.
&gt; 
&gt; I believe get_by_id has an index in it's instruction corresponding to its
&gt; UniquedStringImpl*. You may need to write some code that loads this off
&gt; the CodeBlock based on some index. I'm not sure if we have code like that
&gt; already
&gt; in the LLInt but it should be easy to write. </span >

Actually, I don't think so. Checking the CodeBlock code I found the method used to get the identifier based in the identifier index.

const Identifier&amp; CodeBlock::identifier(int index) const
{
    size_t unlinkedIdentifiers = m_unlinkedCode-&gt;numberOfIdentifiers();
    if (static_cast&lt;unsigned&gt;(index) &lt; unlinkedIdentifiers)
        return m_unlinkedCode-&gt;identifier(index);

}

The m_unlikedCode stores the identifiers into a Vector&lt;Identifier&gt; m_identifiers. The problem is to revive the identifier contained in the Vector buffer. My current implementation is like this

macro loadIdentifier(index, dest)
    loadp CodeBlock[cfr], t2
    loadp CodeBlock::m_unlinkedCode[t2], t1 #t1 is pointing to UnlinkedCodeBlock
    addp UnlinkedCodeBlock::m_identifiers, t1 #Offset to point to m_identifiers
    loadis index, t2
    mulp sizeof Identifier, t2 
    addp t2, t1 # Offset to point to m_identifiers[index]
    addp Identifier::m_string, t1 # m_identifiers[index].m_string
    loadp t1, dest
end 

Any tip?</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>