Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(286)

Side by Side Diff: src/jsregexp.h

Issue 39010: Removed some handlers and made regexp.test avoid creating a result array. (Closed)
Patch Set: Created 11 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | src/jsregexp.cc » ('j') | src/jsregexp.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « no previous file | src/jsregexp.cc » ('j') | src/jsregexp.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698