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

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

Issue 2265473004: Introduce "CommonElements" (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: cl Created 4 years, 4 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 | « pkg/compiler/lib/src/common/resolution.dart ('k') | pkg/compiler/lib/src/compiler.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 bda354e297e39bae19978b2c15abe4b28dfb85c4..a8f3a8921328311d433cd8b500d876c3950a1d91 100644
--- a/pkg/compiler/lib/src/compile_time_constants.dart
+++ b/pkg/compiler/lib/src/compile_time_constants.dart
@@ -600,7 +600,7 @@ class CompileTimeConstantEvaluator extends Visitor<AstConstant> {
new AstConstant(context, node, new StringConstantExpression(text),
constantSystem.createString(new LiteralDartString(text)))
];
- ConstructorElement constructor = compiler.symbolConstructor;
+ ConstructorElement constructor = compiler.commonElements.symbolConstructor;
AstConstant constant = createConstructorInvocation(
node, type, constructor, CallStructure.ONE_ARG,
normalizedArguments: arguments);
@@ -711,7 +711,8 @@ class CompileTimeConstantEvaluator extends Visitor<AstConstant> {
}
return result;
} else if (send.isCall) {
- if (element == compiler.identicalFunction && send.argumentCount() == 2) {
+ if (element == compiler.commonElements.identicalFunction &&
+ send.argumentCount() == 2) {
AstConstant left = evaluate(send.argumentsNode.nodes.head);
AstConstant right = evaluate(send.argumentsNode.nodes.tail.head);
if (left == null || right == null) {
« no previous file with comments | « pkg/compiler/lib/src/common/resolution.dart ('k') | pkg/compiler/lib/src/compiler.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698