Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 641 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 652 | 652 |
| 653 void JSArray::JSArrayVerify() { | 653 void JSArray::JSArrayVerify() { |
| 654 JSObjectVerify(); | 654 JSObjectVerify(); |
| 655 ASSERT(length()->IsNumber() || length()->IsUndefined()); | 655 ASSERT(length()->IsNumber() || length()->IsUndefined()); |
| 656 ASSERT(elements()->IsUndefined() || elements()->IsFixedArray()); | 656 ASSERT(elements()->IsUndefined() || elements()->IsFixedArray()); |
| 657 } | 657 } |
| 658 | 658 |
| 659 | 659 |
| 660 void JSRegExp::JSRegExpVerify() { | 660 void JSRegExp::JSRegExpVerify() { |
| 661 JSObjectVerify(); | 661 JSObjectVerify(); |
| 662 ASSERT(type()->IsSmi() || type()->IsUndefined()); | 662 ASSERT(data()->IsUndefined() || data()->IsFixedArray()); |
| 663 if (type()->IsSmi()) { | 663 switch (TypeTag()) { |
| 664 switch (type_tag()) { | 664 case JSRegExp::ATOM: { |
|
Kasper Lund
2008/10/24 06:42:50
Indent switch cases by two spaces.
| |
| 665 case JSRegExp::JSCRE: | 665 FixedArray* arr = FixedArray::cast(data()); |
| 666 ASSERT(data()->IsFixedArray()); | 666 ASSERT(arr->get(JSRegExp::kAtomPatternIndex)->IsString()); |
| 667 break; | 667 break; |
| 668 default: | 668 } |
| 669 ASSERT_EQ(JSRegExp::ATOM, type_tag()); | 669 case JSRegExp::JSCRE: { |
| 670 ASSERT(data()->IsString()); | 670 FixedArray* arr = FixedArray::cast(data()); |
| 671 break; | 671 ASSERT(arr->get(JSRegExp::kJscreDataIndex)->IsFixedArray()); |
| 672 } | 672 break; |
| 673 } else { | 673 } |
| 674 default: | |
| 675 ASSERT_EQ(JSRegExp::NOT_COMPILED, TypeTag()); | |
| 674 ASSERT(data()->IsUndefined()); | 676 ASSERT(data()->IsUndefined()); |
| 677 break; | |
| 675 } | 678 } |
| 676 } | 679 } |
| 677 | 680 |
| 678 | 681 |
| 679 void Proxy::ProxyPrint() { | 682 void Proxy::ProxyPrint() { |
| 680 PrintF("proxy to %p", proxy()); | 683 PrintF("proxy to %p", proxy()); |
| 681 } | 684 } |
| 682 | 685 |
| 683 | 686 |
| 684 void Proxy::ProxyVerify() { | 687 void Proxy::ProxyVerify() { |
| (...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1044 } | 1047 } |
| 1045 current = hash; | 1048 current = hash; |
| 1046 } | 1049 } |
| 1047 return true; | 1050 return true; |
| 1048 } | 1051 } |
| 1049 | 1052 |
| 1050 | 1053 |
| 1051 #endif // DEBUG | 1054 #endif // DEBUG |
| 1052 | 1055 |
| 1053 } } // namespace v8::internal | 1056 } } // namespace v8::internal |
| OLD | NEW |