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

Side by Side Diff: src/objects.cc

Issue 289503002: ES6 Map/Set iterators/forEach improvements (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: git rebase to fix merge conflict Created 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/objects.h ('k') | src/objects-debug.cc » ('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 "v8.h" 5 #include "v8.h"
6 6
7 #include "accessors.h" 7 #include "accessors.h"
8 #include "allocation-site-scopes.h" 8 #include "allocation-site-scopes.h"
9 #include "api.h" 9 #include "api.h"
10 #include "arguments.h" 10 #include "arguments.h"
(...skipping 16202 matching lines...) Expand 10 before | Expand all | Expand 10 after
16213 kHashTableStartIndex + num_buckets + (capacity * kEntrySize), pretenure); 16213 kHashTableStartIndex + num_buckets + (capacity * kEntrySize), pretenure);
16214 backing_store->set_map_no_write_barrier( 16214 backing_store->set_map_no_write_barrier(
16215 isolate->heap()->ordered_hash_table_map()); 16215 isolate->heap()->ordered_hash_table_map());
16216 Handle<Derived> table = Handle<Derived>::cast(backing_store); 16216 Handle<Derived> table = Handle<Derived>::cast(backing_store);
16217 for (int i = 0; i < num_buckets; ++i) { 16217 for (int i = 0; i < num_buckets; ++i) {
16218 table->set(kHashTableStartIndex + i, Smi::FromInt(kNotFound)); 16218 table->set(kHashTableStartIndex + i, Smi::FromInt(kNotFound));
16219 } 16219 }
16220 table->SetNumberOfBuckets(num_buckets); 16220 table->SetNumberOfBuckets(num_buckets);
16221 table->SetNumberOfElements(0); 16221 table->SetNumberOfElements(0);
16222 table->SetNumberOfDeletedElements(0); 16222 table->SetNumberOfDeletedElements(0);
16223 table->set_iterators(isolate->heap()->undefined_value());
16224 return table; 16223 return table;
16225 } 16224 }
16226 16225
16227 16226
16228 template<class Derived, class Iterator, int entrysize> 16227 template<class Derived, class Iterator, int entrysize>
16229 Handle<Derived> OrderedHashTable<Derived, Iterator, entrysize>::EnsureGrowable( 16228 Handle<Derived> OrderedHashTable<Derived, Iterator, entrysize>::EnsureGrowable(
16230 Handle<Derived> table) { 16229 Handle<Derived> table) {
16230 ASSERT(!table->IsObsolete());
16231
16231 int nof = table->NumberOfElements(); 16232 int nof = table->NumberOfElements();
16232 int nod = table->NumberOfDeletedElements(); 16233 int nod = table->NumberOfDeletedElements();
16233 int capacity = table->Capacity(); 16234 int capacity = table->Capacity();
16234 if ((nof + nod) < capacity) return table; 16235 if ((nof + nod) < capacity) return table;
16235 // Don't need to grow if we can simply clear out deleted entries instead. 16236 // Don't need to grow if we can simply clear out deleted entries instead.
16236 // Note that we can't compact in place, though, so we always allocate 16237 // Note that we can't compact in place, though, so we always allocate
16237 // a new table. 16238 // a new table.
16238 return Rehash(table, (nod < (capacity >> 1)) ? capacity << 1 : capacity); 16239 return Rehash(table, (nod < (capacity >> 1)) ? capacity << 1 : capacity);
16239 } 16240 }
16240 16241
16241 16242
16242 template<class Derived, class Iterator, int entrysize> 16243 template<class Derived, class Iterator, int entrysize>
16243 Handle<Derived> OrderedHashTable<Derived, Iterator, entrysize>::Shrink( 16244 Handle<Derived> OrderedHashTable<Derived, Iterator, entrysize>::Shrink(
16244 Handle<Derived> table) { 16245 Handle<Derived> table) {
16246 ASSERT(!table->IsObsolete());
16247
16245 int nof = table->NumberOfElements(); 16248 int nof = table->NumberOfElements();
16246 int capacity = table->Capacity(); 16249 int capacity = table->Capacity();
16247 if (nof > (capacity >> 2)) return table; 16250 if (nof >= (capacity >> 2)) return table;
16248 return Rehash(table, capacity / 2); 16251 return Rehash(table, capacity / 2);
16249 } 16252 }
16250 16253
16251 16254
16252 template<class Derived, class Iterator, int entrysize> 16255 template<class Derived, class Iterator, int entrysize>
16253 Handle<Derived> OrderedHashTable<Derived, Iterator, entrysize>::Clear( 16256 Handle<Derived> OrderedHashTable<Derived, Iterator, entrysize>::Clear(
16254 Handle<Derived> table) { 16257 Handle<Derived> table) {
16258 ASSERT(!table->IsObsolete());
16259
16255 Handle<Derived> new_table = 16260 Handle<Derived> new_table =
16256 Allocate(table->GetIsolate(), 16261 Allocate(table->GetIsolate(),
16257 kMinCapacity, 16262 kMinCapacity,
16258 table->GetHeap()->InNewSpace(*table) ? NOT_TENURED : TENURED); 16263 table->GetHeap()->InNewSpace(*table) ? NOT_TENURED : TENURED);
16259 16264
16260 new_table->set_iterators(table->iterators()); 16265 table->SetNextTable(*new_table);
16261 table->set_iterators(table->GetHeap()->undefined_value()); 16266 table->SetNumberOfDeletedElements(-1);
16262
16263 DisallowHeapAllocation no_allocation;
16264 for (Object* object = new_table->iterators();
16265 !object->IsUndefined();
16266 object = Iterator::cast(object)->next_iterator()) {
16267 Iterator::cast(object)->TableCleared();
16268 Iterator::cast(object)->set_table(*new_table);
16269 }
16270 16267
16271 return new_table; 16268 return new_table;
16272 } 16269 }
16273 16270
16274 16271
16275 template<class Derived, class Iterator, int entrysize> 16272 template<class Derived, class Iterator, int entrysize>
16276 Handle<Derived> OrderedHashTable<Derived, Iterator, entrysize>::Rehash( 16273 Handle<Derived> OrderedHashTable<Derived, Iterator, entrysize>::Rehash(
16277 Handle<Derived> table, int new_capacity) { 16274 Handle<Derived> table, int new_capacity) {
16275 ASSERT(!table->IsObsolete());
16276
16278 Handle<Derived> new_table = 16277 Handle<Derived> new_table =
16279 Allocate(table->GetIsolate(), 16278 Allocate(table->GetIsolate(),
16280 new_capacity, 16279 new_capacity,
16281 table->GetHeap()->InNewSpace(*table) ? NOT_TENURED : TENURED); 16280 table->GetHeap()->InNewSpace(*table) ? NOT_TENURED : TENURED);
16282 int nof = table->NumberOfElements(); 16281 int nof = table->NumberOfElements();
16283 int nod = table->NumberOfDeletedElements(); 16282 int nod = table->NumberOfDeletedElements();
16284 int new_buckets = new_table->NumberOfBuckets(); 16283 int new_buckets = new_table->NumberOfBuckets();
16285 int new_entry = 0; 16284 int new_entry = 0;
16285 int removed_holes_index = 0;
16286
16286 for (int old_entry = 0; old_entry < (nof + nod); ++old_entry) { 16287 for (int old_entry = 0; old_entry < (nof + nod); ++old_entry) {
16287 Object* key = table->KeyAt(old_entry); 16288 Object* key = table->KeyAt(old_entry);
16288 if (key->IsTheHole()) continue; 16289 if (key->IsTheHole()) {
16290 table->SetRemovedIndexAt(removed_holes_index++, old_entry);
16291 continue;
16292 }
16293
16289 Object* hash = key->GetHash(); 16294 Object* hash = key->GetHash();
16290 int bucket = Smi::cast(hash)->value() & (new_buckets - 1); 16295 int bucket = Smi::cast(hash)->value() & (new_buckets - 1);
16291 Object* chain_entry = new_table->get(kHashTableStartIndex + bucket); 16296 Object* chain_entry = new_table->get(kHashTableStartIndex + bucket);
16292 new_table->set(kHashTableStartIndex + bucket, Smi::FromInt(new_entry)); 16297 new_table->set(kHashTableStartIndex + bucket, Smi::FromInt(new_entry));
16293 int new_index = new_table->EntryToIndex(new_entry); 16298 int new_index = new_table->EntryToIndex(new_entry);
16294 int old_index = table->EntryToIndex(old_entry); 16299 int old_index = table->EntryToIndex(old_entry);
16295 for (int i = 0; i < entrysize; ++i) { 16300 for (int i = 0; i < entrysize; ++i) {
16296 Object* value = table->get(old_index + i); 16301 Object* value = table->get(old_index + i);
16297 new_table->set(new_index + i, value); 16302 new_table->set(new_index + i, value);
16298 } 16303 }
16299 new_table->set(new_index + kChainOffset, chain_entry); 16304 new_table->set(new_index + kChainOffset, chain_entry);
16300 ++new_entry; 16305 ++new_entry;
16301 } 16306 }
16307
16308 ASSERT_EQ(nod, removed_holes_index);
16309
16302 new_table->SetNumberOfElements(nof); 16310 new_table->SetNumberOfElements(nof);
16303 16311 table->SetNextTable(*new_table);
16304 new_table->set_iterators(table->iterators());
16305 table->set_iterators(table->GetHeap()->undefined_value());
16306
16307 DisallowHeapAllocation no_allocation;
16308 for (Object* object = new_table->iterators();
16309 !object->IsUndefined();
16310 object = Iterator::cast(object)->next_iterator()) {
16311 Iterator::cast(object)->TableCompacted();
16312 Iterator::cast(object)->set_table(*new_table);
16313 }
16314 16312
16315 return new_table; 16313 return new_table;
16316 } 16314 }
16317 16315
16318 16316
16319 template<class Derived, class Iterator, int entrysize> 16317 template<class Derived, class Iterator, int entrysize>
16320 int OrderedHashTable<Derived, Iterator, entrysize>::FindEntry( 16318 int OrderedHashTable<Derived, Iterator, entrysize>::FindEntry(
16321 Handle<Object> key) { 16319 Handle<Object> key) {
16320 ASSERT(!IsObsolete());
16321
16322 DisallowHeapAllocation no_gc; 16322 DisallowHeapAllocation no_gc;
16323 ASSERT(!key->IsTheHole()); 16323 ASSERT(!key->IsTheHole());
16324 Object* hash = key->GetHash(); 16324 Object* hash = key->GetHash();
16325 if (hash->IsUndefined()) return kNotFound; 16325 if (hash->IsUndefined()) return kNotFound;
16326 for (int entry = HashToEntry(Smi::cast(hash)->value()); 16326 for (int entry = HashToEntry(Smi::cast(hash)->value());
16327 entry != kNotFound; 16327 entry != kNotFound;
16328 entry = ChainAt(entry)) { 16328 entry = ChainAt(entry)) {
16329 Object* candidate = KeyAt(entry); 16329 Object* candidate = KeyAt(entry);
16330 if (candidate->SameValue(*key)) 16330 if (candidate->SameValue(*key))
16331 return entry; 16331 return entry;
16332 } 16332 }
16333 return kNotFound; 16333 return kNotFound;
16334 } 16334 }
16335 16335
16336 16336
16337 template<class Derived, class Iterator, int entrysize> 16337 template<class Derived, class Iterator, int entrysize>
16338 int OrderedHashTable<Derived, Iterator, entrysize>::AddEntry(int hash) { 16338 int OrderedHashTable<Derived, Iterator, entrysize>::AddEntry(int hash) {
16339 ASSERT(!IsObsolete());
16340
16339 int entry = UsedCapacity(); 16341 int entry = UsedCapacity();
16340 int bucket = HashToBucket(hash); 16342 int bucket = HashToBucket(hash);
16341 int index = EntryToIndex(entry); 16343 int index = EntryToIndex(entry);
16342 Object* chain_entry = get(kHashTableStartIndex + bucket); 16344 Object* chain_entry = get(kHashTableStartIndex + bucket);
16343 set(kHashTableStartIndex + bucket, Smi::FromInt(entry)); 16345 set(kHashTableStartIndex + bucket, Smi::FromInt(entry));
16344 set(index + kChainOffset, chain_entry); 16346 set(index + kChainOffset, chain_entry);
16345 SetNumberOfElements(NumberOfElements() + 1); 16347 SetNumberOfElements(NumberOfElements() + 1);
16346 return index; 16348 return index;
16347 } 16349 }
16348 16350
16349 16351
16350 template<class Derived, class Iterator, int entrysize> 16352 template<class Derived, class Iterator, int entrysize>
16351 void OrderedHashTable<Derived, Iterator, entrysize>::RemoveEntry(int entry) { 16353 void OrderedHashTable<Derived, Iterator, entrysize>::RemoveEntry(int entry) {
16354 ASSERT(!IsObsolete());
16355
16352 int index = EntryToIndex(entry); 16356 int index = EntryToIndex(entry);
16353 for (int i = 0; i < entrysize; ++i) { 16357 for (int i = 0; i < entrysize; ++i) {
16354 set_the_hole(index + i); 16358 set_the_hole(index + i);
16355 } 16359 }
16356 SetNumberOfElements(NumberOfElements() - 1); 16360 SetNumberOfElements(NumberOfElements() - 1);
16357 SetNumberOfDeletedElements(NumberOfDeletedElements() + 1); 16361 SetNumberOfDeletedElements(NumberOfDeletedElements() + 1);
16358
16359 DisallowHeapAllocation no_allocation;
16360 for (Object* object = iterators();
16361 !object->IsUndefined();
16362 object = Iterator::cast(object)->next_iterator()) {
16363 Iterator::cast(object)->EntryRemoved(entry);
16364 }
16365 } 16362 }
16366 16363
16367 16364
16368 template Handle<OrderedHashSet> 16365 template Handle<OrderedHashSet>
16369 OrderedHashTable<OrderedHashSet, JSSetIterator, 1>::Allocate( 16366 OrderedHashTable<OrderedHashSet, JSSetIterator, 1>::Allocate(
16370 Isolate* isolate, int capacity, PretenureFlag pretenure); 16367 Isolate* isolate, int capacity, PretenureFlag pretenure);
16371 16368
16372 template Handle<OrderedHashSet> 16369 template Handle<OrderedHashSet>
16373 OrderedHashTable<OrderedHashSet, JSSetIterator, 1>::EnsureGrowable( 16370 OrderedHashTable<OrderedHashSet, JSSetIterator, 1>::EnsureGrowable(
16374 Handle<OrderedHashSet> table); 16371 Handle<OrderedHashSet> table);
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
16474 16471
16475 Handle<Smi> hash = GetOrCreateHash(table->GetIsolate(), key); 16472 Handle<Smi> hash = GetOrCreateHash(table->GetIsolate(), key);
16476 int index = table->AddEntry(hash->value()); 16473 int index = table->AddEntry(hash->value());
16477 table->set(index, *key); 16474 table->set(index, *key);
16478 table->set(index + kValueOffset, *value); 16475 table->set(index + kValueOffset, *value);
16479 return table; 16476 return table;
16480 } 16477 }
16481 16478
16482 16479
16483 template<class Derived, class TableType> 16480 template<class Derived, class TableType>
16484 void OrderedHashTableIterator<Derived, TableType>::EntryRemoved(int index) {
16485 int i = this->index()->value();
16486 if (index < i) {
16487 set_count(Smi::FromInt(count()->value() - 1));
16488 }
16489 if (index == i) {
16490 Seek();
16491 }
16492 }
16493
16494
16495 template<class Derived, class TableType>
16496 void OrderedHashTableIterator<Derived, TableType>::Close() {
16497 if (Closed()) return;
16498
16499 DisallowHeapAllocation no_allocation;
16500
16501 Object* undefined = GetHeap()->undefined_value();
16502 TableType* table = TableType::cast(this->table());
16503 Object* previous = previous_iterator();
16504 Object* next = next_iterator();
16505
16506 if (previous == undefined) {
16507 ASSERT_EQ(table->iterators(), this);
16508 table->set_iterators(next);
16509 } else {
16510 ASSERT_EQ(Derived::cast(previous)->next_iterator(), this);
16511 Derived::cast(previous)->set_next_iterator(next);
16512 }
16513
16514 if (!next->IsUndefined()) {
16515 ASSERT_EQ(Derived::cast(next)->previous_iterator(), this);
16516 Derived::cast(next)->set_previous_iterator(previous);
16517 }
16518
16519 set_previous_iterator(undefined);
16520 set_next_iterator(undefined);
16521 set_table(undefined);
16522 }
16523
16524
16525 template<class Derived, class TableType>
16526 void OrderedHashTableIterator<Derived, TableType>::Seek() {
16527 ASSERT(!Closed());
16528
16529 DisallowHeapAllocation no_allocation;
16530
16531 int index = this->index()->value();
16532
16533 TableType* table = TableType::cast(this->table());
16534 int used_capacity = table->UsedCapacity();
16535
16536 while (index < used_capacity && table->KeyAt(index)->IsTheHole()) {
16537 index++;
16538 }
16539 set_index(Smi::FromInt(index));
16540 }
16541
16542
16543 template<class Derived, class TableType>
16544 void OrderedHashTableIterator<Derived, TableType>::MoveNext() {
16545 ASSERT(!Closed());
16546
16547 set_index(Smi::FromInt(index()->value() + 1));
16548 set_count(Smi::FromInt(count()->value() + 1));
16549 Seek();
16550 }
16551
16552
16553 template<class Derived, class TableType>
16554 Handle<JSObject> OrderedHashTableIterator<Derived, TableType>::Next( 16481 Handle<JSObject> OrderedHashTableIterator<Derived, TableType>::Next(
16555 Handle<Derived> iterator) { 16482 Handle<Derived> iterator) {
16556 Isolate* isolate = iterator->GetIsolate(); 16483 Isolate* isolate = iterator->GetIsolate();
16557 Factory* factory = isolate->factory(); 16484 Factory* factory = isolate->factory();
16558 16485
16559 Handle<Object> object(iterator->table(), isolate); 16486 Handle<Object> maybe_table(iterator->table(), isolate);
16487 if (!maybe_table->IsUndefined()) {
16488 iterator->Transition();
16560 16489
16561 if (!object->IsUndefined()) { 16490 Handle<TableType> table(TableType::cast(iterator->table()), isolate);
16562 Handle<TableType> table = Handle<TableType>::cast(object); 16491 int index = Smi::cast(iterator->index())->value();
16563 int index = iterator->index()->value(); 16492 int used_capacity = table->UsedCapacity();
16564 if (index < table->UsedCapacity()) { 16493
16494 while (index < used_capacity && table->KeyAt(index)->IsTheHole()) {
16495 index++;
16496 }
16497
16498 if (index < used_capacity) {
16565 int entry_index = table->EntryToIndex(index); 16499 int entry_index = table->EntryToIndex(index);
16566 iterator->MoveNext(); 16500 Handle<Object> value =
16567 Handle<Object> value = Derived::ValueForKind(iterator, entry_index); 16501 Derived::ValueForKind(iterator, entry_index);
16502 iterator->set_index(Smi::FromInt(index + 1));
16568 return factory->NewIteratorResultObject(value, false); 16503 return factory->NewIteratorResultObject(value, false);
16569 } else {
16570 iterator->Close();
16571 } 16504 }
16505
16506 iterator->set_table(iterator->GetHeap()->undefined_value());
16572 } 16507 }
16573 16508
16574 return factory->NewIteratorResultObject(factory->undefined_value(), true); 16509 return factory->NewIteratorResultObject(factory->undefined_value(), true);
16575 } 16510 }
16576 16511
16577 16512
16513 template<class Derived, class TableType>
16514 void OrderedHashTableIterator<Derived, TableType>::Transition() {
16515 Isolate* isolate = GetIsolate();
16516 Handle<TableType> table(TableType::cast(this->table()), isolate);
16517 if (!table->IsObsolete()) return;
16518
16519 int index = Smi::cast(this->index())->value();
16520 while (table->IsObsolete()) {
16521 Handle<TableType> next_table(table->NextTable(), isolate);
16522
16523 if (index > 0) {
16524 int nod = table->NumberOfDeletedElements();
16525
16526 // When we clear the table we set the number of deleted elements to -1.
16527 if (nod == -1) {
16528 index = 0;
16529 } else {
16530 int old_index = index;
16531 for (int i = 0; i < nod; ++i) {
16532 int removed_index = table->RemovedIndexAt(i);
16533 if (removed_index >= old_index) break;
16534 --index;
16535 }
16536 }
16537 }
16538
16539 table = next_table;
16540 }
16541
16542 set_table(*table);
16543 set_index(Smi::FromInt(index));
16544 }
16545
16546
16578 template<class Derived, class TableType> 16547 template<class Derived, class TableType>
16579 Handle<Derived> OrderedHashTableIterator<Derived, TableType>::CreateInternal( 16548 Handle<Derived> OrderedHashTableIterator<Derived, TableType>::CreateInternal(
16580 Handle<Map> map, 16549 Handle<Map> map,
16581 Handle<TableType> table, 16550 Handle<TableType> table,
16582 int kind) { 16551 int kind) {
16583 Isolate* isolate = table->GetIsolate(); 16552 Isolate* isolate = table->GetIsolate();
16584 16553
16585 Handle<Object> undefined = isolate->factory()->undefined_value();
16586
16587 Handle<Derived> new_iterator = Handle<Derived>::cast( 16554 Handle<Derived> new_iterator = Handle<Derived>::cast(
16588 isolate->factory()->NewJSObjectFromMap(map)); 16555 isolate->factory()->NewJSObjectFromMap(map));
16589 new_iterator->set_previous_iterator(*undefined);
16590 new_iterator->set_table(*table); 16556 new_iterator->set_table(*table);
16591 new_iterator->set_index(Smi::FromInt(0)); 16557 new_iterator->set_index(Smi::FromInt(0));
16592 new_iterator->set_count(Smi::FromInt(0));
16593 new_iterator->set_kind(Smi::FromInt(kind)); 16558 new_iterator->set_kind(Smi::FromInt(kind));
16594
16595 Handle<Object> old_iterator(table->iterators(), isolate);
16596 if (!old_iterator->IsUndefined()) {
16597 Handle<Derived>::cast(old_iterator)->set_previous_iterator(*new_iterator);
16598 new_iterator->set_next_iterator(*old_iterator);
16599 } else {
16600 new_iterator->set_next_iterator(*undefined);
16601 }
16602
16603 table->set_iterators(*new_iterator);
16604
16605 return new_iterator; 16559 return new_iterator;
16606 } 16560 }
16607 16561
16608 16562
16609 template void
16610 OrderedHashTableIterator<JSSetIterator, OrderedHashSet>::EntryRemoved(
16611 int index);
16612
16613 template void
16614 OrderedHashTableIterator<JSSetIterator, OrderedHashSet>::Close();
16615
16616 template Handle<JSObject> 16563 template Handle<JSObject>
16617 OrderedHashTableIterator<JSSetIterator, OrderedHashSet>::Next( 16564 OrderedHashTableIterator<JSSetIterator, OrderedHashSet>::Next(
16618 Handle<JSSetIterator> iterator); 16565 Handle<JSSetIterator> iterator);
16619 16566
16567 template void
16568 OrderedHashTableIterator<JSSetIterator, OrderedHashSet>::Transition();
16569
16620 template Handle<JSSetIterator> 16570 template Handle<JSSetIterator>
16621 OrderedHashTableIterator<JSSetIterator, OrderedHashSet>::CreateInternal( 16571 OrderedHashTableIterator<JSSetIterator, OrderedHashSet>::CreateInternal(
16622 Handle<Map> map, Handle<OrderedHashSet> table, int kind); 16572 Handle<Map> map, Handle<OrderedHashSet> table, int kind);
16623 16573
16624 16574
16625 template void
16626 OrderedHashTableIterator<JSMapIterator, OrderedHashMap>::EntryRemoved(
16627 int index);
16628
16629 template void
16630 OrderedHashTableIterator<JSMapIterator, OrderedHashMap>::Close();
16631
16632 template Handle<JSObject> 16575 template Handle<JSObject>
16633 OrderedHashTableIterator<JSMapIterator, OrderedHashMap>::Next( 16576 OrderedHashTableIterator<JSMapIterator, OrderedHashMap>::Next(
16634 Handle<JSMapIterator> iterator); 16577 Handle<JSMapIterator> iterator);
16635 16578
16579 template void
16580 OrderedHashTableIterator<JSMapIterator, OrderedHashMap>::Transition();
16581
16636 template Handle<JSMapIterator> 16582 template Handle<JSMapIterator>
16637 OrderedHashTableIterator<JSMapIterator, OrderedHashMap>::CreateInternal( 16583 OrderedHashTableIterator<JSMapIterator, OrderedHashMap>::CreateInternal(
16638 Handle<Map> map, Handle<OrderedHashMap> table, int kind); 16584 Handle<Map> map, Handle<OrderedHashMap> table, int kind);
16639 16585
16640 16586
16641 Handle<Object> JSSetIterator::ValueForKind( 16587 Handle<Object> JSSetIterator::ValueForKind(
16642 Handle<JSSetIterator> iterator, int entry_index) { 16588 Handle<JSSetIterator> iterator, int entry_index) {
16643 int kind = iterator->kind()->value(); 16589 int kind = iterator->kind()->value();
16644 // Set.prototype only has values and entries. 16590 // Set.prototype only has values and entries.
16645 ASSERT(kind == kKindValues || kind == kKindEntries); 16591 ASSERT(kind == kKindValues || kind == kKindEntries);
16646 16592
16647 Isolate* isolate = iterator->GetIsolate(); 16593 Isolate* isolate = iterator->GetIsolate();
16648 Factory* factory = isolate->factory(); 16594 Factory* factory = isolate->factory();
(...skipping 631 matching lines...) Expand 10 before | Expand all | Expand 10 after
17280 #define ERROR_MESSAGES_TEXTS(C, T) T, 17226 #define ERROR_MESSAGES_TEXTS(C, T) T,
17281 static const char* error_messages_[] = { 17227 static const char* error_messages_[] = {
17282 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) 17228 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS)
17283 }; 17229 };
17284 #undef ERROR_MESSAGES_TEXTS 17230 #undef ERROR_MESSAGES_TEXTS
17285 return error_messages_[reason]; 17231 return error_messages_[reason];
17286 } 17232 }
17287 17233
17288 17234
17289 } } // namespace v8::internal 17235 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/objects.h ('k') | src/objects-debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698