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

Side by Side Diff: pkg/compiler/lib/src/universe/use.dart

Issue 2647613004: Use entities in code_emitter_task (Closed)
Patch Set: Updated cf. comments Created 3 years, 11 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/ssa/builder_kernel.dart ('k') | no next file » | 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 /// This library defines individual world impacts. 5 /// This library defines individual world impacts.
6 /// 6 ///
7 /// We call these building blocks `uses`. Each `use` is a single impact of the 7 /// We call these building blocks `uses`. Each `use` is a single impact of the
8 /// world. Some example uses are: 8 /// world. Some example uses are:
9 /// 9 ///
10 /// * an invocation of a top level function 10 /// * an invocation of a top level function
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 "or boxed field.")); 322 "or boxed field."));
323 return new StaticUse.internal(element, StaticUseKind.FIELD_SET); 323 return new StaticUse.internal(element, StaticUseKind.FIELD_SET);
324 } 324 }
325 325
326 /// Read of a local function [element]. 326 /// Read of a local function [element].
327 factory StaticUse.closure(LocalFunctionElement element) { 327 factory StaticUse.closure(LocalFunctionElement element) {
328 return new StaticUse.internal(element, StaticUseKind.CLOSURE); 328 return new StaticUse.internal(element, StaticUseKind.CLOSURE);
329 } 329 }
330 330
331 /// Unknown use of [element]. 331 /// Unknown use of [element].
332 ///
333 /// Avoid using this, if possible: Use one of the other constructor which more
334 /// precisely capture why [element] is used.
332 @deprecated 335 @deprecated
333 factory StaticUse.foreignUse(Entity element) { 336 factory StaticUse.foreignUse(Entity element) {
334 return new StaticUse.internal(element, StaticUseKind.GENERAL); 337 return new StaticUse.internal(element, StaticUseKind.GENERAL);
335 } 338 }
336 339
337 /// Direct use of [element] as done with `--analyze-all` and `--analyze-main`. 340 /// Direct use of [element] as done with `--analyze-all` and `--analyze-main`.
338 factory StaticUse.directUse(Entity element) { 341 factory StaticUse.directUse(Entity element) {
339 return new StaticUse.internal(element, StaticUseKind.DIRECT_USE); 342 return new StaticUse.internal(element, StaticUseKind.DIRECT_USE);
340 } 343 }
341 344
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
411 } 414 }
412 415
413 bool operator ==(other) { 416 bool operator ==(other) {
414 if (identical(this, other)) return true; 417 if (identical(this, other)) return true;
415 if (other is! TypeUse) return false; 418 if (other is! TypeUse) return false;
416 return type == other.type && kind == other.kind; 419 return type == other.type && kind == other.kind;
417 } 420 }
418 421
419 String toString() => 'TypeUse($type,$kind)'; 422 String toString() => 'TypeUse($type,$kind)';
420 } 423 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/ssa/builder_kernel.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698