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

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

Issue 2894893002: Add ElementCodegenWorldBuilder (Closed)
Patch Set: Updated cf. comments. Created 3 years, 7 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 | « pkg/compiler/lib/src/compiler.dart ('k') | pkg/compiler/lib/src/js_backend/backend.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 '../common.dart'; 7 import '../common.dart';
8 import '../universe/call_structure.dart' show CallStructure;
8 9
9 /// Abstract interface for entities. 10 /// Abstract interface for entities.
10 /// 11 ///
11 /// Implement this directly if the entity is not a Dart language entity. 12 /// Implement this directly if the entity is not a Dart language entity.
12 /// Entities defined within the Dart language should implement [Element]. 13 /// Entities defined within the Dart language should implement [Element].
13 /// 14 ///
14 /// For instance, the JavaScript backend need to create synthetic variables for 15 /// For instance, the JavaScript backend need to create synthetic variables for
15 /// calling intercepted classes and such variables do not correspond to an 16 /// calling intercepted classes and such variables do not correspond to an
16 /// entity in the Dart source code nor in the terminology of the Dart language 17 /// entity in the Dart source code nor in the terminology of the Dart language
17 /// and should therefore implement [Entity] directly. 18 /// and should therefore implement [Entity] directly.
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 const ParameterStructure( 177 const ParameterStructure(
177 this.requiredParameters, this.positionalParameters, this.namedParameters); 178 this.requiredParameters, this.positionalParameters, this.namedParameters);
178 179
179 const ParameterStructure.getter() : this(0, 0, const <String>[]); 180 const ParameterStructure.getter() : this(0, 0, const <String>[]);
180 181
181 const ParameterStructure.setter() : this(1, 1, const <String>[]); 182 const ParameterStructure.setter() : this(1, 1, const <String>[]);
182 183
183 /// The number of optional parameters (positional or named). 184 /// The number of optional parameters (positional or named).
184 int get optionalParameters => 185 int get optionalParameters =>
185 positionalParameters - requiredParameters + namedParameters.length; 186 positionalParameters - requiredParameters + namedParameters.length;
187
188 /// Returns the [CallStructure] corresponding to a call site passing all
189 /// parameters both required and optional.
190 CallStructure get callStructure {
191 return new CallStructure(
192 positionalParameters + namedParameters.length, namedParameters);
193 }
186 } 194 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/compiler.dart ('k') | pkg/compiler/lib/src/js_backend/backend.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698