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

Unified Diff: src/jsregexp.h

Issue 155085: Separate native and interpreted regexp by compile time flag, not runtime. (Closed)
Patch Set: Addressed review comments. Adapted builds scripts. Created 11 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/flag-definitions.h ('k') | src/jsregexp.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/jsregexp.h
diff --git a/src/jsregexp.h b/src/jsregexp.h
index a86f7e648a16395b7147a2e91815546f6d818ef8..0e7965c2a287d1ef1586d4f0ea80fce73ebe4973 100644
--- a/src/jsregexp.h
+++ b/src/jsregexp.h
@@ -37,13 +37,15 @@ class RegExpMacroAssembler;
class RegExpImpl {
public:
- static inline bool UseNativeRegexp() {
-#ifdef V8_TARGET_ARCH_IA32
- return FLAG_regexp_native;
+ // Whether V8 is compiled with native regexp support or not.
+ static bool UsesNativeRegExp() {
+#ifdef V8_NATIVE_REGEXP
+ return true;
#else
- return false;
+ return false;
#endif
}
+
// Creates a regular expression literal in the old space.
// This function calls the garbage collector if necessary.
static Handle<Object> CreateRegExpLiteral(Handle<JSFunction> constructor,
@@ -148,7 +150,8 @@ class RegExpImpl {
static String* last_ascii_string_;
static String* two_byte_cached_string_;
- static bool EnsureCompiledIrregexp(Handle<JSRegExp> re, bool is_ascii);
+ static bool CompileIrregexp(Handle<JSRegExp> re, bool is_ascii);
+ static inline bool EnsureCompiledIrregexp(Handle<JSRegExp> re, bool is_ascii);
// Set the subject cache. The previous string buffer is not deleted, so the
« no previous file with comments | « src/flag-definitions.h ('k') | src/jsregexp.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698