<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@gmail.com" title="Caio Lima <ticaiolima@gmail.com>"> <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">> A PropertyName is identical to a UniquedStringImpl* so you can just pass
> that.
> A PropertyName is a struct with a single UniquedStringImpl* field.
>
> I believe get_by_id has an index in it's instruction corresponding to its
> UniquedStringImpl*. You may need to write some code that loads this off
> the CodeBlock based on some index. I'm not sure if we have code like that
> already
> 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& CodeBlock::identifier(int index) const
{
size_t unlinkedIdentifiers = m_unlinkedCode->numberOfIdentifiers();
if (static_cast<unsigned>(index) < unlinkedIdentifiers)
return m_unlinkedCode->identifier(index);
}
The m_unlikedCode stores the identifiers into a Vector<Identifier> 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>