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

Unified Diff: test/cctest/test-dictionary.cc

Issue 309663005: Split Put into Put and Remove (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Remove move without was_present and use that in the runtime for extra speed 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 side-by-side diff with in-line comments
Download patch
Index: test/cctest/test-dictionary.cc
diff --git a/test/cctest/test-dictionary.cc b/test/cctest/test-dictionary.cc
index fc2227f349beacee0853d0e283d6b8404d706e55..776783b4c2376f12eb28ea648f07883116aeb080 100644
--- a/test/cctest/test-dictionary.cc
+++ b/test/cctest/test-dictionary.cc
@@ -64,8 +64,9 @@ static void TestHashMap(Handle<HashMap> table) {
CHECK_EQ(table->NumberOfElements(), 1);
CHECK_NE(table->Lookup(a), *b);
Michael Starzinger 2014/06/02 13:34:04 nit: Let's add a comment along the lines of ... /
arv (Not doing code reviews) 2014/06/02 23:49:08 Done.
- // Keys mapped to the hole should be removed permanently.
- table = HashMap::Put(table, a, factory->the_hole_value());
+ bool was_present = false;
+ table = HashMap::Remove(table, a, &was_present);
+ CHECK(was_present);
CHECK_EQ(table->NumberOfElements(), 0);
CHECK_EQ(table->Lookup(a), CcTest::heap()->the_hole_value());
« src/objects.cc ('K') | « src/runtime.cc ('k') | test/cctest/test-ordered-hash-table.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698