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

Unified Diff: src/accessors.cc

Issue 1977983002: Revert "Fix TypedArray Property optimizations", add regression test and eliminate dead code (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address review comments Created 4 years, 7 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 | « no previous file | src/bootstrapper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/accessors.cc
diff --git a/src/accessors.cc b/src/accessors.cc
index 030dc0e58cfaa723a063ecf08f81a3f484c187b2..c5ca7d1341999fc5ed8274fe7e2b5f081cd4d444 100644
--- a/src/accessors.cc
+++ b/src/accessors.cc
@@ -93,36 +93,6 @@ bool Accessors::IsJSArrayBufferViewFieldAccessor(Handle<Map> map,
Isolate* isolate = name->GetIsolate();
switch (map->instance_type()) {
- case JS_TYPED_ARRAY_TYPE: {
- if (!CheckForName(name, isolate->factory()->length_string(),
- JSTypedArray::kLengthOffset, object_offset) &&
- !CheckForName(name, isolate->factory()->byte_length_string(),
- JSTypedArray::kByteLengthOffset, object_offset) &&
- !CheckForName(name, isolate->factory()->byte_offset_string(),
- JSTypedArray::kByteOffsetOffset, object_offset)) {
- return false;
- }
-
- if (map->is_dictionary_map()) return false;
-
- // Check if the property is overridden on the instance.
- DescriptorArray* descriptors = map->instance_descriptors();
- int descriptor = descriptors->SearchWithCache(isolate, *name, *map);
- if (descriptor != DescriptorArray::kNotFound) return false;
-
- Handle<Object> proto = Handle<Object>(map->prototype(), isolate);
- if (!proto->IsJSReceiver()) return false;
-
- // Check if the property is defined in the prototype chain.
- LookupIterator it(proto, name);
- if (!it.IsFound()) return false;
-
- Handle<Object> typed_array_proto = isolate->typed_array_prototype();
-
- // Property is not configurable. It is enough to verify that
- // the holder is the same.
- return *it.GetHolder<Object>() == *typed_array_proto;
- }
case JS_DATA_VIEW_TYPE:
return CheckForName(name, isolate->factory()->byte_length_string(),
JSDataView::kByteLengthOffset, object_offset) ||
« no previous file with comments | « no previous file | src/bootstrapper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698