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 751 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 762 case JSRegExp::ATOM: { | 762 case JSRegExp::ATOM: { |
| 763 FixedArray* arr = FixedArray::cast(data()); | 763 FixedArray* arr = FixedArray::cast(data()); |
| 764 ASSERT(arr->get(JSRegExp::kAtomPatternIndex)->IsString()); | 764 ASSERT(arr->get(JSRegExp::kAtomPatternIndex)->IsString()); |
| 765 break; | 765 break; |
| 766 } | 766 } |
| 767 case JSRegExp::IRREGEXP: { | 767 case JSRegExp::IRREGEXP: { |
| 768 bool is_native = RegExpImpl::UsesNativeRegExp(); | 768 bool is_native = RegExpImpl::UsesNativeRegExp(); |
| 769 | 769 |
| 770 FixedArray* arr = FixedArray::cast(data()); | 770 FixedArray* arr = FixedArray::cast(data()); |
| 771 Object* ascii_data = arr->get(JSRegExp::kIrregexpASCIICodeIndex); | 771 Object* ascii_data = arr->get(JSRegExp::kIrregexpASCIICodeIndex); |
| 772 ASSERT(ascii_data->IsTheHole() | 772 // TheHole : Not compiled yet. |
| 773 // JSObject: Compilation error. | |
| 774 // Code/ByteArray: Compiled code. | |
| 775 ASSERT(ascii_data->IsTheHole() || ascii_data->IsJSObject() | |
| 773 || (is_native ? ascii_data->IsCode() : ascii_data->IsByteArray())); | 776 || (is_native ? ascii_data->IsCode() : ascii_data->IsByteArray())); |
|
Mads Ager (chromium)
2009/09/02 08:15:14
Put the || on the previous line and indent:
ASSER
| |
| 774 Object* uc16_data = arr->get(JSRegExp::kIrregexpUC16CodeIndex); | 777 Object* uc16_data = arr->get(JSRegExp::kIrregexpUC16CodeIndex); |
| 775 ASSERT(uc16_data->IsTheHole() | 778 ASSERT(uc16_data->IsTheHole() || ascii_data->IsJSObject() |
| 776 || (is_native ? uc16_data->IsCode() : uc16_data->IsByteArray())); | 779 || (is_native ? uc16_data->IsCode() : uc16_data->IsByteArray())); |
|
Mads Ager (chromium)
2009/09/02 08:15:14
Indentation as above.
| |
| 777 ASSERT(arr->get(JSRegExp::kIrregexpCaptureCountIndex)->IsSmi()); | 780 ASSERT(arr->get(JSRegExp::kIrregexpCaptureCountIndex)->IsSmi()); |
| 778 ASSERT(arr->get(JSRegExp::kIrregexpMaxRegisterCountIndex)->IsSmi()); | 781 ASSERT(arr->get(JSRegExp::kIrregexpMaxRegisterCountIndex)->IsSmi()); |
| 779 break; | 782 break; |
| 780 } | 783 } |
| 781 default: | 784 default: |
| 782 ASSERT_EQ(JSRegExp::NOT_COMPILED, TypeTag()); | 785 ASSERT_EQ(JSRegExp::NOT_COMPILED, TypeTag()); |
| 783 ASSERT(data()->IsUndefined()); | 786 ASSERT(data()->IsUndefined()); |
| 784 break; | 787 break; |
| 785 } | 788 } |
| 786 } | 789 } |
| (...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1156 } | 1159 } |
| 1157 current = hash; | 1160 current = hash; |
| 1158 } | 1161 } |
| 1159 return true; | 1162 return true; |
| 1160 } | 1163 } |
| 1161 | 1164 |
| 1162 | 1165 |
| 1163 #endif // DEBUG | 1166 #endif // DEBUG |
| 1164 | 1167 |
| 1165 } } // namespace v8::internal | 1168 } } // namespace v8::internal |
| OLD | NEW |