| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 // Implements RegExp.prototype.toString, see ECMA-262 section 15.10.6.4. | 64 // Implements RegExp.prototype.toString, see ECMA-262 section 15.10.6.4. |
| 65 // This function calls the garbage collector if necessary. | 65 // This function calls the garbage collector if necessary. |
| 66 static Handle<String> ToString(Handle<Object> value); | 66 static Handle<String> ToString(Handle<Object> value); |
| 67 | 67 |
| 68 // Parses the RegExp pattern and prepares the JSRegExp object with | 68 // Parses the RegExp pattern and prepares the JSRegExp object with |
| 69 // generic data and choice of implementation - as well as what | 69 // generic data and choice of implementation - as well as what |
| 70 // the implementation wants to store in the data field. | 70 // the implementation wants to store in the data field. |
| 71 // Returns false if compilation fails. | 71 // Returns false if compilation fails. |
| 72 static Handle<Object> Compile(Handle<JSRegExp> re, | 72 static Handle<Object> Compile(Handle<JSRegExp> re, |
| 73 Handle<String> pattern, | 73 Handle<String> pattern, |
| 74 Handle<String> flags, | 74 Handle<String> flags); |
| 75 Zone* zone); | |
| 76 | 75 |
| 77 // See ECMA-262 section 15.10.6.2. | 76 // See ECMA-262 section 15.10.6.2. |
| 78 // This function calls the garbage collector if necessary. | 77 // This function calls the garbage collector if necessary. |
| 79 static Handle<Object> Exec(Handle<JSRegExp> regexp, | 78 static Handle<Object> Exec(Handle<JSRegExp> regexp, |
| 80 Handle<String> subject, | 79 Handle<String> subject, |
| 81 int index, | 80 int index, |
| 82 Handle<JSArray> lastMatchInfo); | 81 Handle<JSArray> lastMatchInfo); |
| 83 | 82 |
| 84 // Prepares a JSRegExp object with Irregexp-specific data. | 83 // Prepares a JSRegExp object with Irregexp-specific data. |
| 85 static void IrregexpInitialize(Handle<JSRegExp> re, | 84 static void IrregexpInitialize(Handle<JSRegExp> re, |
| (...skipping 1528 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1614 Handle<String> sample_subject, | 1613 Handle<String> sample_subject, |
| 1615 bool is_ascii, Zone* zone); | 1614 bool is_ascii, Zone* zone); |
| 1616 | 1615 |
| 1617 static void DotPrint(const char* label, RegExpNode* node, bool ignore_case); | 1616 static void DotPrint(const char* label, RegExpNode* node, bool ignore_case); |
| 1618 }; | 1617 }; |
| 1619 | 1618 |
| 1620 | 1619 |
| 1621 } } // namespace v8::internal | 1620 } } // namespace v8::internal |
| 1622 | 1621 |
| 1623 #endif // V8_JSREGEXP_H_ | 1622 #endif // V8_JSREGEXP_H_ |
| OLD | NEW |