| 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 5509 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5520 | 5520 |
| 5521 TEST(Regress507979) { | 5521 TEST(Regress507979) { |
| 5522 const int kFixedArrayLen = 10; | 5522 const int kFixedArrayLen = 10; |
| 5523 CcTest::InitializeVM(); | 5523 CcTest::InitializeVM(); |
| 5524 Isolate* isolate = CcTest::i_isolate(); | 5524 Isolate* isolate = CcTest::i_isolate(); |
| 5525 Heap* heap = isolate->heap(); | 5525 Heap* heap = isolate->heap(); |
| 5526 HandleScope handle_scope(isolate); | 5526 HandleScope handle_scope(isolate); |
| 5527 | 5527 |
| 5528 Handle<FixedArray> o1 = isolate->factory()->NewFixedArray(kFixedArrayLen); | 5528 Handle<FixedArray> o1 = isolate->factory()->NewFixedArray(kFixedArrayLen); |
| 5529 Handle<FixedArray> o2 = isolate->factory()->NewFixedArray(kFixedArrayLen); | 5529 Handle<FixedArray> o2 = isolate->factory()->NewFixedArray(kFixedArrayLen); |
| 5530 CHECK(heap->InNewSpace(o1->address())); | 5530 CHECK(heap->InNewSpace(*o1)); |
| 5531 CHECK(heap->InNewSpace(o2->address())); | 5531 CHECK(heap->InNewSpace(*o2)); |
| 5532 | 5532 |
| 5533 HeapIterator it(heap, i::HeapIterator::kFilterUnreachable); | 5533 HeapIterator it(heap, i::HeapIterator::kFilterUnreachable); |
| 5534 | 5534 |
| 5535 // Replace parts of an object placed before a live object with a filler. This | 5535 // Replace parts of an object placed before a live object with a filler. This |
| 5536 // way the filler object shares the mark bits with the following live object. | 5536 // way the filler object shares the mark bits with the following live object. |
| 5537 o1->Shrink(kFixedArrayLen - 1); | 5537 o1->Shrink(kFixedArrayLen - 1); |
| 5538 | 5538 |
| 5539 for (HeapObject* obj = it.next(); obj != NULL; obj = it.next()) { | 5539 for (HeapObject* obj = it.next(); obj != NULL; obj = it.next()) { |
| 5540 // Let's not optimize the loop away. | 5540 // Let's not optimize the loop away. |
| 5541 CHECK(obj->address() != nullptr); | 5541 CHECK(obj->address() != nullptr); |
| (...skipping 870 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6412 isolate->IncrementJsCallsFromApiCounter(); | 6412 isolate->IncrementJsCallsFromApiCounter(); |
| 6413 isolate->IncrementJsCallsFromApiCounter(); | 6413 isolate->IncrementJsCallsFromApiCounter(); |
| 6414 isolate->IncrementJsCallsFromApiCounter(); | 6414 isolate->IncrementJsCallsFromApiCounter(); |
| 6415 calls_per_ms = memory_reducer->SampleAndGetJsCallsPerMs(4); | 6415 calls_per_ms = memory_reducer->SampleAndGetJsCallsPerMs(4); |
| 6416 CheckDoubleEquals(2, calls_per_ms); | 6416 CheckDoubleEquals(2, calls_per_ms); |
| 6417 } | 6417 } |
| 6418 | 6418 |
| 6419 | 6419 |
| 6420 } // namespace internal | 6420 } // namespace internal |
| 6421 } // namespace v8 | 6421 } // namespace v8 |
| OLD | NEW |