| 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 555 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 566 size, // Code space. | 566 size, // Code space. |
| 567 size, // Map space. | 567 size, // Map space. |
| 568 size, // Cell space. | 568 size, // Cell space. |
| 569 size); // Large object space. | 569 size); // Large object space. |
| 570 LinearAllocationScope linear_allocation_scope; | 570 LinearAllocationScope linear_allocation_scope; |
| 571 const int kSmallFixedArrayLength = 4; | 571 const int kSmallFixedArrayLength = 4; |
| 572 const int kSmallFixedArraySize = | 572 const int kSmallFixedArraySize = |
| 573 FixedArray::kHeaderSize + kSmallFixedArrayLength * kPointerSize; | 573 FixedArray::kHeaderSize + kSmallFixedArrayLength * kPointerSize; |
| 574 const int kSmallStringLength = 16; | 574 const int kSmallStringLength = 16; |
| 575 const int kSmallStringSize = | 575 const int kSmallStringSize = |
| 576 SeqAsciiString::kHeaderSize + kSmallStringLength; | 576 (SeqAsciiString::kHeaderSize + kSmallStringLength + |
| 577 kObjectAlignmentMask) & ~kObjectAlignmentMask; |
| 577 const int kMapSize = Map::kSize; | 578 const int kMapSize = Map::kSize; |
| 578 | 579 |
| 579 Object* new_last = NULL; | 580 Object* new_last = NULL; |
| 580 for (int i = 0; | 581 for (int i = 0; |
| 581 i + kSmallFixedArraySize <= new_space_size; | 582 i + kSmallFixedArraySize <= new_space_size; |
| 582 i += kSmallFixedArraySize) { | 583 i += kSmallFixedArraySize) { |
| 583 Object* obj = Heap::AllocateFixedArray(kSmallFixedArrayLength); | 584 Object* obj = Heap::AllocateFixedArray(kSmallFixedArrayLength); |
| 584 if (new_last != NULL) { | 585 if (new_last != NULL) { |
| 585 CHECK(reinterpret_cast<char*>(obj) == | 586 CHECK(reinterpret_cast<char*>(obj) == |
| 586 reinterpret_cast<char*>(new_last) + kSmallFixedArraySize); | 587 reinterpret_cast<char*>(new_last) + kSmallFixedArraySize); |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 662 TEST(TestThatAlwaysFails) { | 663 TEST(TestThatAlwaysFails) { |
| 663 bool ArtificialFailure = false; | 664 bool ArtificialFailure = false; |
| 664 CHECK(ArtificialFailure); | 665 CHECK(ArtificialFailure); |
| 665 } | 666 } |
| 666 | 667 |
| 667 | 668 |
| 668 DEPENDENT_TEST(DependentTestThatAlwaysFails, TestThatAlwaysSucceeds) { | 669 DEPENDENT_TEST(DependentTestThatAlwaysFails, TestThatAlwaysSucceeds) { |
| 669 bool ArtificialFailure2 = false; | 670 bool ArtificialFailure2 = false; |
| 670 CHECK(ArtificialFailure2); | 671 CHECK(ArtificialFailure2); |
| 671 } | 672 } |
| OLD | NEW |