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

Side by Side Diff: pkg/compiler/lib/src/js_backend/backend_impact.dart

Issue 1416253002: Remove requiredTypes (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 2 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) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 dart2js.js_helpers.impact; 5 library dart2js.js_helpers.impact;
6 6
7 import '../common/names.dart' show 7 import '../common/names.dart' show
8 Identifiers; 8 Identifiers;
9 import '../compiler.dart' show 9 import '../compiler.dart' show
10 Compiler; 10 Compiler;
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 find(JavaScriptMapConstant.DART_CLASS), 144 find(JavaScriptMapConstant.DART_CLASS),
145 find(JavaScriptMapConstant.DART_PROTO_CLASS), 145 find(JavaScriptMapConstant.DART_PROTO_CLASS),
146 find(JavaScriptMapConstant.DART_STRING_CLASS), 146 find(JavaScriptMapConstant.DART_STRING_CLASS),
147 find(JavaScriptMapConstant.DART_GENERAL_CLASS)]); 147 find(JavaScriptMapConstant.DART_GENERAL_CLASS)]);
148 } 148 }
149 149
150 BackendImpact get symbolConstructor => new BackendImpact( 150 BackendImpact get symbolConstructor => new BackendImpact(
151 staticUses: [ 151 staticUses: [
152 helpers.compiler.symbolValidatedConstructor]); 152 helpers.compiler.symbolValidatedConstructor]);
153 153
154 BackendImpact get constSymbol => new BackendImpact(
155 instantiatedClasses: [
sigurdm 2015/10/22 09:18:03 Formatting looks weird
Johnni Winther 2015/10/22 10:31:55 But consistent through-out the file. The formattin
156 compiler.symbolClass],
157 staticUses: [
158 compiler.symbolConstructor.declaration]);
154 159
155 BackendImpact get incDecOperation => 160 BackendImpact get incDecOperation =>
156 needsInt('Needed for the `+ 1` or `- 1` operation of ++/--.'); 161 needsInt('Needed for the `+ 1` or `- 1` operation of ++/--.');
157 162
158 /// Helper for registering that `int` is needed. 163 /// Helper for registering that `int` is needed.
159 BackendImpact needsInt(String reason) { 164 BackendImpact needsInt(String reason) {
160 // TODO(johnniwinther): Register [reason] for use in dump-info. 165 // TODO(johnniwinther): Register [reason] for use in dump-info.
161 return new BackendImpact( 166 return new BackendImpact(
162 instantiatedClasses: [helpers.compiler.intClass]); 167 instantiatedClasses: [helpers.compiler.intClass]);
163 } 168 }
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 staticUses: [ 218 staticUses: [
214 helpers.cyclicThrowHelper]); 219 helpers.cyclicThrowHelper]);
215 220
216 BackendImpact get typeLiteral => new BackendImpact( 221 BackendImpact get typeLiteral => new BackendImpact(
217 instantiatedClasses: [ 222 instantiatedClasses: [
218 backend.typeImplementation], 223 backend.typeImplementation],
219 staticUses: [ 224 staticUses: [
220 helpers.createRuntimeType]); 225 helpers.createRuntimeType]);
221 226
222 BackendImpact get stackTraceInCatch => new BackendImpact( 227 BackendImpact get stackTraceInCatch => new BackendImpact(
228 instantiatedClasses: [
229 helpers.compiler.stackTraceClass],
223 staticUses: [ 230 staticUses: [
224 helpers.traceFromException]); 231 helpers.traceFromException]);
225 232
226 BackendImpact get syncForIn => new BackendImpact( 233 BackendImpact get syncForIn => new BackendImpact(
227 // The SSA builder recognizes certain for-in loops and can generate calls 234 // The SSA builder recognizes certain for-in loops and can generate calls
228 // to throwConcurrentModificationError. 235 // to throwConcurrentModificationError.
229 staticUses: [ 236 staticUses: [
230 helpers.checkConcurrentModificationError]); 237 helpers.checkConcurrentModificationError]);
231 238
232 BackendImpact get typeVariableExpression => new BackendImpact( 239 BackendImpact get typeVariableExpression => new BackendImpact(
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 BackendImpact get functionTypeCheck => new BackendImpact( 286 BackendImpact get functionTypeCheck => new BackendImpact(
280 staticUses: [ 287 staticUses: [
281 helpers.functionTypeTestMetaHelper]); 288 helpers.functionTypeTestMetaHelper]);
282 289
283 BackendImpact get nativeTypeCheck => new BackendImpact( 290 BackendImpact get nativeTypeCheck => new BackendImpact(
284 staticUses: [ 291 staticUses: [
285 // We will neeed to add the "$is" and "$as" properties on the 292 // We will neeed to add the "$is" and "$as" properties on the
286 // JavaScript object prototype, so we make sure 293 // JavaScript object prototype, so we make sure
287 // [:defineProperty:] is compiled. 294 // [:defineProperty:] is compiled.
288 helpers.defineProperty]); 295 helpers.defineProperty]);
296
297 BackendImpact get closure => new BackendImpact(
298 instantiatedClasses: [
299 helpers.compiler.functionClass]);
289 } 300 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698