| 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 5588 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5599 | 5599 |
| 5600 TEST(Regress507979) { | 5600 TEST(Regress507979) { |
| 5601 const int kFixedArrayLen = 10; | 5601 const int kFixedArrayLen = 10; |
| 5602 CcTest::InitializeVM(); | 5602 CcTest::InitializeVM(); |
| 5603 Isolate* isolate = CcTest::i_isolate(); | 5603 Isolate* isolate = CcTest::i_isolate(); |
| 5604 Heap* heap = isolate->heap(); | 5604 Heap* heap = isolate->heap(); |
| 5605 HandleScope handle_scope(isolate); | 5605 HandleScope handle_scope(isolate); |
| 5606 | 5606 |
| 5607 Handle<FixedArray> o1 = isolate->factory()->NewFixedArray(kFixedArrayLen); | 5607 Handle<FixedArray> o1 = isolate->factory()->NewFixedArray(kFixedArrayLen); |
| 5608 Handle<FixedArray> o2 = isolate->factory()->NewFixedArray(kFixedArrayLen); | 5608 Handle<FixedArray> o2 = isolate->factory()->NewFixedArray(kFixedArrayLen); |
| 5609 CHECK(heap->InNewSpace(o1->address())); | 5609 CHECK(heap->InNewSpace(*o1)); |
| 5610 CHECK(heap->InNewSpace(o2->address())); | 5610 CHECK(heap->InNewSpace(*o2)); |
| 5611 | 5611 |
| 5612 HeapIterator it(heap, i::HeapIterator::kFilterUnreachable); | 5612 HeapIterator it(heap, i::HeapIterator::kFilterUnreachable); |
| 5613 | 5613 |
| 5614 // Replace parts of an object placed before a live object with a filler. This | 5614 // Replace parts of an object placed before a live object with a filler. This |
| 5615 // way the filler object shares the mark bits with the following live object. | 5615 // way the filler object shares the mark bits with the following live object. |
| 5616 o1->Shrink(kFixedArrayLen - 1); | 5616 o1->Shrink(kFixedArrayLen - 1); |
| 5617 | 5617 |
| 5618 for (HeapObject* obj = it.next(); obj != NULL; obj = it.next()) { | 5618 for (HeapObject* obj = it.next(); obj != NULL; obj = it.next()) { |
| 5619 // Let's not optimize the loop away. | 5619 // Let's not optimize the loop away. |
| 5620 CHECK(obj->address() != nullptr); | 5620 CHECK(obj->address() != nullptr); |
| (...skipping 869 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6490 isolate->IncrementJsCallsFromApiCounter(); | 6490 isolate->IncrementJsCallsFromApiCounter(); |
| 6491 isolate->IncrementJsCallsFromApiCounter(); | 6491 isolate->IncrementJsCallsFromApiCounter(); |
| 6492 isolate->IncrementJsCallsFromApiCounter(); | 6492 isolate->IncrementJsCallsFromApiCounter(); |
| 6493 calls_per_ms = memory_reducer->SampleAndGetJsCallsPerMs(4); | 6493 calls_per_ms = memory_reducer->SampleAndGetJsCallsPerMs(4); |
| 6494 CheckDoubleEquals(2, calls_per_ms); | 6494 CheckDoubleEquals(2, calls_per_ms); |
| 6495 } | 6495 } |
| 6496 | 6496 |
| 6497 | 6497 |
| 6498 } // namespace internal | 6498 } // namespace internal |
| 6499 } // namespace v8 | 6499 } // namespace v8 |
| OLD | NEW |