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

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

Issue 2743243003: Split MirrorsData (Closed)
Patch Set: Created 3 years, 9 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
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 1063 matching lines...) Expand 10 before | Expand all | Expand 10 after
1074 1074
1075 ClosureClassMap globalizeClosure( 1075 ClosureClassMap globalizeClosure(
1076 FunctionExpression node, LocalFunctionElement element) { 1076 FunctionExpression node, LocalFunctionElement element) {
1077 String closureName = computeClosureName(element); 1077 String closureName = computeClosureName(element);
1078 ClosureClassElement globalizedElement = 1078 ClosureClassElement globalizedElement =
1079 new ClosureClassElement(node, closureName, compiler, element); 1079 new ClosureClassElement(node, closureName, compiler, element);
1080 // Extend [globalizedElement] as an instantiated class in the closed world. 1080 // Extend [globalizedElement] as an instantiated class in the closed world.
1081 closedWorldRefiner.registerClosureClass(globalizedElement); 1081 closedWorldRefiner.registerClosureClass(globalizedElement);
1082 MethodElement callElement = new SynthesizedCallMethodElementX( 1082 MethodElement callElement = new SynthesizedCallMethodElementX(
1083 Identifiers.call, element, globalizedElement, node, elements); 1083 Identifiers.call, element, globalizedElement, node, elements);
1084 backend.mirrorsData.maybeMarkClosureAsNeededForReflection( 1084 backend.mirrorsDataBuilder.maybeMarkClosureAsNeededForReflection(
1085 globalizedElement, callElement, element); 1085 globalizedElement, callElement, element);
1086 MemberElement enclosing = element.memberContext; 1086 MemberElement enclosing = element.memberContext;
1087 enclosing.nestedClosures.add(callElement); 1087 enclosing.nestedClosures.add(callElement);
1088 globalizedElement.addMember(callElement, reporter); 1088 globalizedElement.addMember(callElement, reporter);
1089 globalizedElement.computeAllClassMembers(compiler.resolution); 1089 globalizedElement.computeAllClassMembers(compiler.resolution);
1090 // The nested function's 'this' is the same as the one for the outer 1090 // The nested function's 'this' is the same as the one for the outer
1091 // function. It could be [null] if we are inside a static method. 1091 // function. It could be [null] if we are inside a static method.
1092 ThisLocal thisElement = closureData.thisLocal; 1092 ThisLocal thisElement = closureData.thisLocal;
1093 1093
1094 return new ClosureClassMap( 1094 return new ClosureClassMap(
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
1225 /// 1225 ///
1226 /// Move the below classes to a JS model eventually. 1226 /// Move the below classes to a JS model eventually.
1227 /// 1227 ///
1228 abstract class JSEntity implements Entity { 1228 abstract class JSEntity implements Entity {
1229 Entity get declaredEntity; 1229 Entity get declaredEntity;
1230 } 1230 }
1231 1231
1232 abstract class PrivatelyNamedJSEntity implements JSEntity { 1232 abstract class PrivatelyNamedJSEntity implements JSEntity {
1233 Entity get rootOfScope; 1233 Entity get rootOfScope;
1234 } 1234 }
OLDNEW
« no previous file with comments | « no previous file | pkg/compiler/lib/src/js_backend/backend.dart » ('j') | pkg/compiler/lib/src/js_backend/impact_transformer.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698