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

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: Rename test 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
« no previous file with comments | « src/objects.h ('k') | test/mjsunit/regress/regress-shift-enumerable.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 15277 matching lines...) Expand 10 before | Expand all | Expand 10 after
15288 template <typename Derived, typename Shape, typename Key> 15288 template <typename Derived, typename Shape, typename Key>
15289 bool Dictionary<Derived, Shape, Key>::HasComplexElements() { 15289 bool Dictionary<Derived, Shape, Key>::HasComplexElements() {
15290 int capacity = DerivedHashTable::Capacity(); 15290 int capacity = DerivedHashTable::Capacity();
15291 for (int i = 0; i < capacity; i++) { 15291 for (int i = 0; i < capacity; i++) {
15292 Object* k = DerivedHashTable::KeyAt(i); 15292 Object* k = DerivedHashTable::KeyAt(i);
15293 if (DerivedHashTable::IsKey(k) && !FilterKey(k, NONE)) { 15293 if (DerivedHashTable::IsKey(k) && !FilterKey(k, NONE)) {
15294 PropertyDetails details = DetailsAt(i); 15294 PropertyDetails details = DetailsAt(i);
15295 if (details.IsDeleted()) continue; 15295 if (details.IsDeleted()) continue;
15296 if (details.type() == CALLBACKS) return true; 15296 if (details.type() == CALLBACKS) return true;
15297 PropertyAttributes attr = details.attributes(); 15297 PropertyAttributes attr = details.attributes();
15298 if (attr & (READ_ONLY | DONT_DELETE)) return true; 15298 if (attr & (READ_ONLY | DONT_DELETE | DONT_ENUM)) return true;
15299 } 15299 }
15300 } 15300 }
15301 return false; 15301 return false;
15302 } 15302 }
15303 15303
15304 15304
15305 template <typename Derived, typename Shape, typename Key> 15305 template <typename Derived, typename Shape, typename Key>
15306 void Dictionary<Derived, Shape, Key>::CopyKeysTo( 15306 void Dictionary<Derived, Shape, Key>::CopyKeysTo(
15307 FixedArray* storage, PropertyAttributes filter, 15307 FixedArray* storage, PropertyAttributes filter,
15308 typename Dictionary<Derived, Shape, Key>::SortMode sort_mode) { 15308 typename Dictionary<Derived, Shape, Key>::SortMode sort_mode) {
(...skipping 1191 matching lines...) Expand 10 before | Expand all | Expand 10 after
16500 Handle<DependentCode> codes = 16500 Handle<DependentCode> codes =
16501 DependentCode::Insert(handle(cell->dependent_code(), info->isolate()), 16501 DependentCode::Insert(handle(cell->dependent_code(), info->isolate()),
16502 DependentCode::kPropertyCellChangedGroup, 16502 DependentCode::kPropertyCellChangedGroup,
16503 info->object_wrapper()); 16503 info->object_wrapper());
16504 if (*codes != cell->dependent_code()) cell->set_dependent_code(*codes); 16504 if (*codes != cell->dependent_code()) cell->set_dependent_code(*codes);
16505 info->dependencies(DependentCode::kPropertyCellChangedGroup)->Add( 16505 info->dependencies(DependentCode::kPropertyCellChangedGroup)->Add(
16506 cell, info->zone()); 16506 cell, info->zone());
16507 } 16507 }
16508 16508
16509 } } // namespace v8::internal 16509 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/objects.h ('k') | test/mjsunit/regress/regress-shift-enumerable.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698