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

Side by Side Diff: pkg/compiler/lib/src/closure.dart

Issue 2688413003: Extract BackendUsage, MirrorsData, and CheckedModeHelpers from Backend. (Closed)
Patch Set: Cleanup Created 3 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 unified diff | Download patch
« no previous file with comments | « no previous file | pkg/compiler/lib/src/deferred_load.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library closureToClassMapper; 5 library closureToClassMapper;
6 6
7 import 'common/names.dart' show Identifiers; 7 import 'common/names.dart' show Identifiers;
8 import 'common/resolution.dart' show ParsingContext, Resolution; 8 import 'common/resolution.dart' show ParsingContext, Resolution;
9 import 'common/tasks.dart' show CompilerTask; 9 import 'common/tasks.dart' show CompilerTask;
10 import 'common.dart'; 10 import 'common.dart';
(...skipping 1054 matching lines...) Expand 10 before | Expand all | Expand 10 after
1065 1065
1066 ClosureClassMap globalizeClosure( 1066 ClosureClassMap globalizeClosure(
1067 FunctionExpression node, LocalFunctionElement element) { 1067 FunctionExpression node, LocalFunctionElement element) {
1068 String closureName = computeClosureName(element); 1068 String closureName = computeClosureName(element);
1069 ClosureClassElement globalizedElement = 1069 ClosureClassElement globalizedElement =
1070 new ClosureClassElement(node, closureName, compiler, element); 1070 new ClosureClassElement(node, closureName, compiler, element);
1071 // Extend [globalizedElement] as an instantiated class in the closed world. 1071 // Extend [globalizedElement] as an instantiated class in the closed world.
1072 closedWorldRefiner.registerClosureClass(globalizedElement); 1072 closedWorldRefiner.registerClosureClass(globalizedElement);
1073 FunctionElement callElement = new SynthesizedCallMethodElementX( 1073 FunctionElement callElement = new SynthesizedCallMethodElementX(
1074 Identifiers.call, element, globalizedElement, node, elements); 1074 Identifiers.call, element, globalizedElement, node, elements);
1075 backend.maybeMarkClosureAsNeededForReflection( 1075 backend.mirrorsData.maybeMarkClosureAsNeededForReflection(
1076 globalizedElement, callElement, element); 1076 globalizedElement, callElement, element);
1077 MemberElement enclosing = element.memberContext; 1077 MemberElement enclosing = element.memberContext;
1078 enclosing.nestedClosures.add(callElement); 1078 enclosing.nestedClosures.add(callElement);
1079 globalizedElement.addMember(callElement, reporter); 1079 globalizedElement.addMember(callElement, reporter);
1080 globalizedElement.computeAllClassMembers(compiler.resolution); 1080 globalizedElement.computeAllClassMembers(compiler.resolution);
1081 // The nested function's 'this' is the same as the one for the outer 1081 // The nested function's 'this' is the same as the one for the outer
1082 // function. It could be [null] if we are inside a static method. 1082 // function. It could be [null] if we are inside a static method.
1083 ThisLocal thisElement = closureData.thisLocal; 1083 ThisLocal thisElement = closureData.thisLocal;
1084 1084
1085 return new ClosureClassMap( 1085 return new ClosureClassMap(
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
1212 /// 1212 ///
1213 /// Move the below classes to a JS model eventually. 1213 /// Move the below classes to a JS model eventually.
1214 /// 1214 ///
1215 abstract class JSEntity implements Entity { 1215 abstract class JSEntity implements Entity {
1216 Entity get declaredEntity; 1216 Entity get declaredEntity;
1217 } 1217 }
1218 1218
1219 abstract class PrivatelyNamedJSEntity implements JSEntity { 1219 abstract class PrivatelyNamedJSEntity implements JSEntity {
1220 Entity get rootOfScope; 1220 Entity get rootOfScope;
1221 } 1221 }
OLDNEW
« no previous file with comments | « no previous file | pkg/compiler/lib/src/deferred_load.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698