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

Side by Side Diff: src/objects.cc

Issue 672323003: Widen definition of %HasComplexElements() to include non-enumerability (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 2 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <sstream> 5 #include <sstream>
6 6
7 #include "src/v8.h" 7 #include "src/v8.h"
8 8
9 #include "src/accessors.h" 9 #include "src/accessors.h"
10 #include "src/allocation-site-scopes.h" 10 #include "src/allocation-site-scopes.h"
(...skipping 15256 matching lines...) Expand 10 before | Expand all | Expand 10 after
15267 template <typename Derived, typename Shape, typename Key> 15267 template <typename Derived, typename Shape, typename Key>
15268 bool Dictionary<Derived, Shape, Key>::HasComplexElements() { 15268 bool Dictionary<Derived, Shape, Key>::HasComplexElements() {
15269 int capacity = DerivedHashTable::Capacity(); 15269 int capacity = DerivedHashTable::Capacity();
15270 for (int i = 0; i < capacity; i++) { 15270 for (int i = 0; i < capacity; i++) {
15271 Object* k = DerivedHashTable::KeyAt(i); 15271 Object* k = DerivedHashTable::KeyAt(i);
15272 if (DerivedHashTable::IsKey(k) && !FilterKey(k, NONE)) { 15272 if (DerivedHashTable::IsKey(k) && !FilterKey(k, NONE)) {
15273 PropertyDetails details = DetailsAt(i); 15273 PropertyDetails details = DetailsAt(i);
15274 if (details.IsDeleted()) continue; 15274 if (details.IsDeleted()) continue;
15275 if (details.type() == CALLBACKS) return true; 15275 if (details.type() == CALLBACKS) return true;
15276 PropertyAttributes attr = details.attributes(); 15276 PropertyAttributes attr = details.attributes();
15277 if (attr & (READ_ONLY | DONT_DELETE)) return true; 15277 if (attr & (READ_ONLY | DONT_DELETE | DONT_ENUM)) return true;
15278 } 15278 }
15279 } 15279 }
15280 return false; 15280 return false;
15281 } 15281 }
15282 15282
15283 15283
15284 template <typename Derived, typename Shape, typename Key> 15284 template <typename Derived, typename Shape, typename Key>
15285 void Dictionary<Derived, Shape, Key>::CopyKeysTo( 15285 void Dictionary<Derived, Shape, Key>::CopyKeysTo(
15286 FixedArray* storage, PropertyAttributes filter, 15286 FixedArray* storage, PropertyAttributes filter,
15287 typename Dictionary<Derived, Shape, Key>::SortMode sort_mode) { 15287 typename Dictionary<Derived, Shape, Key>::SortMode sort_mode) {
(...skipping 1191 matching lines...) Expand 10 before | Expand all | Expand 10 after
16479 Handle<DependentCode> codes = 16479 Handle<DependentCode> codes =
16480 DependentCode::Insert(handle(cell->dependent_code(), info->isolate()), 16480 DependentCode::Insert(handle(cell->dependent_code(), info->isolate()),
16481 DependentCode::kPropertyCellChangedGroup, 16481 DependentCode::kPropertyCellChangedGroup,
16482 info->object_wrapper()); 16482 info->object_wrapper());
16483 if (*codes != cell->dependent_code()) cell->set_dependent_code(*codes); 16483 if (*codes != cell->dependent_code()) cell->set_dependent_code(*codes);
16484 info->dependencies(DependentCode::kPropertyCellChangedGroup)->Add( 16484 info->dependencies(DependentCode::kPropertyCellChangedGroup)->Add(
16485 cell, info->zone()); 16485 cell, info->zone());
16486 } 16486 }
16487 16487
16488 } } // namespace v8::internal 16488 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698