Index: src/arm/stub-cache-arm.cc |
diff --git a/src/arm/stub-cache-arm.cc b/src/arm/stub-cache-arm.cc |
index 7fd5fa71f385c8247ded2038ccef31e6748c768b..7b652d30f58fbde0da9b53b37f7822031923f184 100644 |
--- a/src/arm/stub-cache-arm.cc |
+++ b/src/arm/stub-cache-arm.cc |
@@ -3121,15 +3121,8 @@ MaybeObject* KeyedLoadStubCompiler::CompileLoadElement(Map* receiver_map) { |
// -- r0 : key |
// -- r1 : receiver |
// ----------------------------------- |
- MaybeObject* maybe_stub; |
- if (receiver_map->has_fast_elements()) { |
- maybe_stub = KeyedLoadFastElementStub().TryGetCode(); |
- } else { |
- ASSERT(receiver_map->has_external_array_elements()); |
- JSObject::ElementsKind elements_kind = receiver_map->elements_kind(); |
- maybe_stub = KeyedLoadExternalArrayStub(elements_kind).TryGetCode(); |
- } |
Code* stub; |
+ MaybeObject* maybe_stub = ComputeSharedKeyedLoadElementStub(receiver_map); |
if (!maybe_stub->To(&stub)) return maybe_stub; |
__ DispatchMap(r1, |
r2, |
@@ -3213,8 +3206,7 @@ MaybeObject* KeyedStoreStubCompiler::CompileStoreField(JSObject* object, |
} |
-MaybeObject* KeyedStoreStubCompiler::CompileStoreElement( |
- Map* receiver_map) { |
+MaybeObject* KeyedStoreStubCompiler::CompileStoreElement(Map* receiver_map) { |
// ----------- S t a t e ------------- |
// -- r0 : value |
// -- r1 : key |
@@ -3222,16 +3214,8 @@ MaybeObject* KeyedStoreStubCompiler::CompileStoreElement( |
// -- lr : return address |
// -- r3 : scratch |
// ----------------------------------- |
- MaybeObject* maybe_stub; |
- if (receiver_map->has_fast_elements()) { |
- bool is_js_array = receiver_map->instance_type() == JS_ARRAY_TYPE; |
- maybe_stub = KeyedStoreFastElementStub(is_js_array).TryGetCode(); |
- } else { |
- ASSERT(receiver_map->has_external_array_elements()); |
- JSObject::ElementsKind elements_kind = receiver_map->elements_kind(); |
- maybe_stub = KeyedStoreExternalArrayStub(elements_kind).TryGetCode(); |
- } |
Code* stub; |
+ MaybeObject* maybe_stub = ComputeSharedKeyedStoreElementStub(receiver_map); |
if (!maybe_stub->To(&stub)) return maybe_stub; |
__ DispatchMap(r2, |
r3, |