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

Unified Diff: src/objects-inl.h

Issue 28311: Flattened the representation of compiled RegExp data. (Closed)
Patch Set: ... and it lints. Created 11 years, 10 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
« src/jsregexp.cc ('K') | « src/objects-debug.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects-inl.h
diff --git a/src/objects-inl.h b/src/objects-inl.h
index 66ca97ef42fbe7a78e061d8a2e3e53167e86ad60..da331c2df77f388dad959da662c8ccb7b584fffc 100644
--- a/src/objects-inl.h
+++ b/src/objects-inl.h
@@ -2337,6 +2337,13 @@ Object* JSRegExp::DataAt(int index) {
}
+void JSRegExp::SetDataAt(int index, Object* value) {
+ ASSERT(TypeTag() != NOT_COMPILED);
+ ASSERT(index >= kDataIndex); // Only implementation data can be set this way.
+ FixedArray::cast(data())->set(index, value);
+}
+
+
bool JSObject::HasFastElements() {
return !elements()->IsDictionary();
}
« src/jsregexp.cc ('K') | « src/objects-debug.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698