Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(632)

Unified Diff: src/ic.cc

Issue 6295013: Revert r6376 and r6373 which changes external array support. The ARM... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 9 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/ic.h ('k') | src/mips/ic-mips.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ic.cc
===================================================================
--- src/ic.cc (revision 6378)
+++ src/ic.cc (working copy)
@@ -367,6 +367,55 @@
}
+Code* KeyedLoadIC::external_array_stub(JSObject::ElementsKind elements_kind) {
+ switch (elements_kind) {
+ case JSObject::EXTERNAL_BYTE_ELEMENTS:
+ return Builtins::builtin(Builtins::KeyedLoadIC_ExternalByteArray);
+ case JSObject::EXTERNAL_UNSIGNED_BYTE_ELEMENTS:
+ return Builtins::builtin(Builtins::KeyedLoadIC_ExternalUnsignedByteArray);
+ case JSObject::EXTERNAL_SHORT_ELEMENTS:
+ return Builtins::builtin(Builtins::KeyedLoadIC_ExternalShortArray);
+ case JSObject::EXTERNAL_UNSIGNED_SHORT_ELEMENTS:
+ return Builtins::builtin(
+ Builtins::KeyedLoadIC_ExternalUnsignedShortArray);
+ case JSObject::EXTERNAL_INT_ELEMENTS:
+ return Builtins::builtin(Builtins::KeyedLoadIC_ExternalIntArray);
+ case JSObject::EXTERNAL_UNSIGNED_INT_ELEMENTS:
+ return Builtins::builtin(Builtins::KeyedLoadIC_ExternalUnsignedIntArray);
+ case JSObject::EXTERNAL_FLOAT_ELEMENTS:
+ return Builtins::builtin(Builtins::KeyedLoadIC_ExternalFloatArray);
+ default:
+ UNREACHABLE();
+ return NULL;
+ }
+}
+
+
+Code* KeyedStoreIC::external_array_stub(JSObject::ElementsKind elements_kind) {
+ switch (elements_kind) {
+ case JSObject::EXTERNAL_BYTE_ELEMENTS:
+ return Builtins::builtin(Builtins::KeyedStoreIC_ExternalByteArray);
+ case JSObject::EXTERNAL_UNSIGNED_BYTE_ELEMENTS:
+ return Builtins::builtin(
+ Builtins::KeyedStoreIC_ExternalUnsignedByteArray);
+ case JSObject::EXTERNAL_SHORT_ELEMENTS:
+ return Builtins::builtin(Builtins::KeyedStoreIC_ExternalShortArray);
+ case JSObject::EXTERNAL_UNSIGNED_SHORT_ELEMENTS:
+ return Builtins::builtin(
+ Builtins::KeyedStoreIC_ExternalUnsignedShortArray);
+ case JSObject::EXTERNAL_INT_ELEMENTS:
+ return Builtins::builtin(Builtins::KeyedStoreIC_ExternalIntArray);
+ case JSObject::EXTERNAL_UNSIGNED_INT_ELEMENTS:
+ return Builtins::builtin(Builtins::KeyedStoreIC_ExternalUnsignedIntArray);
+ case JSObject::EXTERNAL_FLOAT_ELEMENTS:
+ return Builtins::builtin(Builtins::KeyedStoreIC_ExternalFloatArray);
+ default:
+ UNREACHABLE();
+ return NULL;
+ }
+}
+
+
static bool HasInterceptorGetter(JSObject* object) {
return !object->GetNamedInterceptor()->getter()->IsUndefined();
}
@@ -1194,10 +1243,7 @@
} else if (object->IsJSObject()) {
Handle<JSObject> receiver = Handle<JSObject>::cast(object);
if (receiver->HasExternalArrayElements()) {
- MaybeObject* probe =
- StubCache::ComputeKeyedLoadOrStoreExternalArray(*receiver, false);
- stub =
- probe->IsFailure() ? NULL : Code::cast(probe->ToObjectUnchecked());
+ stub = external_array_stub(receiver->GetElementsKind());
} else if (receiver->HasIndexedInterceptor()) {
stub = indexed_interceptor_stub();
} else if (state == UNINITIALIZED &&
@@ -1590,10 +1636,7 @@
if (object->IsJSObject()) {
Handle<JSObject> receiver = Handle<JSObject>::cast(object);
if (receiver->HasExternalArrayElements()) {
- MaybeObject* probe =
- StubCache::ComputeKeyedLoadOrStoreExternalArray(*receiver, true);
- stub =
- probe->IsFailure() ? NULL : Code::cast(probe->ToObjectUnchecked());
+ stub = external_array_stub(receiver->GetElementsKind());
} else if (state == UNINITIALIZED &&
key->IsSmi() &&
receiver->map()->has_fast_elements()) {
« no previous file with comments | « src/ic.h ('k') | src/mips/ic-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698