| 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 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 static void SetCapture(FixedArray* array, int index, int to) { | 132 static void SetCapture(FixedArray* array, int index, int to) { |
| 133 array->set(index + kFirstCapture, Smi::FromInt(to)); | 133 array->set(index + kFirstCapture, Smi::FromInt(to)); |
| 134 } | 134 } |
| 135 | 135 |
| 136 private: | 136 private: |
| 137 static String* last_ascii_string_; | 137 static String* last_ascii_string_; |
| 138 static String* two_byte_cached_string_; | 138 static String* two_byte_cached_string_; |
| 139 | 139 |
| 140 static bool EnsureCompiledIrregexp(Handle<JSRegExp> re, bool is_ascii); | 140 static bool EnsureCompiledIrregexp(Handle<JSRegExp> re, bool is_ascii); |
| 141 | 141 |
| 142 static int IrregexpMaxRegisterCount(Handle<FixedArray> re); | 142 static int IrregexpMaxRegisterCount(FixedArray* re); |
| 143 static void SetIrregexpMaxRegisterCount(Handle<FixedArray> re, int value); | 143 static void SetIrregexpMaxRegisterCount(FixedArray* re, int value); |
| 144 static int IrregexpNumberOfCaptures(Handle<FixedArray> re); | 144 static int IrregexpNumberOfCaptures(FixedArray* re); |
| 145 static int IrregexpNumberOfRegisters(Handle<FixedArray> re); | 145 static int IrregexpNumberOfRegisters(FixedArray* re); |
| 146 static Handle<ByteArray> IrregexpByteCode(Handle<FixedArray> re, | 146 static ByteArray* IrregexpByteCode(FixedArray* re, bool is_ascii); |
| 147 bool is_ascii); | 147 static Code* IrregexpNativeCode(FixedArray* re, bool is_ascii); |
| 148 static Handle<Code> IrregexpNativeCode(Handle<FixedArray> re, bool is_ascii); | |
| 149 | 148 |
| 150 // On a successful match, the result is a JSArray containing | 149 // On a successful match, the result is a JSArray containing |
| 151 // captured positions. On a failure, the result is the null value. | 150 // captured positions. On a failure, the result is the null value. |
| 152 // Returns an empty handle in case of an exception. | 151 // Returns an empty handle in case of an exception. |
| 153 static Handle<Object> IrregexpExecOnce(Handle<FixedArray> regexp, | 152 static Handle<Object> IrregexpExecOnce(Handle<FixedArray> regexp, |
| 154 int num_captures, | 153 int num_captures, |
| 155 Handle<JSArray> lastMatchInfo, | 154 Handle<JSArray> lastMatchInfo, |
| 156 Handle<String> subject16, | 155 Handle<String> subject16, |
| 157 int previous_index, | 156 int previous_index, |
| 158 int* ovector, | 157 int* ovector, |
| (...skipping 1216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1375 Handle<String> pattern, | 1374 Handle<String> pattern, |
| 1376 bool is_ascii); | 1375 bool is_ascii); |
| 1377 | 1376 |
| 1378 static void DotPrint(const char* label, RegExpNode* node, bool ignore_case); | 1377 static void DotPrint(const char* label, RegExpNode* node, bool ignore_case); |
| 1379 }; | 1378 }; |
| 1380 | 1379 |
| 1381 | 1380 |
| 1382 } } // namespace v8::internal | 1381 } } // namespace v8::internal |
| 1383 | 1382 |
| 1384 #endif // V8_JSREGEXP_H_ | 1383 #endif // V8_JSREGEXP_H_ |
| OLD | NEW |