| OLD | NEW |
| 1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 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 653 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 664 void JSFunctionResultCache::JSFunctionResultCacheVerify() { | 664 void JSFunctionResultCache::JSFunctionResultCacheVerify() { |
| 665 JSFunction::cast(get(kFactoryIndex))->Verify(); | 665 JSFunction::cast(get(kFactoryIndex))->Verify(); |
| 666 | 666 |
| 667 int size = Smi::cast(get(kCacheSizeIndex))->value(); | 667 int size = Smi::cast(get(kCacheSizeIndex))->value(); |
| 668 ASSERT(kEntriesIndex <= size); | 668 ASSERT(kEntriesIndex <= size); |
| 669 ASSERT(size <= length()); | 669 ASSERT(size <= length()); |
| 670 ASSERT_EQ(0, size % kEntrySize); | 670 ASSERT_EQ(0, size % kEntrySize); |
| 671 | 671 |
| 672 int finger = Smi::cast(get(kFingerIndex))->value(); | 672 int finger = Smi::cast(get(kFingerIndex))->value(); |
| 673 ASSERT(kEntriesIndex <= finger); | 673 ASSERT(kEntriesIndex <= finger); |
| 674 ASSERT(finger < size || finger == kEntriesIndex); | 674 ASSERT((finger < size) || (finger == kEntriesIndex && finger == size)); |
| 675 ASSERT_EQ(0, finger % kEntrySize); | 675 ASSERT_EQ(0, finger % kEntrySize); |
| 676 | 676 |
| 677 if (FLAG_enable_slow_asserts) { | 677 if (FLAG_enable_slow_asserts) { |
| 678 for (int i = kEntriesIndex; i < size; i++) { | 678 for (int i = kEntriesIndex; i < size; i++) { |
| 679 ASSERT(!get(i)->IsTheHole()); | 679 ASSERT(!get(i)->IsTheHole()); |
| 680 get(i)->Verify(); | 680 get(i)->Verify(); |
| 681 } | 681 } |
| 682 for (int i = size; i < length(); i++) { | 682 for (int i = size; i < length(); i++) { |
| 683 ASSERT(get(i)->IsTheHole()); | 683 ASSERT(get(i)->IsTheHole()); |
| 684 get(i)->Verify(); | 684 get(i)->Verify(); |
| (...skipping 13 matching lines...) Expand all Loading... |
| 698 ASSERT(e->IsUndefined()); | 698 ASSERT(e->IsUndefined()); |
| 699 } | 699 } |
| 700 } | 700 } |
| 701 } | 701 } |
| 702 } | 702 } |
| 703 | 703 |
| 704 | 704 |
| 705 #endif // DEBUG | 705 #endif // DEBUG |
| 706 | 706 |
| 707 } } // namespace v8::internal | 707 } } // namespace v8::internal |
| OLD | NEW |