Commit 5247cb08 authored by Kevin Modzelewski's avatar Kevin Modzelewski

Trying an optimization

I think I don't quite understand the existing optimization so just
turn my new one off for now.
parent eb3a0fe4
......@@ -389,8 +389,14 @@ RewriterVar* JitFragmentWriter::emitGetAttr(RewriterVar* obj, BoxedString* s, AS
RewriterVar* JitFragmentWriter::emitGetBlockLocal(InternedString s, int vreg) {
auto it = local_syms.find(s);
if (it == local_syms.end())
return emitGetLocal(s, vreg);
if (it == local_syms.end()) {
auto r = emitGetLocal(s, vreg);
// TODO: clear out the vreg?
// assert(r->reftype == RefType::OWNED);
// emitSetLocal(s, vreg, false, imm(nullptr));
// emitSetBlockLocal(s, r);
return r;
}
return it->second;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment