Index: src/arm64/ic-arm64.cc |
diff --git a/src/arm64/ic-arm64.cc b/src/arm64/ic-arm64.cc |
index 5a2dde53ff64fc969e8ba549cfa655ee6d37d992..9244b4adf7d83065030c85edc62a978890268c78 100644 |
--- a/src/arm64/ic-arm64.cc |
+++ b/src/arm64/ic-arm64.cc |
@@ -34,51 +34,6 @@ static void GenerateGlobalInstanceTypeCheck(MacroAssembler* masm, |
} |
-// Generated code falls through if the receiver is a regular non-global |
-// JS object with slow properties and no interceptors. |
-// |
-// "receiver" holds the receiver on entry and is unchanged. |
-// "elements" holds the property dictionary on fall through. |
-static void GenerateNameDictionaryReceiverCheck(MacroAssembler* masm, |
- Register receiver, |
- Register elements, |
- Register scratch0, |
- Register scratch1, |
- Label* miss) { |
- ASSERT(!AreAliased(receiver, elements, scratch0, scratch1)); |
- |
- // Check that the receiver isn't a smi. |
- __ JumpIfSmi(receiver, miss); |
- |
- // Check that the receiver is a valid JS object. |
- // Let t be the object instance type, we want: |
- // FIRST_SPEC_OBJECT_TYPE <= t <= LAST_SPEC_OBJECT_TYPE. |
- // Since LAST_SPEC_OBJECT_TYPE is the last possible instance type we only |
- // check the lower bound. |
- STATIC_ASSERT(LAST_TYPE == LAST_SPEC_OBJECT_TYPE); |
- |
- __ JumpIfObjectType(receiver, scratch0, scratch1, FIRST_SPEC_OBJECT_TYPE, |
- miss, lt); |
- |
- // scratch0 now contains the map of the receiver and scratch1 the object type. |
- Register map = scratch0; |
- Register type = scratch1; |
- |
- // Check if the receiver is a global JS object. |
- GenerateGlobalInstanceTypeCheck(masm, type, miss); |
- |
- // Check that the object does not require access checks. |
- __ Ldrb(scratch1, FieldMemOperand(map, Map::kBitFieldOffset)); |
- __ Tbnz(scratch1, Map::kIsAccessCheckNeeded, miss); |
- __ Tbnz(scratch1, Map::kHasNamedInterceptor, miss); |
- |
- // Check that the properties dictionary is valid. |
- __ Ldr(elements, FieldMemOperand(receiver, JSObject::kPropertiesOffset)); |
- __ Ldr(scratch1, FieldMemOperand(elements, HeapObject::kMapOffset)); |
- __ JumpIfNotRoot(scratch1, Heap::kHashTableMapRootIndex, miss); |
-} |
- |
- |
// Helper function used from LoadIC GenerateNormal. |
// |
// elements: Property dictionary. It is not clobbered if a jump to the miss |
@@ -424,28 +379,19 @@ void LoadIC::GenerateMegamorphic(MacroAssembler* masm) { |
void LoadIC::GenerateNormal(MacroAssembler* masm) { |
- // ----------- S t a t e ------------- |
- // -- x2 : name |
- // -- lr : return address |
- // -- x1 : receiver |
- // ----------------------------------- |
- ASSERT(x1.is(ReceiverRegister())); |
- ASSERT(x2.is(NameRegister())); |
- Label miss, slow; |
- |
- GenerateNameDictionaryReceiverCheck(masm, x1, x0, x3, x4, &miss); |
+ Register dictionary = x0; |
+ ASSERT(!dictionary.is(ReceiverRegister())); |
+ ASSERT(!dictionary.is(NameRegister())); |
+ Label slow; |
- // x0 now holds the property dictionary. |
- GenerateDictionaryLoad(masm, &slow, x0, x2, x0, x3, x4); |
+ __ Ldr(dictionary, |
+ FieldMemOperand(ReceiverRegister(), JSObject::kPropertiesOffset)); |
+ GenerateDictionaryLoad(masm, &slow, dictionary, NameRegister(), x0, x3, x4); |
__ Ret(); |
// Dictionary load failed, go slow (but don't miss). |
__ Bind(&slow); |
GenerateRuntimeGetProperty(masm); |
- |
- // Cache miss: Jump to runtime. |
- __ Bind(&miss); |
- GenerateMiss(masm); |
} |
@@ -1187,8 +1133,7 @@ void StoreIC::GenerateNormal(MacroAssembler* masm) { |
Register dictionary = x3; |
ASSERT(!AreAliased(value, receiver, name, x3, x4, x5)); |
- GenerateNameDictionaryReceiverCheck( |
- masm, receiver, dictionary, x4, x5, &miss); |
+ __ Ldr(dictionary, FieldMemOperand(receiver, JSObject::kPropertiesOffset)); |
GenerateDictionaryStore(masm, &miss, dictionary, name, value, x4, x5); |
Counters* counters = masm->isolate()->counters(); |