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

Unified Diff: pkg/compiler/lib/src/ssa/locals_handler.dart

Issue 2925443002: Use failedAt in more places (ssa) (Closed)
Patch Set: Created 3 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 side-by-side diff with in-line comments
Download patch
Index: pkg/compiler/lib/src/ssa/locals_handler.dart
diff --git a/pkg/compiler/lib/src/ssa/locals_handler.dart b/pkg/compiler/lib/src/ssa/locals_handler.dart
index 378e6a5814b37227b94d0a9f06e121fce0919239..dccc72ec378fc3f00e673df830ce5a2b7323f663 100644
--- a/pkg/compiler/lib/src/ssa/locals_handler.dart
+++ b/pkg/compiler/lib/src/ssa/locals_handler.dart
@@ -202,8 +202,8 @@ class LocalsHandler {
/// Invariant: [function] must be an implementation element.
void startFunction(MemberEntity element, ast.Node node,
{bool isGenerativeConstructorBody}) {
- assert(invariant(
- element, !(element is MemberElement && !element.isImplementation)));
+ assert(!(element is MemberElement && !element.isImplementation),
+ failedAt(element));
closureData = _closureToClassMapper.getMemberMap(element);
if (element is MethodElement) {
@@ -387,9 +387,10 @@ class LocalsHandler {
// the other one would not know it is just a copy of the real
// parameter.
if (local is ParameterElement) {
- assert(invariant(local, builder.parameters.containsKey(local),
- message: "No local value for parameter $local in "
- "${builder.parameters}."));
+ assert(
+ builder.parameters.containsKey(local),
+ failedAt(local,
+ "No local value for parameter $local in ${builder.parameters}."));
return builder.parameters[local];
}

Powered by Google App Engine
This is Rietveld 408576698