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; | |
578 const int kMapSize = Map::kSize; | 577 const int kMapSize = Map::kSize; |
579 | 578 |
580 Object* new_last = NULL; | 579 Object* new_last = NULL; |
581 for (int i = 0; | 580 for (int i = 0; |
582 i + kSmallFixedArraySize <= new_space_size; | 581 i + kSmallFixedArraySize <= new_space_size; |
583 i += kSmallFixedArraySize) { | 582 i += kSmallFixedArraySize) { |
584 Object* obj = Heap::AllocateFixedArray(kSmallFixedArrayLength); | 583 Object* obj = Heap::AllocateFixedArray(kSmallFixedArrayLength); |
585 if (new_last != NULL) { | 584 if (new_last != NULL) { |
586 CHECK(reinterpret_cast<char*>(obj) == | 585 CHECK(reinterpret_cast<char*>(obj) == |
587 reinterpret_cast<char*>(new_last) + kSmallFixedArraySize); | 586 reinterpret_cast<char*>(new_last) + kSmallFixedArraySize); |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
663 TEST(TestThatAlwaysFails) { | 662 TEST(TestThatAlwaysFails) { |
664 bool ArtificialFailure = false; | 663 bool ArtificialFailure = false; |
665 CHECK(ArtificialFailure); | 664 CHECK(ArtificialFailure); |
666 } | 665 } |
667 | 666 |
668 | 667 |
669 DEPENDENT_TEST(DependentTestThatAlwaysFails, TestThatAlwaysSucceeds) { | 668 DEPENDENT_TEST(DependentTestThatAlwaysFails, TestThatAlwaysSucceeds) { |
670 bool ArtificialFailure2 = false; | 669 bool ArtificialFailure2 = false; |
671 CHECK(ArtificialFailure2); | 670 CHECK(ArtificialFailure2); |
672 } | 671 } |
OLD | NEW |