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

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

Issue 1632913003: [heap] Move to page lookups for SemiSpace, NewSpace, and Heap containment methods (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: mips ports Created 4 years, 10 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/x64/macro-assembler-x64.cc ('k') | test/cctest/test-weakmaps.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 5585 matching lines...) Expand 10 before | Expand all | Expand 10 after
5596 5596
5597 TEST(Regress507979) { 5597 TEST(Regress507979) {
5598 const int kFixedArrayLen = 10; 5598 const int kFixedArrayLen = 10;
5599 CcTest::InitializeVM(); 5599 CcTest::InitializeVM();
5600 Isolate* isolate = CcTest::i_isolate(); 5600 Isolate* isolate = CcTest::i_isolate();
5601 Heap* heap = isolate->heap(); 5601 Heap* heap = isolate->heap();
5602 HandleScope handle_scope(isolate); 5602 HandleScope handle_scope(isolate);
5603 5603
5604 Handle<FixedArray> o1 = isolate->factory()->NewFixedArray(kFixedArrayLen); 5604 Handle<FixedArray> o1 = isolate->factory()->NewFixedArray(kFixedArrayLen);
5605 Handle<FixedArray> o2 = isolate->factory()->NewFixedArray(kFixedArrayLen); 5605 Handle<FixedArray> o2 = isolate->factory()->NewFixedArray(kFixedArrayLen);
5606 CHECK(heap->InNewSpace(o1->address())); 5606 CHECK(heap->InNewSpace(*o1));
5607 CHECK(heap->InNewSpace(o2->address())); 5607 CHECK(heap->InNewSpace(*o2));
5608 5608
5609 HeapIterator it(heap, i::HeapIterator::kFilterUnreachable); 5609 HeapIterator it(heap, i::HeapIterator::kFilterUnreachable);
5610 5610
5611 // Replace parts of an object placed before a live object with a filler. This 5611 // Replace parts of an object placed before a live object with a filler. This
5612 // way the filler object shares the mark bits with the following live object. 5612 // way the filler object shares the mark bits with the following live object.
5613 o1->Shrink(kFixedArrayLen - 1); 5613 o1->Shrink(kFixedArrayLen - 1);
5614 5614
5615 for (HeapObject* obj = it.next(); obj != NULL; obj = it.next()) { 5615 for (HeapObject* obj = it.next(); obj != NULL; obj = it.next()) {
5616 // Let's not optimize the loop away. 5616 // Let's not optimize the loop away.
5617 CHECK(obj->address() != nullptr); 5617 CHECK(obj->address() != nullptr);
(...skipping 869 matching lines...) Expand 10 before | Expand all | Expand 10 after
6487 isolate->IncrementJsCallsFromApiCounter(); 6487 isolate->IncrementJsCallsFromApiCounter();
6488 isolate->IncrementJsCallsFromApiCounter(); 6488 isolate->IncrementJsCallsFromApiCounter();
6489 isolate->IncrementJsCallsFromApiCounter(); 6489 isolate->IncrementJsCallsFromApiCounter();
6490 calls_per_ms = memory_reducer->SampleAndGetJsCallsPerMs(4); 6490 calls_per_ms = memory_reducer->SampleAndGetJsCallsPerMs(4);
6491 CheckDoubleEquals(2, calls_per_ms); 6491 CheckDoubleEquals(2, calls_per_ms);
6492 } 6492 }
6493 6493
6494 6494
6495 } // namespace internal 6495 } // namespace internal
6496 } // namespace v8 6496 } // namespace v8
OLDNEW
« no previous file with comments | « src/x64/macro-assembler-x64.cc ('k') | test/cctest/test-weakmaps.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698