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

Side by Side Diff: test/cctest/test-unboxed-doubles.cc

Issue 1352453004: Perform scavenge in idle tasks. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase Created 5 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
« no previous file with comments | « test/cctest/test-heap.cc ('k') | test/unittests/heap/gc-idle-time-handler-unittest.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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 // TODO(mythria): Remove this define after this flag is turned on globally 5 // TODO(mythria): Remove this define after this flag is turned on globally
6 #define V8_IMMINENT_DEPRECATION_WARNINGS 6 #define V8_IMMINENT_DEPRECATION_WARNINGS
7 7
8 #include <stdlib.h> 8 #include <stdlib.h>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 1422 matching lines...) Expand 10 before | Expand all | Expand 10 after
1433 1433
1434 int object_size = my_map->instance_size(); 1434 int object_size = my_map->instance_size();
1435 1435
1436 // Step 2: allocate a lot of objects so to almost fill new space: we need 1436 // Step 2: allocate a lot of objects so to almost fill new space: we need
1437 // just enough room to allocate JSObject and thus fill the newspace. 1437 // just enough room to allocate JSObject and thus fill the newspace.
1438 1438
1439 int allocation_amount = 1439 int allocation_amount =
1440 Min(FixedArray::kMaxSize, Page::kMaxRegularHeapObjectSize + kPointerSize); 1440 Min(FixedArray::kMaxSize, Page::kMaxRegularHeapObjectSize + kPointerSize);
1441 int allocation_len = LenFromSize(allocation_amount); 1441 int allocation_len = LenFromSize(allocation_amount);
1442 NewSpace* new_space = heap->new_space(); 1442 NewSpace* new_space = heap->new_space();
1443 DisableInlineAllocationSteps(new_space);
1443 Address* top_addr = new_space->allocation_top_address(); 1444 Address* top_addr = new_space->allocation_top_address();
1444 Address* limit_addr = new_space->allocation_limit_address(); 1445 Address* limit_addr = new_space->allocation_limit_address();
1445 while ((*limit_addr - *top_addr) > allocation_amount) { 1446 while ((*limit_addr - *top_addr) > allocation_amount) {
1446 CHECK(!heap->always_allocate()); 1447 CHECK(!heap->always_allocate());
1447 Object* array = heap->AllocateFixedArray(allocation_len).ToObjectChecked(); 1448 Object* array = heap->AllocateFixedArray(allocation_len).ToObjectChecked();
1448 CHECK(new_space->Contains(array)); 1449 CHECK(new_space->Contains(array));
1449 } 1450 }
1450 1451
1451 // Step 3: now allocate fixed array and JSObject to fill the whole new space. 1452 // Step 3: now allocate fixed array and JSObject to fill the whole new space.
1452 int to_fill = static_cast<int>(*limit_addr - *top_addr - object_size); 1453 int to_fill = static_cast<int>(*limit_addr - *top_addr - object_size);
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
1687 1688
1688 // TODO(ishell): add respective tests for property kind reconfiguring from 1689 // TODO(ishell): add respective tests for property kind reconfiguring from
1689 // accessor field to double, once accessor fields are supported by 1690 // accessor field to double, once accessor fields are supported by
1690 // Map::ReconfigureProperty(). 1691 // Map::ReconfigureProperty().
1691 1692
1692 1693
1693 // TODO(ishell): add respective tests for fast property removal case once 1694 // TODO(ishell): add respective tests for fast property removal case once
1694 // Map::ReconfigureProperty() supports that. 1695 // Map::ReconfigureProperty() supports that.
1695 1696
1696 #endif 1697 #endif
OLDNEW
« no previous file with comments | « test/cctest/test-heap.cc ('k') | test/unittests/heap/gc-idle-time-handler-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698