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

Unified Diff: runtime/vm/precompiler.cc

Issue 1404163002: VM: Precompile method extractors for implicit and explicit closurization. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: fix hash-closurization Created 5 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 | « runtime/vm/parser.cc ('k') | runtime/vm/resolver.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/precompiler.cc
diff --git a/runtime/vm/precompiler.cc b/runtime/vm/precompiler.cc
index f061da02c6905080a973bca7316e9dec985b45da..1d42c5d104395e6a8732e6d7eb6f0477324abd2b 100644
--- a/runtime/vm/precompiler.cc
+++ b/runtime/vm/precompiler.cc
@@ -591,6 +591,10 @@ void Precompiler::CheckForNewDynamicFunctions() {
function2 = function.ImplicitClosureFunction();
AddFunction(function2);
+
+ // Add corresponding method extractor get:#foo.
+ function2 = function.GetMethodExtractor(selector3);
+ AddFunction(function2);
}
} else if (Field::IsSetterName(selector)) {
selector2 = Symbols::LookupFromConcat(Symbols::ClosurizePrefix(),
@@ -602,6 +606,10 @@ void Precompiler::CheckForNewDynamicFunctions() {
function2 = function.ImplicitClosureFunction();
AddFunction(function2);
+
+ // Add corresponding method extractor get:#set:foo.
+ function2 = function.GetMethodExtractor(selector2);
+ AddFunction(function2);
}
} else if (function.kind() == RawFunction::kRegularFunction) {
selector2 = Field::LookupGetterSymbol(selector);
@@ -610,6 +618,10 @@ void Precompiler::CheckForNewDynamicFunctions() {
// Function is foo and somewhere get:foo is called.
function2 = function.ImplicitClosureFunction();
AddFunction(function2);
+
+ // Add corresponding method extractor.
+ function2 = function.GetMethodExtractor(selector2);
+ AddFunction(function2);
}
selector2 = Symbols::LookupFromConcat(Symbols::ClosurizePrefix(),
selector);
@@ -618,6 +630,10 @@ void Precompiler::CheckForNewDynamicFunctions() {
// Function is foo and somewhere get:#foo is called.
function2 = function.ImplicitClosureFunction();
AddFunction(function2);
+
+ // Add corresponding method extractor get:#foo
+ function2 = function.GetMethodExtractor(selector2);
+ AddFunction(function2);
}
}
}
« no previous file with comments | « runtime/vm/parser.cc ('k') | runtime/vm/resolver.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698