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

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

Issue 1173403002: dart2js: Fix hints in code base. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Updated to latest revision Created 5 years, 6 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 'constants/expressions.dart'; 7 import 'constants/expressions.dart';
8 import 'dart2jslib.dart'; 8 import 'dart2jslib.dart';
9 import 'dart_types.dart'; 9 import 'dart_types.dart';
10 import 'elements/elements.dart'; 10 import 'elements/elements.dart';
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 } else { 81 } else {
82 throw new SpannableAssertionFailure( 82 throw new SpannableAssertionFailure(
83 closure, 'Not a closure: $closure (${closure.runtimeType}).'); 83 closure, 'Not a closure: $closure (${closure.runtimeType}).');
84 } 84 }
85 compiler.enqueuer.codegen.forgetElement(cls); 85 compiler.enqueuer.codegen.forgetElement(cls);
86 } 86 }
87 } 87 }
88 88
89 /// Common interface for [BoxFieldElement] and [ClosureFieldElement] as 89 /// Common interface for [BoxFieldElement] and [ClosureFieldElement] as
90 /// non-elements. 90 /// non-elements.
91 abstract class CapturedVariable {} 91 abstract class CapturedVariable implements Element {}
92 92
93 // TODO(ahe): These classes continuously cause problems. We need to 93 // TODO(ahe): These classes continuously cause problems. We need to
94 // find a more general solution. 94 // find a more general solution.
95 class ClosureFieldElement extends ElementX 95 class ClosureFieldElement extends ElementX
96 implements FieldElement, CapturedVariable { 96 implements FieldElement, CapturedVariable {
97 /// The [BoxLocal] or [LocalElement] being accessed through the field. 97 /// The [BoxLocal] or [LocalElement] being accessed through the field.
98 final Local local; 98 final Local local;
99 99
100 ClosureFieldElement(String name, 100 ClosureFieldElement(String name,
101 this.local, 101 this.local,
(...skipping 1009 matching lines...) Expand 10 before | Expand all | Expand 10 after
1111 1111
1112 String get name => typeVariable.name; 1112 String get name => typeVariable.name;
1113 1113
1114 int get hashCode => typeVariable.hashCode; 1114 int get hashCode => typeVariable.hashCode;
1115 1115
1116 bool operator ==(other) { 1116 bool operator ==(other) {
1117 if (other is! TypeVariableLocal) return false; 1117 if (other is! TypeVariableLocal) return false;
1118 return typeVariable == other.typeVariable; 1118 return typeVariable == other.typeVariable;
1119 } 1119 }
1120 } 1120 }
OLDNEW
« no previous file with comments | « no previous file | pkg/compiler/lib/src/compile_time_constants.dart » ('j') | pkg/compiler/lib/src/source_file_provider.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698