OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |