| 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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 // Execute an Irregexp bytecode pattern. | 101 // Execute an Irregexp bytecode pattern. |
| 102 static Handle<Object> IrregexpExec(Handle<JSRegExp> regexp, | 102 static Handle<Object> IrregexpExec(Handle<JSRegExp> regexp, |
| 103 Handle<String> subject, | 103 Handle<String> subject, |
| 104 int index, | 104 int index, |
| 105 Handle<JSArray> lastMatchInfo); | 105 Handle<JSArray> lastMatchInfo); |
| 106 | 106 |
| 107 static Handle<Object> IrregexpExecGlobal(Handle<JSRegExp> regexp, | 107 static Handle<Object> IrregexpExecGlobal(Handle<JSRegExp> regexp, |
| 108 Handle<String> subject, | 108 Handle<String> subject, |
| 109 Handle<JSArray> lastMatchInfo); | 109 Handle<JSArray> lastMatchInfo); |
| 110 | 110 |
| 111 static void NewSpaceCollectionPrologue(); | |
| 112 static void OldSpaceCollectionPrologue(); | |
| 113 | |
| 114 // Converts a source string to a 16 bit flat string. The string | |
| 115 // will be either sequential or it will be a SlicedString backed | |
| 116 // by a flat string. | |
| 117 static Handle<String> StringToTwoByte(Handle<String> pattern); | |
| 118 static Handle<String> CachedStringToTwoByte(Handle<String> pattern); | |
| 119 | |
| 120 // Offsets in the lastMatchInfo array. | 111 // Offsets in the lastMatchInfo array. |
| 121 static const int kLastCaptureCount = 0; | 112 static const int kLastCaptureCount = 0; |
| 122 static const int kLastSubject = 1; | 113 static const int kLastSubject = 1; |
| 123 static const int kLastInput = 2; | 114 static const int kLastInput = 2; |
| 124 static const int kFirstCapture = 1; | 115 static const int kFirstCapture = 1; |
| 125 static const int kLastMatchOverhead = 3; | 116 static const int kLastMatchOverhead = 3; |
| 126 | 117 |
| 127 // Used to access the lastMatchInfo array. | 118 // Used to access the lastMatchInfo array. |
| 128 static int GetCapture(FixedArray* array, int index) { | 119 static int GetCapture(FixedArray* array, int index) { |
| 129 return Smi::cast(array->get(index + kFirstCapture))->value(); | 120 return Smi::cast(array->get(index + kFirstCapture))->value(); |
| (...skipping 1260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1390 Handle<String> pattern, | 1381 Handle<String> pattern, |
| 1391 bool is_ascii); | 1382 bool is_ascii); |
| 1392 | 1383 |
| 1393 static void DotPrint(const char* label, RegExpNode* node, bool ignore_case); | 1384 static void DotPrint(const char* label, RegExpNode* node, bool ignore_case); |
| 1394 }; | 1385 }; |
| 1395 | 1386 |
| 1396 | 1387 |
| 1397 } } // namespace v8::internal | 1388 } } // namespace v8::internal |
| 1398 | 1389 |
| 1399 #endif // V8_JSREGEXP_H_ | 1390 #endif // V8_JSREGEXP_H_ |
| OLD | NEW |