| Index: src/ia32/ic-ia32.cc
|
| diff --git a/src/ia32/ic-ia32.cc b/src/ia32/ic-ia32.cc
|
| index 62e845eb27eee964527d7aac84985fa3c6f79e0a..2128605cb56cbf603527c0fba0ea09e808c3b459 100644
|
| --- a/src/ia32/ic-ia32.cc
|
| +++ b/src/ia32/ic-ia32.cc
|
| @@ -343,11 +343,12 @@ static Operand GenerateUnmappedArgumentsLookup(MacroAssembler* masm,
|
| }
|
|
|
|
|
| -void KeyedLoadIC::GenerateGeneric(MacroAssembler* masm) {
|
| +void KeyedLoadIC::GenerateGeneric(MacroAssembler* masm, ExtraICState extra_state) {
|
| // The return address is on the stack.
|
| Label slow, check_name, index_smi, index_name, property_array_property;
|
| Label probe_dictionary, check_number_dictionary;
|
|
|
| + PropertyLookupMode lookup_mode = GetPropertyLookupMode(extra_state);
|
| Register receiver = ReceiverRegister();
|
| Register key = NameRegister();
|
| DCHECK(receiver.is(edx));
|
| @@ -399,7 +400,11 @@ void KeyedLoadIC::GenerateGeneric(MacroAssembler* masm) {
|
| __ bind(&slow);
|
| // Slow case: jump to runtime.
|
| __ IncrementCounter(counters->keyed_load_generic_slow(), 1);
|
| - GenerateRuntimeGetProperty(masm);
|
| + if (lookup_mode == OWN_PROPERTY_LOOKUP) {
|
| + GenerateRuntimeGetOwnProperty(masm);
|
| + } else {
|
| + GenerateRuntimeGetProperty(masm);
|
| + }
|
|
|
| __ bind(&check_name);
|
| GenerateKeyNameCheck(masm, key, eax, ebx, &index_name, &slow);
|
| @@ -884,18 +889,20 @@ void KeyedStoreIC::GenerateGeneric(MacroAssembler* masm,
|
| }
|
|
|
|
|
| -void LoadIC::GenerateMegamorphic(MacroAssembler* masm) {
|
| - // The return address is on the stack.
|
| - Register receiver = ReceiverRegister();
|
| - Register name = NameRegister();
|
| - DCHECK(receiver.is(edx));
|
| - DCHECK(name.is(ecx));
|
| +void LoadIC::GenerateMegamorphic(MacroAssembler* masm, ExtraICState extra_state) {
|
| + if (GetPropertyLookupMode(extra_state) == NORMAL_LOOKUP) {
|
| + // The return address is on the stack.
|
| + Register receiver = ReceiverRegister();
|
| + Register name = NameRegister();
|
| + DCHECK(receiver.is(edx));
|
| + DCHECK(name.is(ecx));
|
|
|
| - // Probe the stub cache.
|
| - Code::Flags flags = Code::RemoveTypeAndHolderFromFlags(
|
| - Code::ComputeHandlerFlags(Code::LOAD_IC));
|
| - masm->isolate()->stub_cache()->GenerateProbe(
|
| - masm, flags, receiver, name, ebx, eax);
|
| + // Probe the stub cache.
|
| + Code::Flags flags = Code::RemoveTypeAndHolderFromFlags(
|
| + Code::ComputeHandlerFlags(Code::LOAD_IC));
|
| + masm->isolate()->stub_cache()->GenerateProbe(
|
| + masm, flags, receiver, name, ebx, eax);
|
| + }
|
|
|
| // Cache miss: Jump to runtime.
|
| GenerateMiss(masm);
|
| @@ -955,6 +962,15 @@ void LoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) {
|
| }
|
|
|
|
|
| +void LoadIC::GenerateRuntimeGetOwnProperty(MacroAssembler* masm) {
|
| + // Return address is on the stack.
|
| + LoadIC_PushArgs(masm);
|
| +
|
| + // Perform tail call to the entry.
|
| + __ TailCallRuntime(Runtime::kLoadOwnProperty, 2, 1);
|
| +}
|
| +
|
| +
|
| void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) {
|
| // Return address is on the stack.
|
| __ IncrementCounter(masm->isolate()->counters()->keyed_load_miss(), 1);
|
| @@ -1004,6 +1020,15 @@ void KeyedLoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) {
|
| }
|
|
|
|
|
| +void KeyedLoadIC::GenerateRuntimeGetOwnProperty(MacroAssembler* masm) {
|
| + // Return address is on the stack.
|
| + LoadIC_PushArgs(masm);
|
| +
|
| + // Perform tail call to the entry.
|
| + __ TailCallRuntime(Runtime::kKeyedGetOwnProperty, 2, 1);
|
| +}
|
| +
|
| +
|
| void StoreIC::GenerateMegamorphic(MacroAssembler* masm) {
|
| // Return address is on the stack.
|
| Code::Flags flags = Code::RemoveTypeAndHolderFromFlags(
|
|
|