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

Unified Diff: pkg/compiler/lib/src/ssa/builder.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/resolution/resolution.dart ('k') | tests/compiler/dart2js/compiler_helper.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 42b2f5af5a060a1d66021d5b6c944be23d337a71..c0d3fb4ee34a15c8a60cb1cf2891f465dd1118a1 100644
--- a/pkg/compiler/lib/src/ssa/builder.dart
+++ b/pkg/compiler/lib/src/ssa/builder.dart
@@ -206,10 +206,8 @@ class LocalsHandler {
LocalsHandler(
this.builder, this.executableContext, InterfaceType instanceType)
- : this.instanceType =
- instanceType == null || instanceType.containsTypeVariables
- ? null
- : instanceType;
+ : this.instanceType = instanceType == null ||
+ instanceType.containsTypeVariables ? null : instanceType;
/// Substituted type variables occurring in [type] into the context of
/// [contextClass].
@@ -4457,7 +4455,7 @@ class SsaBuilder extends ast.Visitor
SourceInformation sourceInformation) {
// Until now we only handle these as getters.
invariant(node, deferredLoader.isDeferredLoaderGetter);
- Element loadFunction = compiler.loadLibraryFunction;
+ Element loadFunction = helpers.loadLibraryWrapper;
PrefixElement prefixElement = deferredLoader.enclosingElement;
String loadId =
compiler.deferredLoadTask.getImportDeferName(node, prefixElement);
@@ -4922,7 +4920,7 @@ class SsaBuilder extends ast.Visitor
constructor = constructorImplementation.effectiveTarget;
final bool isSymbolConstructor =
- constructorDeclaration == compiler.symbolConstructor;
+ compiler.commonElements.isSymbolConstructor(constructorDeclaration);
final bool isJSArrayTypedConstructor =
constructorDeclaration == helpers.jsArrayTypedConstructor;
@@ -5155,7 +5153,7 @@ class SsaBuilder extends ast.Visitor
List<HInstruction> inputs = makeStaticArgumentList(
callStructure, node.arguments, function.implementation);
- if (function == compiler.identicalFunction) {
+ if (function == compiler.commonElements.identicalFunction) {
pushWithPosition(
new HIdentity(inputs[0], inputs[1], null, backend.boolType), node);
return;
@@ -5479,7 +5477,8 @@ class SsaBuilder extends ast.Visitor
@override
void bulkHandleNew(ast.NewExpression node, [_]) {
Element element = elements[node.send];
- final bool isSymbolConstructor = element == compiler.symbolConstructor;
+ final bool isSymbolConstructor =
+ element == compiler.commonElements.symbolConstructor;
if (!Elements.isMalformed(element)) {
ConstructorElement function = element;
element = function.effectiveTarget;
@@ -5655,10 +5654,8 @@ class SsaBuilder extends ast.Visitor
// Native behavior effects here are similar to native/behavior.dart.
// The return type is dynamic if we don't trust js-interop type
// declarations.
- nativeBehavior.typesReturned.add(
- compiler.options.trustJSInteropTypeAnnotations
- ? type
- : const DynamicType());
+ nativeBehavior.typesReturned.add(compiler
+ .options.trustJSInteropTypeAnnotations ? type : const DynamicType());
// The allocation effects include the declared type if it is native (which
// includes js interop types).
« no previous file with comments | « pkg/compiler/lib/src/resolution/resolution.dart ('k') | tests/compiler/dart2js/compiler_helper.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698