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

Unified Diff: src/factory.cc

Issue 8104: Regexp caching (Closed)
Patch Set: 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
Index: src/factory.cc
diff --git a/src/factory.cc b/src/factory.cc
index 4e5f5da3f73a756abdfbf6b418e8c961f537a5f7..84af47e2fa6437adb1f7adf7f470e9c7c378e5e9 100644
--- a/src/factory.cc
+++ b/src/factory.cc
@@ -808,6 +808,20 @@ Handle<Map> Factory::ObjectLiteralMapFromCache(Handle<Context> context,
}
+void Factory::SetRegExpData(Handle<JSRegExp> regexp,
+ JSRegExp::Type type,
+ Handle<String> source,
+ int flags,
+ Handle<Object> data) {
+ Handle<FixedArray> store = NewFixedArray(JSRegExp::kDataSize);
+ store->set(JSRegExp::kTagIndex, Smi::FromInt(type));
+ store->set(JSRegExp::kSourceIndex, *source);
+ store->set(JSRegExp::kFlagsIndex, Smi::FromInt(flags));
+ store->set(JSRegExp::kAtomPatternIndex, *data);
+ regexp->set_data(*store);
+}
+
+
void Factory::ConfigureInstance(Handle<FunctionTemplateInfo> desc,
Handle<JSObject> instance,
bool* pending_exception) {

Powered by Google App Engine
This is Rietveld 408576698