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

Side by Side Diff: pkg/compiler/lib/src/ssa/kernel_impact.dart

Issue 3000763002: Implement .getCallType (Closed)
Patch Set: The fix Created 3 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 unified diff | Download patch
« no previous file with comments | « pkg/compiler/lib/src/ssa/builder.dart ('k') | pkg/compiler/lib/src/ssa/types.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 import 'package:kernel/ast.dart' as ir; 5 import 'package:kernel/ast.dart' as ir;
6 6
7 import '../common.dart'; 7 import '../common.dart';
8 import '../common/names.dart'; 8 import '../common/names.dart';
9 import '../compiler.dart'; 9 import '../compiler.dart';
10 import '../constants/expressions.dart'; 10 import '../constants/expressions.dart';
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 if (field.initializer != null) { 117 if (field.initializer != null) {
118 visitNode(field.initializer); 118 visitNode(field.initializer);
119 if (!field.isInstanceMember && 119 if (!field.isInstanceMember &&
120 !field.isConst && 120 !field.isConst &&
121 field.initializer is! ir.NullLiteral) { 121 field.initializer is! ir.NullLiteral) {
122 impactBuilder.registerFeature(Feature.LAZY_FIELD); 122 impactBuilder.registerFeature(Feature.LAZY_FIELD);
123 } 123 }
124 } 124 }
125 if (field.isInstanceMember && 125 if (field.isInstanceMember &&
126 elementAdapter.isNativeClass(field.enclosingClass)) { 126 elementAdapter.isNativeClass(field.enclosingClass)) {
127 // TODO(redemption): Provide the correct value for [isJsInterop]. 127 MemberEntity member = elementAdapter.getMember(field);
128 bool isJsInterop =
129 elementAdapter.nativeBasicData.isJsInteropMember(member);
128 impactBuilder.registerNativeData(elementAdapter 130 impactBuilder.registerNativeData(elementAdapter
129 .getNativeBehaviorForFieldLoad(field, isJsInterop: false)); 131 .getNativeBehaviorForFieldLoad(field, isJsInterop: isJsInterop));
130 impactBuilder.registerNativeData( 132 impactBuilder.registerNativeData(
131 elementAdapter.getNativeBehaviorForFieldStore(field)); 133 elementAdapter.getNativeBehaviorForFieldStore(field));
132 } 134 }
133 return impactBuilder; 135 return impactBuilder;
134 } 136 }
135 137
136 ResolutionImpact buildConstructor(ir.Constructor constructor) { 138 ResolutionImpact buildConstructor(ir.Constructor constructor) {
137 handleSignature(constructor.function, checkReturnType: false); 139 handleSignature(constructor.function, checkReturnType: false);
138 visitNodes(constructor.initializers); 140 visitNodes(constructor.initializers);
139 visitNode(constructor.function.body); 141 visitNode(constructor.function.body);
(...skipping 482 matching lines...) Expand 10 before | Expand all | Expand 10 after
622 ConstructorEntity target = elementAdapter.getConstructor(node.target); 624 ConstructorEntity target = elementAdapter.getConstructor(node.target);
623 impactBuilder.registerStaticUse(new StaticUse.superConstructorInvoke( 625 impactBuilder.registerStaticUse(new StaticUse.superConstructorInvoke(
624 target, elementAdapter.getCallStructure(node.arguments))); 626 target, elementAdapter.getCallStructure(node.arguments)));
625 } 627 }
626 628
627 // TODO(johnniwinther): Make this throw and visit child nodes explicitly 629 // TODO(johnniwinther): Make this throw and visit child nodes explicitly
628 // instead to ensure that we don't visit unwanted parts of the ir. 630 // instead to ensure that we don't visit unwanted parts of the ir.
629 @override 631 @override
630 void defaultNode(ir.Node node) => node.visitChildren(this); 632 void defaultNode(ir.Node node) => node.visitChildren(this);
631 } 633 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/ssa/builder.dart ('k') | pkg/compiler/lib/src/ssa/types.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698