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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 135 // Direct offset into the lastMatchInfo array. | 135 // Direct offset into the lastMatchInfo array. |
| 136 static const int kLastCaptureCountOffset = | 136 static const int kLastCaptureCountOffset = |
| 137 FixedArray::kHeaderSize + kLastCaptureCount * kPointerSize; | 137 FixedArray::kHeaderSize + kLastCaptureCount * kPointerSize; |
| 138 static const int kLastSubjectOffset = | 138 static const int kLastSubjectOffset = |
| 139 FixedArray::kHeaderSize + kLastSubject * kPointerSize; | 139 FixedArray::kHeaderSize + kLastSubject * kPointerSize; |
| 140 static const int kLastInputOffset = | 140 static const int kLastInputOffset = |
| 141 FixedArray::kHeaderSize + kLastInput * kPointerSize; | 141 FixedArray::kHeaderSize + kLastInput * kPointerSize; |
| 142 static const int kFirstCaptureOffset = | 142 static const int kFirstCaptureOffset = |
| 143 FixedArray::kHeaderSize + kFirstCapture * kPointerSize; | 143 FixedArray::kHeaderSize + kFirstCapture * kPointerSize; |
| 144 | 144 |
| 145 static bool IsAtom(FixedArray* array) { | |
|
fschneider
2010/03/25 10:26:06
Is this function ever called?
Lasse Reichstein
2010/03/26 11:18:26
I don't think so. I switched to using JSRegExp::Is
| |
| 146 Smi* tag = Smi::cast(array->get(JSRegExp::kTagIndex)); | |
| 147 return tag == Smi::FromInt(JSRegExp::ATOM); | |
| 148 } | |
| 149 | |
| 145 // Used to access the lastMatchInfo array. | 150 // Used to access the lastMatchInfo array. |
| 146 static int GetCapture(FixedArray* array, int index) { | 151 static int GetCapture(FixedArray* array, int index) { |
| 147 return Smi::cast(array->get(index + kFirstCapture))->value(); | 152 return Smi::cast(array->get(index + kFirstCapture))->value(); |
| 148 } | 153 } |
| 149 | 154 |
| 150 static void SetLastCaptureCount(FixedArray* array, int to) { | 155 static void SetLastCaptureCount(FixedArray* array, int to) { |
| 151 array->set(kLastCaptureCount, Smi::FromInt(to)); | 156 array->set(kLastCaptureCount, Smi::FromInt(to)); |
| 152 } | 157 } |
| 153 | 158 |
| 154 static void SetLastSubject(FixedArray* array, String* to) { | 159 static void SetLastSubject(FixedArray* array, String* to) { |
| (...skipping 1299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1454 int offsets_vector_length_; | 1459 int offsets_vector_length_; |
| 1455 static int static_offsets_vector_[kStaticOffsetsVectorSize]; | 1460 static int static_offsets_vector_[kStaticOffsetsVectorSize]; |
| 1456 | 1461 |
| 1457 friend class ExternalReference; | 1462 friend class ExternalReference; |
| 1458 }; | 1463 }; |
| 1459 | 1464 |
| 1460 | 1465 |
| 1461 } } // namespace v8::internal | 1466 } } // namespace v8::internal |
| 1462 | 1467 |
| 1463 #endif // V8_JSREGEXP_H_ | 1468 #endif // V8_JSREGEXP_H_ |
| OLD | NEW |