MIPS: Generate KeyedLoadDictionaryElementStub with Hydrogen

Port r17804 (15aa3804)

BUG=
R=plind44@gmail.com

Review URL: https://codereview.chromium.org/74363002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17806 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
palfia@homejinni.com 2013-11-15 21:12:51 +00:00
parent ed034b39e5
commit 3ba75a2dc3
2 changed files with 13 additions and 3 deletions

View File

@ -114,6 +114,17 @@ void KeyedLoadFastElementStub::InitializeInterfaceDescriptor(
}
void KeyedLoadDictionaryElementStub::InitializeInterfaceDescriptor(
Isolate* isolate,
CodeStubInterfaceDescriptor* descriptor) {
static Register registers[] = {a1, a0 };
descriptor->register_param_count_ = 2;
descriptor->register_params_ = registers;
descriptor->deoptimization_handler_ =
FUNCTION_ADDR(KeyedLoadIC_MissFromStubFailure);
}
void LoadFieldStub::InitializeInterfaceDescriptor(
Isolate* isolate,
CodeStubInterfaceDescriptor* descriptor) {

View File

@ -510,8 +510,7 @@ void MacroAssembler::LoadFromNumberDictionary(Label* miss,
Subu(reg1, reg1, Operand(1));
// Generate an unrolled loop that performs a few probes before giving up.
static const int kProbes = 4;
for (int i = 0; i < kProbes; i++) {
for (int i = 0; i < kNumberDictionaryProbes; i++) {
// Use reg2 for index calculations and keep the hash intact in reg0.
mov(reg2, reg0);
// Compute the masked index: (hash + i + i * i) & mask.
@ -530,7 +529,7 @@ void MacroAssembler::LoadFromNumberDictionary(Label* miss,
addu(reg2, elements, at);
lw(at, FieldMemOperand(reg2, SeededNumberDictionary::kElementsStartOffset));
if (i != kProbes - 1) {
if (i != kNumberDictionaryProbes - 1) {
Branch(&done, eq, key, Operand(at));
} else {
Branch(miss, ne, key, Operand(at));