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

Side by Side Diff: pkg/compiler/lib/src/kernel/kernel_visitor.dart

Issue 2791993002: Fix dart2js warnings and add test to ensure it stays clean. (Closed)
Patch Set: Remove unused method. Created 3 years, 8 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
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.md file. 3 // BSD-style license that can be found in the LICENSE.md file.
4 4
5 import 'package:kernel/ast.dart' as ir; 5 import 'package:kernel/ast.dart' as ir;
6 import 'package:kernel/frontend/accessors.dart' 6 import 'package:kernel/frontend/accessors.dart'
7 show 7 show
8 Accessor, 8 Accessor,
9 IndexAccessor, 9 IndexAccessor,
10 NullAwarePropertyAccessor, 10 NullAwarePropertyAccessor,
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after
346 receiver, nameToIrName(selector.memberName), arguments); 346 receiver, nameToIrName(selector.memberName), arguments);
347 } 347 }
348 348
349 ir.MethodInvocation buildCall( 349 ir.MethodInvocation buildCall(
350 ir.Expression receiver, CallStructure callStructure, NodeList arguments) { 350 ir.Expression receiver, CallStructure callStructure, NodeList arguments) {
351 return buildInvokeSelector( 351 return buildInvokeSelector(
352 receiver, callStructure.callSelector, buildArguments(arguments)); 352 receiver, callStructure.callSelector, buildArguments(arguments));
353 } 353 }
354 354
355 @override 355 @override
356 // ignore: INVALID_METHOD_OVERRIDE_RETURN_TYPE
356 ir.Expression visitIdentifier(Identifier node) { 357 ir.Expression visitIdentifier(Identifier node) {
357 // TODO(ahe): Shouldn't have to override this method, but 358 // TODO(ahe): Shouldn't have to override this method, but
358 // [SemanticSendResolvedMixin.visitIdentifier] may return `null` on errors. 359 // [SemanticSendResolvedMixin.visitIdentifier] may return `null` on errors.
359 if (node.isThis()) { 360 if (node.isThis()) {
360 return sendVisitor.visitThisGet(node, null); 361 return sendVisitor.visitThisGet(node, null);
361 } else { 362 } else {
362 return new ir.InvalidExpression(); 363 return new ir.InvalidExpression();
363 } 364 }
364 } 365 }
365 366
(...skipping 1433 matching lines...) Expand 10 before | Expand all | Expand 10 after
1799 1800
1800 ir.VariableGet buildLocalGet(LocalElement local) { 1801 ir.VariableGet buildLocalGet(LocalElement local) {
1801 return new ir.VariableGet(getLocal(local)); 1802 return new ir.VariableGet(getLocal(local));
1802 } 1803 }
1803 1804
1804 @override 1805 @override
1805 ir.VariableGet handleLocalGet(Send node, LocalElement element, _) { 1806 ir.VariableGet handleLocalGet(Send node, LocalElement element, _) {
1806 return buildLocalGet(element); 1807 return buildLocalGet(element);
1807 } 1808 }
1808 1809
1810 // ignore: MISSING_RETURN
1809 ir.Expression buildCompound( 1811 ir.Expression buildCompound(
1810 Accessor accessor, CompoundRhs rhs, SendSet node) { 1812 Accessor accessor, CompoundRhs rhs, SendSet node) {
1811 ir.Name name = kernel.irName(rhs.operator.selectorName, currentElement); 1813 ir.Name name = kernel.irName(rhs.operator.selectorName, currentElement);
1812 switch (rhs.kind) { 1814 switch (rhs.kind) {
1813 case CompoundKind.POSTFIX: 1815 case CompoundKind.POSTFIX:
1814 return buildPostfixIncrement(node, accessor, name); 1816 return buildPostfixIncrement(node, accessor, name);
1815 1817
1816 case CompoundKind.PREFIX: 1818 case CompoundKind.PREFIX:
1817 return buildPrefixIncrement(node, accessor, name); 1819 return buildPrefixIncrement(node, accessor, name);
1818 1820
(...skipping 1049 matching lines...) Expand 10 before | Expand all | Expand 10 after
2868 } 2870 }
2869 2871
2870 @override 2872 @override
2871 ir.Expression visitSuperIndexSetIfNull(SendSet node, MethodElement getter, 2873 ir.Expression visitSuperIndexSetIfNull(SendSet node, MethodElement getter,
2872 MethodElement setter, Node index, Node rhs, _) { 2874 MethodElement setter, Node index, Node rhs, _) {
2873 return _finishSetIfNull( 2875 return _finishSetIfNull(
2874 node, buildSuperIndexAccessor(index, getter, setter), rhs); 2876 node, buildSuperIndexAccessor(index, getter, setter), rhs);
2875 } 2877 }
2876 2878
2877 @override 2879 @override
2880 // ignore: INVALID_METHOD_OVERRIDE_RETURN_TYPE
2878 ir.Node visitVariableDefinitions(VariableDefinitions definitions) { 2881 ir.Node visitVariableDefinitions(VariableDefinitions definitions) {
2879 // TODO(ahe): This method is copied from [SemanticDeclarationResolvedMixin] 2882 // TODO(ahe): This method is copied from [SemanticDeclarationResolvedMixin]
2880 // and modified. Perhaps we can find a way to avoid code duplication. 2883 // and modified. Perhaps we can find a way to avoid code duplication.
2881 List<ir.VariableDeclaration> variables = <ir.VariableDeclaration>[]; 2884 List<ir.VariableDeclaration> variables = <ir.VariableDeclaration>[];
2882 computeVariableStructures(definitions, 2885 computeVariableStructures(definitions,
2883 (Node node, VariableStructure structure) { 2886 (Node node, VariableStructure structure) {
2884 if (structure == null) { 2887 if (structure == null) {
2885 return internalError(node, 'No structure for $node'); 2888 return internalError(node, 'No structure for $node');
2886 } else { 2889 } else {
2887 ir.VariableDeclaration variable = 2890 ir.VariableDeclaration variable =
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
2963 : this(null, true, node, initializers); 2966 : this(null, true, node, initializers);
2964 2967
2965 accept(ir.Visitor v) => throw "unsupported"; 2968 accept(ir.Visitor v) => throw "unsupported";
2966 2969
2967 visitChildren(ir.Visitor v) => throw "unsupported"; 2970 visitChildren(ir.Visitor v) => throw "unsupported";
2968 2971
2969 String toString() { 2972 String toString() {
2970 return "IrFunction($kind, $isConstructor, $node, $initializers)"; 2973 return "IrFunction($kind, $isConstructor, $node, $initializers)";
2971 } 2974 }
2972 } 2975 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698