| 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 680 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 691 ASSERT(data()->IsUndefined() || data()->IsFixedArray()); | 691 ASSERT(data()->IsUndefined() || data()->IsFixedArray()); |
| 692 switch (TypeTag()) { | 692 switch (TypeTag()) { |
| 693 case JSRegExp::ATOM: { | 693 case JSRegExp::ATOM: { |
| 694 FixedArray* arr = FixedArray::cast(data()); | 694 FixedArray* arr = FixedArray::cast(data()); |
| 695 ASSERT(arr->get(JSRegExp::kAtomPatternIndex)->IsString()); | 695 ASSERT(arr->get(JSRegExp::kAtomPatternIndex)->IsString()); |
| 696 break; | 696 break; |
| 697 } | 697 } |
| 698 case JSRegExp::IRREGEXP: { | 698 case JSRegExp::IRREGEXP: { |
| 699 FixedArray* arr = FixedArray::cast(data()); | 699 FixedArray* arr = FixedArray::cast(data()); |
| 700 Object* ascii_data = arr->get(JSRegExp::kIrregexpASCIICodeIndex); | 700 Object* ascii_data = arr->get(JSRegExp::kIrregexpASCIICodeIndex); |
| 701 Object* uc16_data = arr->get(JSRegExp::kIrregexpUC16CodeIndex); |
| 702 #ifdef ARM |
| 703 ASSERT(ascii_data->IsTheHole() || ascii_data->IsByteArray()); |
| 704 ASSERT(uc16_data->IsTheHole() || uc16_data->IsByteArray()); |
| 705 #else |
| 701 ASSERT(ascii_data->IsTheHole() | 706 ASSERT(ascii_data->IsTheHole() |
| 702 || (FLAG_regexp_native ? | 707 || (FLAG_regexp_native ? |
| 703 ascii_data->IsCode() | 708 ascii_data->IsCode() |
| 704 : ascii_data->IsByteArray())); | 709 : ascii_data->IsByteArray())); |
| 705 Object* uc16_data = arr->get(JSRegExp::kIrregexpUC16CodeIndex); | |
| 706 ASSERT(uc16_data->IsTheHole() | 710 ASSERT(uc16_data->IsTheHole() |
| 707 || (FLAG_regexp_native ? | 711 || (FLAG_regexp_native ? |
| 708 uc16_data->IsCode() | 712 uc16_data->IsCode() |
| 709 : uc16_data->IsByteArray())); | 713 : uc16_data->IsByteArray())); |
| 714 #endif |
| 710 ASSERT(arr->get(JSRegExp::kIrregexpCaptureCountIndex)->IsSmi()); | 715 ASSERT(arr->get(JSRegExp::kIrregexpCaptureCountIndex)->IsSmi()); |
| 711 ASSERT(arr->get(JSRegExp::kIrregexpMaxRegisterCountIndex)->IsSmi()); | 716 ASSERT(arr->get(JSRegExp::kIrregexpMaxRegisterCountIndex)->IsSmi()); |
| 712 break; | 717 break; |
| 713 } | 718 } |
| 714 default: | 719 default: |
| 715 ASSERT_EQ(JSRegExp::NOT_COMPILED, TypeTag()); | 720 ASSERT_EQ(JSRegExp::NOT_COMPILED, TypeTag()); |
| 716 ASSERT(data()->IsUndefined()); | 721 ASSERT(data()->IsUndefined()); |
| 717 break; | 722 break; |
| 718 } | 723 } |
| 719 } | 724 } |
| (...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1087 } | 1092 } |
| 1088 current = hash; | 1093 current = hash; |
| 1089 } | 1094 } |
| 1090 return true; | 1095 return true; |
| 1091 } | 1096 } |
| 1092 | 1097 |
| 1093 | 1098 |
| 1094 #endif // DEBUG | 1099 #endif // DEBUG |
| 1095 | 1100 |
| 1096 } } // namespace v8::internal | 1101 } } // namespace v8::internal |
| OLD | NEW |