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

Side by Side Diff: src/jsregexp.h

Issue 42115: Faster string.replace with regexp pattern. (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/objects-inl.h » ('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 18 matching lines...) Expand all
29 #define V8_JSREGEXP_H_ 29 #define V8_JSREGEXP_H_
30 30
31 namespace v8 { namespace internal { 31 namespace v8 { namespace internal {
32 32
33 33
34 class RegExpMacroAssembler; 34 class RegExpMacroAssembler;
35 35
36 36
37 class RegExpImpl { 37 class RegExpImpl {
38 public: 38 public:
39 static inline bool UseNativeRegexp() {
40 #ifdef ARM
41 return false;
42 #else
43 return FLAG_regexp_native;
44 #endif
45 }
39 // Creates a regular expression literal in the old space. 46 // Creates a regular expression literal in the old space.
40 // This function calls the garbage collector if necessary. 47 // This function calls the garbage collector if necessary.
41 static Handle<Object> CreateRegExpLiteral(Handle<JSFunction> constructor, 48 static Handle<Object> CreateRegExpLiteral(Handle<JSFunction> constructor,
42 Handle<String> pattern, 49 Handle<String> pattern,
43 Handle<String> flags, 50 Handle<String> flags,
44 bool* has_pending_exception); 51 bool* has_pending_exception);
45 52
46 // Returns a string representation of a regular expression. 53 // Returns a string representation of a regular expression.
47 // Implements RegExp.prototype.toString, see ECMA-262 section 15.10.6.4. 54 // Implements RegExp.prototype.toString, see ECMA-262 section 15.10.6.4.
48 // This function calls the garbage collector if necessary. 55 // This function calls the garbage collector if necessary.
(...skipping 1331 matching lines...) Expand 10 before | Expand all | Expand 10 after
1380 Handle<String> pattern, 1387 Handle<String> pattern,
1381 bool is_ascii); 1388 bool is_ascii);
1382 1389
1383 static void DotPrint(const char* label, RegExpNode* node, bool ignore_case); 1390 static void DotPrint(const char* label, RegExpNode* node, bool ignore_case);
1384 }; 1391 };
1385 1392
1386 1393
1387 } } // namespace v8::internal 1394 } } // namespace v8::internal
1388 1395
1389 #endif // V8_JSREGEXP_H_ 1396 #endif // V8_JSREGEXP_H_
OLDNEW
« no previous file with comments | « no previous file | src/jsregexp.cc » ('j') | src/objects-inl.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698