| OLD | NEW |
| 1 // Copyright 2007-2010 the V8 project authors. All rights reserved. | 1 // Copyright 2007-2010 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 551 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 562 int paged_space_max = Page::kMaxHeapObjectSize; | 562 int paged_space_max = Page::kMaxHeapObjectSize; |
| 563 | 563 |
| 564 for (int size = 1000; size < 5 * MB; size += size >> 1) { | 564 for (int size = 1000; size < 5 * MB; size += size >> 1) { |
| 565 size &= ~8; // Round. | 565 size &= ~8; // Round. |
| 566 int new_space_size = (size < new_space_max) ? size : new_space_max; | 566 int new_space_size = (size < new_space_max) ? size : new_space_max; |
| 567 int paged_space_size = (size < paged_space_max) ? size : paged_space_max; | 567 int paged_space_size = (size < paged_space_max) ? size : paged_space_max; |
| 568 HEAP->ReserveSpace( | 568 HEAP->ReserveSpace( |
| 569 new_space_size, | 569 new_space_size, |
| 570 paged_space_size, // Old pointer space. | 570 paged_space_size, // Old pointer space. |
| 571 paged_space_size, // Old data space. | 571 paged_space_size, // Old data space. |
| 572 paged_space_size, // Code space. | 572 HEAP->code_space()->RoundSizeDownToObjectAlignment(paged_space_size), |
| 573 paged_space_size, // Map space. | 573 HEAP->map_space()->RoundSizeDownToObjectAlignment(paged_space_size), |
| 574 paged_space_size, // Cell space. | 574 HEAP->cell_space()->RoundSizeDownToObjectAlignment(paged_space_size), |
| 575 size); // Large object space. | 575 size); // Large object space. |
| 576 LinearAllocationScope linear_allocation_scope; | 576 LinearAllocationScope linear_allocation_scope; |
| 577 const int kSmallFixedArrayLength = 4; | 577 const int kSmallFixedArrayLength = 4; |
| 578 const int kSmallFixedArraySize = | 578 const int kSmallFixedArraySize = |
| 579 FixedArray::kHeaderSize + kSmallFixedArrayLength * kPointerSize; | 579 FixedArray::kHeaderSize + kSmallFixedArrayLength * kPointerSize; |
| 580 const int kSmallStringLength = 16; | 580 const int kSmallStringLength = 16; |
| 581 const int kSmallStringSize = | 581 const int kSmallStringSize = |
| 582 (SeqAsciiString::kHeaderSize + kSmallStringLength + | 582 (SeqAsciiString::kHeaderSize + kSmallStringLength + |
| 583 kObjectAlignmentMask) & ~kObjectAlignmentMask; | 583 kObjectAlignmentMask) & ~kObjectAlignmentMask; |
| 584 const int kMapSize = Map::kSize; | 584 const int kMapSize = Map::kSize; |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 675 TEST(TestThatAlwaysFails) { | 675 TEST(TestThatAlwaysFails) { |
| 676 bool ArtificialFailure = false; | 676 bool ArtificialFailure = false; |
| 677 CHECK(ArtificialFailure); | 677 CHECK(ArtificialFailure); |
| 678 } | 678 } |
| 679 | 679 |
| 680 | 680 |
| 681 DEPENDENT_TEST(DependentTestThatAlwaysFails, TestThatAlwaysSucceeds) { | 681 DEPENDENT_TEST(DependentTestThatAlwaysFails, TestThatAlwaysSucceeds) { |
| 682 bool ArtificialFailure2 = false; | 682 bool ArtificialFailure2 = false; |
| 683 CHECK(ArtificialFailure2); | 683 CHECK(ArtificialFailure2); |
| 684 } | 684 } |
| OLD | NEW |