| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef V8_JSREGEXP_H_ | 5 #ifndef V8_JSREGEXP_H_ |
| 6 #define V8_JSREGEXP_H_ | 6 #define V8_JSREGEXP_H_ |
| 7 | 7 |
| 8 #include "src/allocation.h" | 8 #include "src/allocation.h" |
| 9 #include "src/assembler.h" | 9 #include "src/assembler.h" |
| 10 #include "src/zone-inl.h" | 10 #include "src/zone-inl.h" |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 | 39 |
| 40 // Returns a string representation of a regular expression. | 40 // Returns a string representation of a regular expression. |
| 41 // Implements RegExp.prototype.toString, see ECMA-262 section 15.10.6.4. | 41 // Implements RegExp.prototype.toString, see ECMA-262 section 15.10.6.4. |
| 42 // This function calls the garbage collector if necessary. | 42 // This function calls the garbage collector if necessary. |
| 43 static Handle<String> ToString(Handle<Object> value); | 43 static Handle<String> ToString(Handle<Object> value); |
| 44 | 44 |
| 45 // Parses the RegExp pattern and prepares the JSRegExp object with | 45 // Parses the RegExp pattern and prepares the JSRegExp object with |
| 46 // generic data and choice of implementation - as well as what | 46 // generic data and choice of implementation - as well as what |
| 47 // the implementation wants to store in the data field. | 47 // the implementation wants to store in the data field. |
| 48 // Returns false if compilation fails. | 48 // Returns false if compilation fails. |
| 49 MUST_USE_RESULT static MaybeHandle<Object> Compile( | 49 MUST_USE_RESULT static MaybeHandle<Object> Compile(Handle<JSRegExp> re, |
| 50 Handle<JSRegExp> re, | 50 Handle<String> pattern, |
| 51 Handle<String> pattern, | 51 JSRegExp::Flags flags); |
| 52 Handle<String> flags); | |
| 53 | 52 |
| 54 // See ECMA-262 section 15.10.6.2. | 53 // See ECMA-262 section 15.10.6.2. |
| 55 // This function calls the garbage collector if necessary. | 54 // This function calls the garbage collector if necessary. |
| 56 MUST_USE_RESULT static MaybeHandle<Object> Exec( | 55 MUST_USE_RESULT static MaybeHandle<Object> Exec( |
| 57 Handle<JSRegExp> regexp, | 56 Handle<JSRegExp> regexp, |
| 58 Handle<String> subject, | 57 Handle<String> subject, |
| 59 int index, | 58 int index, |
| 60 Handle<JSArray> lastMatchInfo); | 59 Handle<JSArray> lastMatchInfo); |
| 61 | 60 |
| 62 // Prepares a JSRegExp object with Irregexp-specific data. | 61 // Prepares a JSRegExp object with Irregexp-specific data. |
| (...skipping 1603 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1666 Handle<String> sample_subject, | 1665 Handle<String> sample_subject, |
| 1667 bool is_one_byte, Zone* zone); | 1666 bool is_one_byte, Zone* zone); |
| 1668 | 1667 |
| 1669 static void DotPrint(const char* label, RegExpNode* node, bool ignore_case); | 1668 static void DotPrint(const char* label, RegExpNode* node, bool ignore_case); |
| 1670 }; | 1669 }; |
| 1671 | 1670 |
| 1672 | 1671 |
| 1673 } } // namespace v8::internal | 1672 } } // namespace v8::internal |
| 1674 | 1673 |
| 1675 #endif // V8_JSREGEXP_H_ | 1674 #endif // V8_JSREGEXP_H_ |
| OLD | NEW |