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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 Handle<String> pattern, | 68 Handle<String> pattern, |
69 Handle<String> flags); | 69 Handle<String> flags); |
70 | 70 |
71 // See ECMA-262 section 15.10.6.2. | 71 // See ECMA-262 section 15.10.6.2. |
72 // This function calls the garbage collector if necessary. | 72 // This function calls the garbage collector if necessary. |
73 static Handle<Object> Exec(Handle<JSRegExp> regexp, | 73 static Handle<Object> Exec(Handle<JSRegExp> regexp, |
74 Handle<String> subject, | 74 Handle<String> subject, |
75 int index, | 75 int index, |
76 Handle<JSArray> lastMatchInfo); | 76 Handle<JSArray> lastMatchInfo); |
77 | 77 |
78 // Call RegExp.prototyp.exec(string) in a loop. | |
79 // Used by String.prototype.match and String.prototype.replace. | |
80 // This function calls the garbage collector if necessary. | |
81 static Handle<Object> ExecGlobal(Handle<JSRegExp> regexp, | |
82 Handle<String> subject, | |
83 Handle<JSArray> lastMatchInfo); | |
84 | |
85 // Prepares a JSRegExp object with Irregexp-specific data. | 78 // Prepares a JSRegExp object with Irregexp-specific data. |
86 static void IrregexpPrepare(Handle<JSRegExp> re, | 79 static void IrregexpPrepare(Handle<JSRegExp> re, |
87 Handle<String> pattern, | 80 Handle<String> pattern, |
88 JSRegExp::Flags flags, | 81 JSRegExp::Flags flags, |
89 int capture_register_count); | 82 int capture_register_count); |
90 | 83 |
91 | 84 |
92 static void AtomCompile(Handle<JSRegExp> re, | 85 static void AtomCompile(Handle<JSRegExp> re, |
93 Handle<String> pattern, | 86 Handle<String> pattern, |
94 JSRegExp::Flags flags, | 87 JSRegExp::Flags flags, |
(...skipping 1184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1279 Handle<String> pattern, | 1272 Handle<String> pattern, |
1280 bool is_ascii); | 1273 bool is_ascii); |
1281 | 1274 |
1282 static void DotPrint(const char* label, RegExpNode* node, bool ignore_case); | 1275 static void DotPrint(const char* label, RegExpNode* node, bool ignore_case); |
1283 }; | 1276 }; |
1284 | 1277 |
1285 | 1278 |
1286 } } // namespace v8::internal | 1279 } } // namespace v8::internal |
1287 | 1280 |
1288 #endif // V8_JSREGEXP_H_ | 1281 #endif // V8_JSREGEXP_H_ |
OLD | NEW |