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

Unified Diff: runtime/vm/parser.cc

Issue 2164323002: Remove unnecessary capturing code from the Parser::CreateImplicitClosureNode. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 5 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/parser.cc
diff --git a/runtime/vm/parser.cc b/runtime/vm/parser.cc
index 9e7dcbd1018e1dc13c38c4658be6dc6e8392012b..f46e5a34d4df2d65aa2a782ad7ad6392d88a8c81 100644
--- a/runtime/vm/parser.cc
+++ b/runtime/vm/parser.cc
@@ -2406,19 +2406,6 @@ ClosureNode* Parser::CreateImplicitClosureNode(const Function& func,
AstNode* receiver) {
Function& implicit_closure_function =
Function::ZoneHandle(Z, func.ImplicitClosureFunction());
- if (receiver != NULL) {
- // If we create an implicit instance closure from inside a closure of a
- // parameterized class, make sure that the receiver is captured as
- // instantiator.
- if (FunctionLevel() > 0) {
- const Type& signature_type = Type::Handle(Z,
- implicit_closure_function.SignatureType());
- const Class& scope_class = Class::Handle(Z, signature_type.type_class());
- if (scope_class.IsGeneric()) {
- CaptureInstantiator();
- }
- }
- }
return new ClosureNode(token_pos, implicit_closure_function, receiver, NULL);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698