| 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 12 matching lines...) Expand all Loading... |
| 23 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 23 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 27 | 27 |
| 28 #include "v8.h" | 28 #include "v8.h" |
| 29 | 29 |
| 30 #include "disassembler.h" | 30 #include "disassembler.h" |
| 31 #include "disasm.h" | 31 #include "disasm.h" |
| 32 #include "macro-assembler.h" | 32 #include "macro-assembler.h" |
| 33 #include "jsregexp.h" |
| 33 | 34 |
| 34 namespace v8 { namespace internal { | 35 namespace v8 { namespace internal { |
| 35 | 36 |
| 36 #ifdef DEBUG | 37 #ifdef DEBUG |
| 37 | 38 |
| 38 static const char* TypeToString(InstanceType type); | 39 static const char* TypeToString(InstanceType type); |
| 39 | 40 |
| 40 | 41 |
| 41 void Object::Print() { | 42 void Object::Print() { |
| 42 if (IsSmi()) { | 43 if (IsSmi()) { |
| (...skipping 646 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 689 void JSRegExp::JSRegExpVerify() { | 690 void JSRegExp::JSRegExpVerify() { |
| 690 JSObjectVerify(); | 691 JSObjectVerify(); |
| 691 ASSERT(data()->IsUndefined() || data()->IsFixedArray()); | 692 ASSERT(data()->IsUndefined() || data()->IsFixedArray()); |
| 692 switch (TypeTag()) { | 693 switch (TypeTag()) { |
| 693 case JSRegExp::ATOM: { | 694 case JSRegExp::ATOM: { |
| 694 FixedArray* arr = FixedArray::cast(data()); | 695 FixedArray* arr = FixedArray::cast(data()); |
| 695 ASSERT(arr->get(JSRegExp::kAtomPatternIndex)->IsString()); | 696 ASSERT(arr->get(JSRegExp::kAtomPatternIndex)->IsString()); |
| 696 break; | 697 break; |
| 697 } | 698 } |
| 698 case JSRegExp::IRREGEXP: { | 699 case JSRegExp::IRREGEXP: { |
| 699 bool is_native = FLAG_regexp_native; | 700 bool is_native = RegExpImpl::UseNativeRegexp(); |
| 700 #ifdef ARM | 701 |
| 701 // No native regexp on arm yet. | |
| 702 is_native = false; | |
| 703 #endif | |
| 704 FixedArray* arr = FixedArray::cast(data()); | 702 FixedArray* arr = FixedArray::cast(data()); |
| 705 Object* ascii_data = arr->get(JSRegExp::kIrregexpASCIICodeIndex); | 703 Object* ascii_data = arr->get(JSRegExp::kIrregexpASCIICodeIndex); |
| 706 ASSERT(ascii_data->IsTheHole() | 704 ASSERT(ascii_data->IsTheHole() |
| 707 || (is_native ? ascii_data->IsCode() : ascii_data->IsByteArray())); | 705 || (is_native ? ascii_data->IsCode() : ascii_data->IsByteArray())); |
| 708 Object* uc16_data = arr->get(JSRegExp::kIrregexpUC16CodeIndex); | 706 Object* uc16_data = arr->get(JSRegExp::kIrregexpUC16CodeIndex); |
| 709 ASSERT(uc16_data->IsTheHole() | 707 ASSERT(uc16_data->IsTheHole() |
| 710 || (is_native ? uc16_data->IsCode() : uc16_data->IsByteArray())); | 708 || (is_native ? uc16_data->IsCode() : uc16_data->IsByteArray())); |
| 711 ASSERT(arr->get(JSRegExp::kIrregexpCaptureCountIndex)->IsSmi()); | 709 ASSERT(arr->get(JSRegExp::kIrregexpCaptureCountIndex)->IsSmi()); |
| 712 ASSERT(arr->get(JSRegExp::kIrregexpMaxRegisterCountIndex)->IsSmi()); | 710 ASSERT(arr->get(JSRegExp::kIrregexpMaxRegisterCountIndex)->IsSmi()); |
| 713 break; | 711 break; |
| (...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1088 } | 1086 } |
| 1089 current = hash; | 1087 current = hash; |
| 1090 } | 1088 } |
| 1091 return true; | 1089 return true; |
| 1092 } | 1090 } |
| 1093 | 1091 |
| 1094 | 1092 |
| 1095 #endif // DEBUG | 1093 #endif // DEBUG |
| 1096 | 1094 |
| 1097 } } // namespace v8::internal | 1095 } } // namespace v8::internal |
| OLD | NEW |