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

Unified Diff: regexp2000/src/jsregexp.h

Issue 8765: * Use new RegExp parser. (Closed)
Patch Set: Use new RegExp parser. Created 12 years, 2 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 | « regexp2000/src/ast.cc ('k') | regexp2000/src/jsregexp.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: regexp2000/src/jsregexp.h
diff --git a/regexp2000/src/jsregexp.h b/regexp2000/src/jsregexp.h
index 7da8c655f167b63af8abacb46f3a5152a9f27582..7b2cc87c40918bfcd79742f9df7754781d89a36f 100644
--- a/regexp2000/src/jsregexp.h
+++ b/regexp2000/src/jsregexp.h
@@ -61,10 +61,19 @@ class RegExpImpl {
static Handle<Object> ExecGlobal(Handle<JSRegExp> regexp,
Handle<String> subject);
- static Handle<Object> AtomCompile(Handle<JSRegExp> re,
+ // Stores an uncompiled RegExp pattern in the JSRegExp object.
+ // It will be compiled by JSCRE when first executed.
+ static Handle<Object> JsrePrepare(Handle<JSRegExp> re,
Handle<String> pattern,
JSRegExp::Flags flags);
+ // Compile the pattern using JSCRE and store the result in the
+ // JSRegExp object.
+ static Handle<Object> JsreCompile(Handle<JSRegExp> re);
+
+ static Handle<Object> AtomCompile(Handle<JSRegExp> re,
+ Handle<String> pattern,
+ JSRegExp::Flags flags);
static Handle<Object> AtomExec(Handle<JSRegExp> regexp,
Handle<String> subject,
Handle<Object> index);
@@ -76,6 +85,7 @@ class RegExpImpl {
Handle<String> pattern,
JSRegExp::Flags flags);
+ // Execute a compiled JSCRE pattern.
static Handle<Object> JsreExec(Handle<JSRegExp> regexp,
Handle<String> subject,
Handle<Object> index);
@@ -194,7 +204,7 @@ class CharacterClass {
static const int kFieldMax = (1 << kFieldWidth);
static const int kSegmentMask = (1 << kFieldWidth) - 1;
static const int kNibbleCount = kFieldMax / 4;
- STATIC_ASSERT(kFieldMax == 8 * sizeof(uint64_t));
+ STATIC_CHECK(kFieldMax == 8 * sizeof(uint64_t));
Type type() { return type_; }
@@ -218,7 +228,7 @@ class CharacterClass {
};
-STATIC_ASSERT(sizeof(CharacterClass) == 3 * kIntSize);
+STATIC_CHECK(sizeof(CharacterClass) == 3 * kIntSize);
class CharacterClassAllocator {
« no previous file with comments | « regexp2000/src/ast.cc ('k') | regexp2000/src/jsregexp.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698