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 675 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
686 | 686 |
687 void JSRegExp::JSRegExpVerify() { | 687 void JSRegExp::JSRegExpVerify() { |
688 JSObjectVerify(); | 688 JSObjectVerify(); |
689 ASSERT(data()->IsUndefined() || data()->IsFixedArray()); | 689 ASSERT(data()->IsUndefined() || data()->IsFixedArray()); |
690 switch (TypeTag()) { | 690 switch (TypeTag()) { |
691 case JSRegExp::ATOM: { | 691 case JSRegExp::ATOM: { |
692 FixedArray* arr = FixedArray::cast(data()); | 692 FixedArray* arr = FixedArray::cast(data()); |
693 ASSERT(arr->get(JSRegExp::kAtomPatternIndex)->IsString()); | 693 ASSERT(arr->get(JSRegExp::kAtomPatternIndex)->IsString()); |
694 break; | 694 break; |
695 } | 695 } |
696 case JSRegExp::JSCRE: { | |
697 FixedArray* arr = FixedArray::cast(data()); | |
698 Object* jscre_data = arr->get(JSRegExp::kJscreDataIndex); | |
699 ASSERT(jscre_data->IsFixedArray() || jscre_data->IsUndefined()); | |
700 break; | |
701 } | |
702 case JSRegExp::IRREGEXP: { | 696 case JSRegExp::IRREGEXP: { |
703 FixedArray* arr = FixedArray::cast(data()); | 697 FixedArray* arr = FixedArray::cast(data()); |
704 Object* jscre_data = arr->get(JSRegExp::kJscreDataIndex); | 698 Object* irregexp_data = arr->get(JSRegExp::kIrregexpDataIndex); |
705 ASSERT(jscre_data->IsFixedArray()); | 699 ASSERT(irregexp_data->IsFixedArray()); |
706 break; | 700 break; |
707 } | 701 } |
708 default: | 702 default: |
709 ASSERT_EQ(JSRegExp::NOT_COMPILED, TypeTag()); | 703 ASSERT_EQ(JSRegExp::NOT_COMPILED, TypeTag()); |
710 ASSERT(data()->IsUndefined()); | 704 ASSERT(data()->IsUndefined()); |
711 break; | 705 break; |
712 } | 706 } |
713 } | 707 } |
714 | 708 |
715 | 709 |
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1081 } | 1075 } |
1082 current = hash; | 1076 current = hash; |
1083 } | 1077 } |
1084 return true; | 1078 return true; |
1085 } | 1079 } |
1086 | 1080 |
1087 | 1081 |
1088 #endif // DEBUG | 1082 #endif // DEBUG |
1089 | 1083 |
1090 } } // namespace v8::internal | 1084 } } // namespace v8::internal |
OLD | NEW |