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

Side by Side Diff: test/cctest/heap/test-spaces.cc

Issue 2715223003: Revert "[SAB] Move Atomics builtins to C++" (Closed)
Patch Set: another CL to revert Created 3 years, 9 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 | « src/v8.gyp ('k') | test/mjsunit/harmony/futex.js » ('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 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 512 matching lines...) Expand 10 before | Expand all | Expand 10 after
523 523
524 page_count[i] = heap->paged_space(i)->CountTotalPages(); 524 page_count[i] = heap->paged_space(i)->CountTotalPages();
525 // Check that the initial heap is also below the limit. 525 // Check that the initial heap is also below the limit.
526 CHECK_LT(heap->paged_space(i)->CommittedMemory(), kMaxInitialSizePerSpace); 526 CHECK_LT(heap->paged_space(i)->CommittedMemory(), kMaxInitialSizePerSpace);
527 } 527 }
528 528
529 // Executing the empty script gets by with the same number of pages, i.e., 529 // Executing the empty script gets by with the same number of pages, i.e.,
530 // requires no extra space. 530 // requires no extra space.
531 CompileRun("/*empty*/"); 531 CompileRun("/*empty*/");
532 for (int i = FIRST_PAGED_SPACE; i <= LAST_PAGED_SPACE; i++) { 532 for (int i = FIRST_PAGED_SPACE; i <= LAST_PAGED_SPACE; i++) {
533 // Skip CODE_SPACE, since we had to generate code even for an empty script. 533 // Debug code can be very large, so skip CODE_SPACE if we are generating it.
534 if (i == CODE_SPACE) continue; 534 if (i == CODE_SPACE && i::FLAG_debug_code) continue;
535 CHECK_EQ(page_count[i], isolate->heap()->paged_space(i)->CountTotalPages()); 535 CHECK_EQ(page_count[i], isolate->heap()->paged_space(i)->CountTotalPages());
536 } 536 }
537 537
538 // No large objects required to perform the above steps. 538 // No large objects required to perform the above steps.
539 CHECK_EQ(initial_lo_space, 539 CHECK_EQ(initial_lo_space,
540 static_cast<size_t>(isolate->heap()->lo_space()->Size())); 540 static_cast<size_t>(isolate->heap()->lo_space()->Size()));
541 } 541 }
542 542
543 static HeapObject* AllocateUnaligned(NewSpace* space, int size) { 543 static HeapObject* AllocateUnaligned(NewSpace* space, int size) {
544 AllocationResult allocation = space->AllocateRawUnaligned(size); 544 AllocationResult allocation = space->AllocateRawUnaligned(size);
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
798 HeapObject* filler = 798 HeapObject* filler =
799 HeapObject::FromAddress(array->address() + array->Size()); 799 HeapObject::FromAddress(array->address() + array->Size());
800 CHECK_EQ(filler->map(), CcTest::heap()->two_pointer_filler_map()); 800 CHECK_EQ(filler->map(), CcTest::heap()->two_pointer_filler_map());
801 801
802 const size_t shrinked = page->ShrinkToHighWaterMark(); 802 const size_t shrinked = page->ShrinkToHighWaterMark();
803 CHECK_EQ(0u, shrinked); 803 CHECK_EQ(0u, shrinked);
804 } 804 }
805 805
806 } // namespace internal 806 } // namespace internal
807 } // namespace v8 807 } // namespace v8
OLDNEW
« no previous file with comments | « src/v8.gyp ('k') | test/mjsunit/harmony/futex.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698