OLD | NEW |
1 // Copyright 2006-2009 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2009 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 4720 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4731 | 4731 |
4732 if (StringShape(lhs).IsSequentialAscii() && | 4732 if (StringShape(lhs).IsSequentialAscii() && |
4733 StringShape(rhs).IsSequentialAscii()) { | 4733 StringShape(rhs).IsSequentialAscii()) { |
4734 const char* str1 = SeqAsciiString::cast(lhs)->GetChars(); | 4734 const char* str1 = SeqAsciiString::cast(lhs)->GetChars(); |
4735 const char* str2 = SeqAsciiString::cast(rhs)->GetChars(); | 4735 const char* str2 = SeqAsciiString::cast(rhs)->GetChars(); |
4736 return CompareRawStringContents(Vector<const char>(str1, len), | 4736 return CompareRawStringContents(Vector<const char>(str1, len), |
4737 Vector<const char>(str2, len)); | 4737 Vector<const char>(str2, len)); |
4738 } | 4738 } |
4739 | 4739 |
4740 if (lhs->IsFlat()) { | 4740 if (lhs->IsFlat()) { |
4741 if (IsAsciiRepresentation()) { | 4741 if (lhs->IsAsciiRepresentation()) { |
4742 Vector<const char> vec1 = lhs->ToAsciiVector(); | 4742 Vector<const char> vec1 = lhs->ToAsciiVector(); |
4743 if (rhs->IsFlat()) { | 4743 if (rhs->IsFlat()) { |
4744 if (rhs->IsAsciiRepresentation()) { | 4744 if (rhs->IsAsciiRepresentation()) { |
4745 Vector<const char> vec2 = rhs->ToAsciiVector(); | 4745 Vector<const char> vec2 = rhs->ToAsciiVector(); |
4746 return CompareRawStringContents(vec1, vec2); | 4746 return CompareRawStringContents(vec1, vec2); |
4747 } else { | 4747 } else { |
4748 VectorIterator<char> buf1(vec1); | 4748 VectorIterator<char> buf1(vec1); |
4749 VectorIterator<uc16> ib(rhs->ToUC16Vector()); | 4749 VectorIterator<uc16> ib(rhs->ToUC16Vector()); |
4750 return CompareStringContents(&buf1, &ib); | 4750 return CompareStringContents(&buf1, &ib); |
4751 } | 4751 } |
(...skipping 4059 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8811 if (break_point_objects()->IsUndefined()) return 0; | 8811 if (break_point_objects()->IsUndefined()) return 0; |
8812 // Single beak point. | 8812 // Single beak point. |
8813 if (!break_point_objects()->IsFixedArray()) return 1; | 8813 if (!break_point_objects()->IsFixedArray()) return 1; |
8814 // Multiple break points. | 8814 // Multiple break points. |
8815 return FixedArray::cast(break_point_objects())->length(); | 8815 return FixedArray::cast(break_point_objects())->length(); |
8816 } | 8816 } |
8817 #endif | 8817 #endif |
8818 | 8818 |
8819 | 8819 |
8820 } } // namespace v8::internal | 8820 } } // namespace v8::internal |
OLD | NEW |