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

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

Issue 1525603002: Associate compile-time errors with elements (Closed) Base URL: git@github.com:dart-lang/sdk.git@_temporary_fletch_patches
Patch Set: Created 5 years 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/builder.dart
diff --git a/pkg/compiler/lib/src/ssa/builder.dart b/pkg/compiler/lib/src/ssa/builder.dart
index 0945568cfec8ca52f74c4eecf1ca669123a40266..1f49e96cdbc3d2a896af63253021617e4dec4601 100644
--- a/pkg/compiler/lib/src/ssa/builder.dart
+++ b/pkg/compiler/lib/src/ssa/builder.dart
@@ -1348,7 +1348,8 @@ class SsaBuilder extends ast.Visitor
// Ensure that [element] is an implementation element.
element = element.implementation;
- if (compiler.elementHasCompileTimeError(element)) return false;
+ if (compiler.generateCodeWithCompileTimeErrors &&
+ compiler.elementHasCompileTimeError(element)) return false;
Johnni Winther 2015/12/14 11:31:20 Add brace around `return false;` now that the stat
sigurdm 2015/12/14 12:07:43 Done.
FunctionElement function = element;
bool insideLoop = loopNesting > 0 || graph.calledInLoop;
@@ -2129,7 +2130,8 @@ class SsaBuilder extends ast.Visitor
assert(invariant(classElement, classElement.isImplementation));
classElement.forEachInstanceField(
(ClassElement enclosingClass, VariableElement member) {
- if (compiler.elementHasCompileTimeError(member)) return;
+ if (compiler.generateCodeWithCompileTimeErrors &&
+ compiler.elementHasCompileTimeError(member)) return;
Johnni Winther 2015/12/14 11:31:20 Ditto.
sigurdm 2015/12/14 12:07:43 Done.
reporter.withCurrentElement(member, () {
TreeElements definitions = member.treeElements;
ast.Node node = member.node;
@@ -5129,7 +5131,8 @@ class SsaBuilder extends ast.Visitor
constructorDeclaration.computeEffectiveTargetType(type);
expectedType = localsHandler.substInContext(expectedType);
- if (compiler.elementHasCompileTimeError(constructor)) {
+ if (compiler.generateCodeWithCompileTimeErrors &&
+ compiler.elementHasCompileTimeError(constructor)) {
// TODO(ahe): Do something like [generateWrongArgumentCountError].
stack.add(graph.addConstantNull(compiler));
return;

Powered by Google App Engine
This is Rietveld 408576698