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

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

Issue 2512023002: Add types for map literal construction with kernel code. (Closed)
Patch Set: implicitInstantiations Created 4 years, 1 month 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/kernel_ast_adapter.dart ('k') | no next file » | 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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 '../common/codegen.dart' show CodegenRegistry, CodegenWorkItem; 5 import '../common/codegen.dart' show CodegenRegistry, CodegenWorkItem;
6 import '../common/names.dart' show Selectors; 6 import '../common/names.dart' show Selectors;
7 import '../common/tasks.dart' show CompilerTask; 7 import '../common/tasks.dart' show CompilerTask;
8 import '../compiler.dart' show Compiler; 8 import '../compiler.dart' show Compiler;
9 import '../constants/constant_system.dart'; 9 import '../constants/constant_system.dart';
10 import '../constants/values.dart'; 10 import '../constants/values.dart';
(...skipping 796 matching lines...) Expand 10 before | Expand all | Expand 10 after
807 HInstruction input = node.checkedInput; 807 HInstruction input = node.checkedInput;
808 // `null` always passes type conversion. 808 // `null` always passes type conversion.
809 if (input.isNull()) return input; 809 if (input.isNull()) return input;
810 // TODO(sra): We can statically check [input] if it is a constructor. 810 // TODO(sra): We can statically check [input] if it is a constructor.
811 // TODO(sra): We can statically check [input] if it is load from a field 811 // TODO(sra): We can statically check [input] if it is load from a field
812 // of the same ground type, or load from a field of a parameterized type 812 // of the same ground type, or load from a field of a parameterized type
813 // with the same receiver. 813 // with the same receiver.
814 return node; 814 return node;
815 } 815 }
816 if (type.isFunctionType) { 816 if (type.isFunctionType) {
817 HInstruction input = node.checkedInput; 817 HInstruction input = node.checkedInput;
818 // `null` always passes type conversion. 818 // `null` always passes type conversion.
819 if (input.isNull()) return input; 819 if (input.isNull()) return input;
820 // TODO(johnniwinther): Optimize function type conversions. 820 // TODO(johnniwinther): Optimize function type conversions.
821 // TODO(sra): We can statically check [input] if it is a closure getter. 821 // TODO(sra): We can statically check [input] if it is a closure getter.
822 return node; 822 return node;
823 } 823 }
824 } 824 }
825 return removeIfCheckAlwaysSucceeds(node, node.checkedType); 825 return removeIfCheckAlwaysSucceeds(node, node.checkedType);
826 } 826 }
827 827
(...skipping 1909 matching lines...) Expand 10 before | Expand all | Expand 10 after
2737 2737
2738 keyedValues.forEach((receiver, values) { 2738 keyedValues.forEach((receiver, values) {
2739 result.keyedValues[receiver] = 2739 result.keyedValues[receiver] =
2740 new Map<HInstruction, HInstruction>.from(values); 2740 new Map<HInstruction, HInstruction>.from(values);
2741 }); 2741 });
2742 2742
2743 result.nonEscapingReceivers.addAll(nonEscapingReceivers); 2743 result.nonEscapingReceivers.addAll(nonEscapingReceivers);
2744 return result; 2744 return result;
2745 } 2745 }
2746 } 2746 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/ssa/kernel_ast_adapter.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698