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

Unified Diff: runtime/vm/regexp.cc

Issue 1295973002: Store the RegExp and the string specialization cid in an Array in RawFunction::data_. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 4 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 | « runtime/vm/raw_object_snapshot.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/regexp.cc
diff --git a/runtime/vm/regexp.cc b/runtime/vm/regexp.cc
index db115a5791e8989770b0b9fa24465eea0ebdebea..f20e0152394524874477d4045732db9a31864d4f 100644
--- a/runtime/vm/regexp.cc
+++ b/runtime/vm/regexp.cc
@@ -5017,7 +5017,7 @@ RegExpEngine::CompilationResult RegExpEngine::CompileIR(
Zone* zone = Thread::Current()->zone();
const Function& function = parsed_function->function();
- const intptr_t specialization_cid = function.regexp_cid();
+ const intptr_t specialization_cid = function.string_specialization_cid();
const bool is_one_byte = (specialization_cid == kOneByteStringCid ||
specialization_cid == kExternalOneByteStringCid);
JSRegExp& regexp = JSRegExp::Handle(zone, function.regexp());
@@ -5284,8 +5284,7 @@ static void CreateSpecializedFunction(Zone* zone,
// Cache the result.
regexp.set_function(specialization_cid, fn);
- fn.set_regexp(regexp);
- fn.set_regexp_cid(specialization_cid);
+ fn.SetRegExpData(regexp, specialization_cid);
fn.set_is_debuggable(false);
// The function is compiled lazily during the first call.
« no previous file with comments | « runtime/vm/raw_object_snapshot.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698