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

Side by Side Diff: test/cctest/test-dictionary.cc

Issue 225183009: Use OrderedHashTables as the backing store of JSSet and JSMap (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Get rid of IsOrderedHashSet/Map methods Created 6 years, 8 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/runtime.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 table = HashSet::Add(table, key); 194 table = HashSet::Add(table, key);
195 CHECK(gc_count < isolate->heap()->gc_count()); 195 CHECK(gc_count < isolate->heap()->gc_count());
196 } 196 }
197 197
198 198
199 TEST(ObjectHashSetCausesGC) { 199 TEST(ObjectHashSetCausesGC) {
200 i::FLAG_stress_compaction = false; 200 i::FLAG_stress_compaction = false;
201 LocalContext context; 201 LocalContext context;
202 v8::HandleScope scope(context->GetIsolate()); 202 v8::HandleScope scope(context->GetIsolate());
203 Isolate* isolate = CcTest::i_isolate(); 203 Isolate* isolate = CcTest::i_isolate();
204 TestHashSetCausesGC(isolate->factory()->NewObjectHashSet(1));
205 TestHashSetCausesGC(isolate->factory()->NewOrderedHashSet()); 204 TestHashSetCausesGC(isolate->factory()->NewOrderedHashSet());
206 } 205 }
207 #endif 206 #endif
208 207
209 208
210 #ifdef DEBUG 209 #ifdef DEBUG
211 template<class HashMap> 210 template<class HashMap>
212 static void TestHashMapCausesGC(Handle<HashMap> table) { 211 static void TestHashMapCausesGC(Handle<HashMap> table) {
213 Isolate* isolate = CcTest::i_isolate(); 212 Isolate* isolate = CcTest::i_isolate();
214 Factory* factory = isolate->factory(); 213 Factory* factory = isolate->factory();
(...skipping 26 matching lines...) Expand all
241 LocalContext context; 240 LocalContext context;
242 v8::HandleScope scope(context->GetIsolate()); 241 v8::HandleScope scope(context->GetIsolate());
243 Isolate* isolate = CcTest::i_isolate(); 242 Isolate* isolate = CcTest::i_isolate();
244 TestHashMapCausesGC(isolate->factory()->NewObjectHashTable(1)); 243 TestHashMapCausesGC(isolate->factory()->NewObjectHashTable(1));
245 TestHashMapCausesGC(isolate->factory()->NewOrderedHashMap()); 244 TestHashMapCausesGC(isolate->factory()->NewOrderedHashMap());
246 } 245 }
247 #endif 246 #endif
248 247
249 248
250 } 249 }
OLDNEW
« no previous file with comments | « src/runtime.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698