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

Unified Diff: regexp2000/src/objects-inl.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/objects-debug.cc ('k') | regexp2000/src/parser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: regexp2000/src/objects-inl.h
diff --git a/regexp2000/src/objects-inl.h b/regexp2000/src/objects-inl.h
index 03448fdf38affde42d6a63ab0ba1fe56165dbdbd..e2981675e487a518e551e909a84767db89a2803e 100644
--- a/regexp2000/src/objects-inl.h
+++ b/regexp2000/src/objects-inl.h
@@ -2149,6 +2149,22 @@ JSRegExp::Type JSRegExp::TypeTag() {
}
+JSRegExp::Flags JSRegExp::GetFlags() {
+ ASSERT(this->data()->IsFixedArray());
+ Object* data = this->data();
+ Smi* smi = Smi::cast(FixedArray::cast(data)->get(kFlagsIndex));
+ return Flags(smi->value());
+}
+
+
+String* JSRegExp::Pattern() {
+ ASSERT(this->data()->IsFixedArray());
+ Object* data = this->data();
+ String* pattern= String::cast(FixedArray::cast(data)->get(kSourceIndex));
+ return pattern;
+}
+
+
Object* JSRegExp::DataAt(int index) {
ASSERT(TypeTag() != NOT_COMPILED);
return FixedArray::cast(data())->get(index);
« no previous file with comments | « regexp2000/src/objects-debug.cc ('k') | regexp2000/src/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698