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

Unified Diff: pkg/compiler/lib/src/compile_time_constants.dart

Issue 1382313002: dart2js: set effective target for patched constructors (Closed) Base URL: git@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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | pkg/compiler/lib/src/elements/elements.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/compile_time_constants.dart
diff --git a/pkg/compiler/lib/src/compile_time_constants.dart b/pkg/compiler/lib/src/compile_time_constants.dart
index 564a8a3138c4aad1f287b68d48ff728fefdc55c4..f2bc14c59954d526335a22303c8b2ae20b30fbbd 100644
--- a/pkg/compiler/lib/src/compile_time_constants.dart
+++ b/pkg/compiler/lib/src/compile_time_constants.dart
@@ -20,6 +20,7 @@ import 'dart_types.dart';
import 'elements/elements.dart';
import 'elements/modelx.dart' show
FunctionElementX;
+import 'helpers/helpers.dart';
import 'resolution/tree_elements.dart' show
TreeElements;
import 'resolution/operators.dart';
@@ -858,10 +859,10 @@ class CompileTimeConstantEvaluator extends Visitor<AstConstant> {
concreteArguments = normalizedArguments;
}
- if (target == compiler.intEnvironment ||
- target == compiler.boolEnvironment ||
- target == compiler.stringEnvironment) {
- return createFromEnvironmentConstant(node, constructedType, target,
+ if (constructor == compiler.intEnvironment ||
+ constructor == compiler.boolEnvironment ||
+ constructor == compiler.stringEnvironment) {
+ return createFromEnvironmentConstant(node, constructedType, constructor,
callStructure, normalizedArguments, concreteArguments);
} else {
return makeConstructedConstant(compiler, handler, context, node, type,
@@ -946,6 +947,7 @@ class CompileTimeConstantEvaluator extends Visitor<AstConstant> {
expression =
new StringFromEnvironmentConstantExpression(name, defaultValue);
}
+ assert(expression != null);
return new AstConstant(context, node, expression, value);
}
« no previous file with comments | « no previous file | pkg/compiler/lib/src/elements/elements.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698