Index: src/code-stubs.cc |
diff --git a/src/code-stubs.cc b/src/code-stubs.cc |
index db57280f41857a84864bf8458a80323e47847d08..517d4d076f3bb8b9d696bf680b71a99a34b2ba0e 100644 |
--- a/src/code-stubs.cc |
+++ b/src/code-stubs.cc |
@@ -244,23 +244,61 @@ const char* InstanceofStub::GetName() { |
} |
-void KeyedLoadFastElementStub::Generate(MacroAssembler* masm) { |
- KeyedLoadStubCompiler::GenerateLoadFastElement(masm); |
-} |
- |
- |
-void KeyedStoreFastElementStub::Generate(MacroAssembler* masm) { |
- KeyedStoreStubCompiler::GenerateStoreFastElement(masm, is_js_array_); |
-} |
- |
- |
-void KeyedLoadExternalArrayStub::Generate(MacroAssembler* masm) { |
- KeyedLoadStubCompiler::GenerateLoadExternalArray(masm, elements_kind_); |
+void KeyedLoadElementStub::Generate(MacroAssembler* masm) { |
+ switch (elements_kind_) { |
+ case JSObject::FAST_ELEMENTS: |
+ KeyedLoadStubCompiler::GenerateLoadFastElement(masm); |
+ break; |
+ case JSObject::FAST_DOUBLE_ELEMENTS: |
+ UNIMPLEMENTED(); |
+ break; |
+ case JSObject::EXTERNAL_BYTE_ELEMENTS: |
+ case JSObject::EXTERNAL_UNSIGNED_BYTE_ELEMENTS: |
+ case JSObject::EXTERNAL_SHORT_ELEMENTS: |
+ case JSObject::EXTERNAL_UNSIGNED_SHORT_ELEMENTS: |
+ case JSObject::EXTERNAL_INT_ELEMENTS: |
+ case JSObject::EXTERNAL_UNSIGNED_INT_ELEMENTS: |
+ case JSObject::EXTERNAL_FLOAT_ELEMENTS: |
+ case JSObject::EXTERNAL_DOUBLE_ELEMENTS: |
+ case JSObject::EXTERNAL_PIXEL_ELEMENTS: |
+ KeyedLoadStubCompiler::GenerateLoadExternalArray(masm, elements_kind_); |
+ break; |
+ case JSObject::DICTIONARY_ELEMENTS: |
+ KeyedLoadStubCompiler::GenerateLoadDictionaryElement(masm); |
+ break; |
+ case JSObject::NON_STRICT_ARGUMENTS_ELEMENTS: |
+ UNREACHABLE(); |
+ break; |
+ } |
} |
-void KeyedStoreExternalArrayStub::Generate(MacroAssembler* masm) { |
- KeyedStoreStubCompiler::GenerateStoreExternalArray(masm, elements_kind_); |
+void KeyedStoreElementStub::Generate(MacroAssembler* masm) { |
+ switch (elements_kind_) { |
+ case JSObject::FAST_ELEMENTS: |
+ KeyedStoreStubCompiler::GenerateStoreFastElement(masm, is_js_array_); |
+ break; |
+ case JSObject::FAST_DOUBLE_ELEMENTS: |
+ UNIMPLEMENTED(); |
+ break; |
+ case JSObject::EXTERNAL_BYTE_ELEMENTS: |
+ case JSObject::EXTERNAL_UNSIGNED_BYTE_ELEMENTS: |
+ case JSObject::EXTERNAL_SHORT_ELEMENTS: |
+ case JSObject::EXTERNAL_UNSIGNED_SHORT_ELEMENTS: |
+ case JSObject::EXTERNAL_INT_ELEMENTS: |
+ case JSObject::EXTERNAL_UNSIGNED_INT_ELEMENTS: |
+ case JSObject::EXTERNAL_FLOAT_ELEMENTS: |
+ case JSObject::EXTERNAL_DOUBLE_ELEMENTS: |
+ case JSObject::EXTERNAL_PIXEL_ELEMENTS: |
+ KeyedStoreStubCompiler::GenerateStoreExternalArray(masm, elements_kind_); |
+ break; |
+ case JSObject::DICTIONARY_ELEMENTS: |
+ KeyedStoreStubCompiler::GenerateStoreDictionaryElement(masm); |
+ break; |
+ case JSObject::NON_STRICT_ARGUMENTS_ELEMENTS: |
+ UNREACHABLE(); |
+ break; |
+ } |
} |