| OLD | NEW |
| 1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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 "src/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #include "src/heap/identity-map.h" | 7 #include "src/identity-map.h" |
| 8 #include "src/zone.h" | 8 #include "src/zone.h" |
| 9 | 9 |
| 10 #include "test/cctest/cctest.h" | 10 #include "test/cctest/cctest.h" |
| 11 | 11 |
| 12 namespace v8 { | 12 namespace v8 { |
| 13 namespace internal { | 13 namespace internal { |
| 14 | 14 |
| 15 // Helper for testing. A "friend" of the IdentityMapBase class, it is able to | 15 // Helper for testing. A "friend" of the IdentityMapBase class, it is able to |
| 16 // "move" objects to simulate GC for testing the internals of the map. | 16 // "move" objects to simulate GC for testing the internals of the map. |
| 17 class IdentityMapTester : public HandleAndZoneScope { | 17 class IdentityMapTester : public HandleAndZoneScope { |
| (...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 330 t.heap()->CollectGarbage(i::NEW_SPACE); | 330 t.heap()->CollectGarbage(i::NEW_SPACE); |
| 331 | 331 |
| 332 // Check that searching for the numbers finds the same values. | 332 // Check that searching for the numbers finds the same values. |
| 333 for (size_t i = 0; i < arraysize(num_keys); i++) { | 333 for (size_t i = 0; i < arraysize(num_keys); i++) { |
| 334 t.CheckFind(num_keys[i], &num_keys[i]); | 334 t.CheckFind(num_keys[i], &num_keys[i]); |
| 335 t.CheckGet(num_keys[i], &num_keys[i]); | 335 t.CheckGet(num_keys[i], &num_keys[i]); |
| 336 } | 336 } |
| 337 } | 337 } |
| 338 } | 338 } |
| 339 } | 339 } |
| OLD | NEW |