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

Unified Diff: pkg/compiler/lib/src/common/resolution.dart

Issue 1859343004: dartfmt pkg/compiler (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/compiler/lib/src/common/registry.dart ('k') | pkg/compiler/lib/src/common/tasks.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/common/resolution.dart
diff --git a/pkg/compiler/lib/src/common/resolution.dart b/pkg/compiler/lib/src/common/resolution.dart
index 7c675afe9413ad947702acacc926ce0b9494ff88..b55e195814ddd4657051eea50448523ed11d7e25 100644
--- a/pkg/compiler/lib/src/common/resolution.dart
+++ b/pkg/compiler/lib/src/common/resolution.dart
@@ -1,4 +1,3 @@
-
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
@@ -6,49 +5,36 @@
library dart2js.common.resolution;
import '../common.dart';
-import '../compiler.dart' show
- Compiler;
-import '../constants/expressions.dart' show
- ConstantExpression;
-import '../core_types.dart' show
- CoreTypes;
-import '../dart_types.dart' show
- DartType,
- InterfaceType;
-import '../elements/elements.dart' show
- AstElement,
- ClassElement,
- Element,
- ErroneousElement,
- FunctionElement,
- FunctionSignature,
- LocalFunctionElement,
- MetadataAnnotation,
- MethodElement,
- TypedefElement,
- TypeVariableElement;
-import '../enqueue.dart' show
- ResolutionEnqueuer;
-import '../options.dart' show
- ParserOptions;
-import '../parser/element_listener.dart' show
- ScannerOptions;
-import '../tree/tree.dart' show
- AsyncForIn,
- Send,
- TypeAnnotation;
-import '../universe/world_impact.dart' show
- WorldImpact;
-import 'work.dart' show
- ItemCompilationContext,
- WorkItem;
+import '../compiler.dart' show Compiler;
+import '../constants/expressions.dart' show ConstantExpression;
+import '../core_types.dart' show CoreTypes;
+import '../dart_types.dart' show DartType, InterfaceType;
+import '../elements/elements.dart'
+ show
+ AstElement,
+ ClassElement,
+ Element,
+ ErroneousElement,
+ FunctionElement,
+ FunctionSignature,
+ LocalFunctionElement,
+ MetadataAnnotation,
+ MethodElement,
+ TypedefElement,
+ TypeVariableElement;
+import '../enqueue.dart' show ResolutionEnqueuer;
+import '../options.dart' show ParserOptions;
+import '../parser/element_listener.dart' show ScannerOptions;
+import '../tree/tree.dart' show AsyncForIn, Send, TypeAnnotation;
+import '../universe/world_impact.dart' show WorldImpact;
+import 'work.dart' show ItemCompilationContext, WorkItem;
/// [WorkItem] used exclusively by the [ResolutionEnqueuer].
class ResolutionWorkItem extends WorkItem {
bool _isAnalyzed = false;
- ResolutionWorkItem(AstElement element,
- ItemCompilationContext compilationContext)
+ ResolutionWorkItem(
+ AstElement element, ItemCompilationContext compilationContext)
: super(element, compilationContext);
WorldImpact run(Compiler compiler, ResolutionEnqueuer world) {
@@ -77,48 +63,69 @@ class ResolutionImpact extends WorldImpact {
enum Feature {
/// Invocation of a generative construction on an abstract class.
ABSTRACT_CLASS_INSTANTIATION,
+
/// An assert statement with no message.
ASSERT,
+
/// An assert statement with a message.
ASSERT_WITH_MESSAGE,
+
/// A method with an `async` body modifier.
ASYNC,
+
/// An asynchronous for in statement like `await for (var e in i) {}`.
ASYNC_FOR_IN,
+
/// A method with an `async*` body modifier.
ASYNC_STAR,
+
/// A catch statement.
CATCH_STATEMENT,
+
/// A compile time error.
COMPILE_TIME_ERROR,
+
/// A fall through in a switch case.
FALL_THROUGH_ERROR,
+
/// A ++/-- operation.
INC_DEC_OPERATION,
+
/// A field whose initialization is not a constant.
LAZY_FIELD,
+
/// A catch clause with a variable for the stack trace.
STACK_TRACE_IN_CATCH,
+
/// String interpolation.
STRING_INTERPOLATION,
+
/// String juxtaposition.
STRING_JUXTAPOSITION,
+
/// An implicit call to `super.noSuchMethod`, like calling an unresolved
/// super method.
SUPER_NO_SUCH_METHOD,
+
/// A redirection to the `Symbol` constructor.
SYMBOL_CONSTRUCTOR,
+
/// An synchronous for in statement, like `for (var e in i) {}`.
SYNC_FOR_IN,
+
/// A method with a `sync*` body modifier.
SYNC_STAR,
+
/// A throw expression.
THROW_EXPRESSION,
+
/// An implicit throw of a `NoSuchMethodError`, like calling an unresolved
/// static method.
THROW_NO_SUCH_METHOD,
+
/// An implicit throw of a runtime error, like
THROW_RUNTIME_ERROR,
+
/// The need for a type variable bound check, like instantiation of a generic
/// type whose type variable have non-trivial bounds.
TYPE_VARIABLE_BOUNDS_CHECK,
@@ -133,8 +140,7 @@ class MapLiteralUse {
MapLiteralUse(this.type, {this.isConstant: false, this.isEmpty: false});
int get hashCode {
- return
- type.hashCode * 13 +
+ return type.hashCode * 13 +
isConstant.hashCode * 17 +
isEmpty.hashCode * 19;
}
@@ -142,8 +148,7 @@ class MapLiteralUse {
bool operator ==(other) {
if (identical(this, other)) return true;
if (other is! MapLiteralUse) return false;
- return
- type == other.type &&
+ return type == other.type &&
isConstant == other.isConstant &&
isEmpty == other.isEmpty;
}
@@ -162,8 +167,7 @@ class ListLiteralUse {
ListLiteralUse(this.type, {this.isConstant: false, this.isEmpty: false});
int get hashCode {
- return
- type.hashCode * 13 +
+ return type.hashCode * 13 +
isConstant.hashCode * 17 +
isEmpty.hashCode * 19;
}
@@ -171,8 +175,7 @@ class ListLiteralUse {
bool operator ==(other) {
if (identical(this, other)) return true;
if (other is! ListLiteralUse) return false;
- return
- type == other.type &&
+ return type == other.type &&
isConstant == other.isConstant &&
isEmpty == other.isEmpty;
}
@@ -233,4 +236,4 @@ abstract class Parsing {
measure(f());
ScannerOptions getScannerOptionsFor(Element element);
ParserOptions get parserOptions;
-}
+}
« no previous file with comments | « pkg/compiler/lib/src/common/registry.dart ('k') | pkg/compiler/lib/src/common/tasks.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698