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

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

Issue 2898403002: Use failedAt in more places (Closed)
Patch Set: merge; address 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
OLDNEW
1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2017, 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 js_backend.backend.impact_transformer; 5 library js_backend.backend.impact_transformer;
6 6
7 import '../common.dart'; 7 import '../common.dart';
8 import '../common_elements.dart'; 8 import '../common_elements.dart';
9 import '../common/backend_api.dart' show ImpactTransformer; 9 import '../common/backend_api.dart' show ImpactTransformer;
10 import '../common/codegen.dart' show CodegenImpact; 10 import '../common/codegen.dart' show CodegenImpact;
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 case ConstantExpressionKind.INT: 256 case ConstantExpressionKind.INT:
257 registerImpact(_impacts.intLiteral); 257 registerImpact(_impacts.intLiteral);
258 break; 258 break;
259 case ConstantExpressionKind.DOUBLE: 259 case ConstantExpressionKind.DOUBLE:
260 registerImpact(_impacts.doubleLiteral); 260 registerImpact(_impacts.doubleLiteral);
261 break; 261 break;
262 case ConstantExpressionKind.STRING: 262 case ConstantExpressionKind.STRING:
263 registerImpact(_impacts.stringLiteral); 263 registerImpact(_impacts.stringLiteral);
264 break; 264 break;
265 default: 265 default:
266 assert(invariant(NO_LOCATION_SPANNABLE, false, 266 assert(
267 message: "Unexpected constant literal: ${constant.kind}.")); 267 false,
268 failedAt(NO_LOCATION_SPANNABLE,
269 "Unexpected constant literal: ${constant.kind}."));
268 } 270 }
269 } 271 }
270 272
271 for (native.NativeBehavior behavior in worldImpact.nativeData) { 273 for (native.NativeBehavior behavior in worldImpact.nativeData) {
272 _nativeResolutionEnqueuer.registerNativeBehavior( 274 _nativeResolutionEnqueuer.registerNativeBehavior(
273 transformed, behavior, worldImpact); 275 transformed, behavior, worldImpact);
274 } 276 }
275 277
276 return transformed; 278 return transformed;
277 } 279 }
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
467 _impacts.asyncStarBody 469 _impacts.asyncStarBody
468 .registerImpact(transformed, _elementEnvironment); 470 .registerImpact(transformed, _elementEnvironment);
469 break; 471 break;
470 } 472 }
471 } 473 }
472 474
473 // TODO(johnniwinther): Remove eager registration. 475 // TODO(johnniwinther): Remove eager registration.
474 return transformed; 476 return transformed;
475 } 477 }
476 } 478 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/js_backend/field_naming_mixin.dart ('k') | pkg/compiler/lib/src/js_backend/minify_namer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698