+2009-05-18 Maciej Stachowiak <mjs@apple.com>
+
+ Reviewed by Geoff Garen.
+
+ - Improve code generation for access to prototype properties
+
+ ~0.4% speedup on SunSpider.
+
+ Based on a suggestion from Geoff Garen.
+
+ * jit/JIT.h:
+ * jit/JITPropertyAccess.cpp:
+ (JSC::JIT::compileGetDirectOffset):
+ (JSC::JIT::privateCompileGetByIdProto):
+ (JSC::JIT::privateCompileGetByIdProtoList):
+ (JSC::JIT::privateCompileGetByIdChainList):
+ (JSC::JIT::privateCompileGetByIdChain):
+
2009-05-18 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
Reviewed by Gavin Barraclough.
void compileOpStrictEq(Instruction* instruction, CompileOpStrictEqType type);
void compileGetDirectOffset(RegisterID base, RegisterID result, Structure* structure, size_t cachedOffset);
- void compileGetDirectOffset(JSObject* base, RegisterID temp, RegisterID result, size_t cachedOffset);
+ void compileGetDirectOffset(JSObject* base, RegisterID result, size_t cachedOffset);
void compilePutDirectOffset(RegisterID base, RegisterID value, Structure* structure, size_t cachedOffset);
// Arithmetic Ops
loadPtr(Address(base, offset), result);
}
-void JIT::compileGetDirectOffset(JSObject* base, RegisterID temp, RegisterID result, size_t cachedOffset)
+void JIT::compileGetDirectOffset(JSObject* base, RegisterID result, size_t cachedOffset)
{
if (base->isUsingInlineStorage())
loadPtr(static_cast<void*>(&base->m_inlineStorage[cachedOffset]), result);
- else {
- PropertyStorage* protoPropertyStorage = &base->m_externalStorage;
- loadPtr(static_cast<void*>(protoPropertyStorage), temp);
- loadPtr(Address(temp, cachedOffset * sizeof(JSValue)), result);
- }
+ else
+ loadPtr(static_cast<void*>(&base->m_externalStorage[cachedOffset]), result);
}
static JSObject* resizePropertyStorage(JSObject* baseObject, int32_t oldSize, int32_t newSize)
#endif
// Checks out okay! - getDirectOffset
- compileGetDirectOffset(protoObject, regT1, regT0, cachedOffset);
+ compileGetDirectOffset(protoObject, regT0, cachedOffset);
Jump success = jump();
#endif
// Checks out okay! - getDirectOffset
- compileGetDirectOffset(protoObject, regT1, regT0, cachedOffset);
+ compileGetDirectOffset(protoObject, regT0, cachedOffset);
Jump success = jump();
}
ASSERT(protoObject);
- compileGetDirectOffset(protoObject, regT1, regT0, cachedOffset);
+ compileGetDirectOffset(protoObject, regT0, cachedOffset);
Jump success = jump();
void* code = m_assembler.executableCopy(m_codeBlock->executablePool());
}
ASSERT(protoObject);
- compileGetDirectOffset(protoObject, regT1, regT0, cachedOffset);
+ compileGetDirectOffset(protoObject, regT0, cachedOffset);
Jump success = jump();
void* code = m_assembler.executableCopy(m_codeBlock->executablePool());