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

Side by Side Diff: pkg/compiler/lib/src/elements/entities.dart

Issue 2985663002: Remove _nodeToEntity and _nodeToThisLocal from CapturedScopeBuilder (Closed)
Patch Set: Created 3 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 unified diff | Download patch
« no previous file with comments | « no previous file | pkg/compiler/lib/src/js_model/closure.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) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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 entities; 5 library entities;
6 6
7 import 'package:front_end/src/fasta/parser/async_modifier.dart' 7 import 'package:front_end/src/fasta/parser/async_modifier.dart'
8 show AsyncModifier; 8 show AsyncModifier;
9 9
10 import '../common.dart'; 10 import '../common.dart';
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 /// and thus implement [Local] through [LocalElement]. For non-element locals, 227 /// and thus implement [Local] through [LocalElement]. For non-element locals,
228 /// like `this` and boxes, specialized [Local] classes are created. 228 /// like `this` and boxes, specialized [Local] classes are created.
229 /// 229 ///
230 /// Type variables can introduce locals in factories and constructors 230 /// Type variables can introduce locals in factories and constructors
231 /// but since one type variable can introduce different locals in different 231 /// but since one type variable can introduce different locals in different
232 /// factories and constructors it is not itself a [Local] but instead 232 /// factories and constructors it is not itself a [Local] but instead
233 /// a non-element [Local] is created through a specialized class. 233 /// a non-element [Local] is created through a specialized class.
234 // TODO(johnniwinther): Should [Local] have `isAssignable` or `type`? 234 // TODO(johnniwinther): Should [Local] have `isAssignable` or `type`?
235 abstract class Local extends Entity { 235 abstract class Local extends Entity {
236 /// The context in which this local is defined. 236 /// The context in which this local is defined.
237 // TODO(johnniwinther): Remove this. It is only used in the AST based closure
238 // converter.
237 Entity get executableContext; 239 Entity get executableContext;
238 240
239 /// The outermost member that contains this element. 241 /// The outermost member that contains this element.
240 /// 242 ///
241 /// For top level, static or instance members, the member context is the 243 /// For top level, static or instance members, the member context is the
242 /// element itself. For parameters, local variables and nested closures, the 244 /// element itself. For parameters, local variables and nested closures, the
243 /// member context is the top level, static or instance member in which it is 245 /// member context is the top level, static or instance member in which it is
244 /// defined. 246 /// defined.
245 MemberEntity get memberContext; 247 MemberEntity get memberContext;
246 } 248 }
(...skipping 23 matching lines...) Expand all
270 /// The total number of parameters (required or optional). 272 /// The total number of parameters (required or optional).
271 int get totalParameters => positionalParameters + namedParameters.length; 273 int get totalParameters => positionalParameters + namedParameters.length;
272 274
273 /// Returns the [CallStructure] corresponding to a call site passing all 275 /// Returns the [CallStructure] corresponding to a call site passing all
274 /// parameters both required and optional. 276 /// parameters both required and optional.
275 CallStructure get callStructure { 277 CallStructure get callStructure {
276 return new CallStructure( 278 return new CallStructure(
277 positionalParameters + namedParameters.length, namedParameters); 279 positionalParameters + namedParameters.length, namedParameters);
278 } 280 }
279 } 281 }
OLDNEW
« no previous file with comments | « no previous file | pkg/compiler/lib/src/js_model/closure.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698