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

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

Issue 2550323002: Insert default arguments for static calls and constructor calls. (Closed)
Patch Set: Created 4 years 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 'dart:async'; 5 import 'dart:async';
6 import 'dart:collection' show Queue; 6 import 'dart:collection' show Queue;
7 7
8 import 'package:kernel/ast.dart' as ir; 8 import 'package:kernel/ast.dart' as ir;
9 import 'package:kernel/verifier.dart' show CheckParentPointers; 9 import 'package:kernel/verifier.dart' show CheckParentPointers;
10 10
11 import '../common.dart'; 11 import '../common.dart';
12 import '../common/names.dart'; 12 import '../common/names.dart';
13 import '../compiler.dart' show Compiler; 13 import '../compiler.dart' show Compiler;
14 import '../constants/expressions.dart' show TypeConstantExpression; 14 import '../constants/expressions.dart'
15 show ConstantExpression, TypeConstantExpression;
15 import '../dart_types.dart' 16 import '../dart_types.dart'
16 show DartType, FunctionType, InterfaceType, TypeKind, TypeVariableType; 17 show DartType, FunctionType, InterfaceType, TypeKind, TypeVariableType;
17 import '../diagnostics/messages.dart' show MessageKind; 18 import '../diagnostics/messages.dart' show MessageKind;
18 import '../diagnostics/spannable.dart' show Spannable; 19 import '../diagnostics/spannable.dart' show Spannable;
19 import '../elements/elements.dart' 20 import '../elements/elements.dart'
20 show 21 show
21 ClassElement, 22 ClassElement,
22 ConstructorElement, 23 ConstructorElement,
23 Element, 24 Element,
24 ExportElement, 25 ExportElement,
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 <LibraryElement, Map<String, int>>{}; 73 <LibraryElement, Map<String, int>>{};
73 74
74 final Map<ir.Node, Element> nodeToElement = <ir.Node, Element>{}; 75 final Map<ir.Node, Element> nodeToElement = <ir.Node, Element>{};
75 final Map<ir.Node, Node> nodeToAst = <ir.Node, Node>{}; 76 final Map<ir.Node, Node> nodeToAst = <ir.Node, Node>{};
76 final Map<ir.Node, Node> nodeToAstOperator = <ir.Node, Node>{}; 77 final Map<ir.Node, Node> nodeToAstOperator = <ir.Node, Node>{};
77 // Synthetic nodes are nodes we generated that do not correspond to 78 // Synthetic nodes are nodes we generated that do not correspond to
78 // [ast.Node]s. A node should be in one of nodeToAst or syntheticNodes but not 79 // [ast.Node]s. A node should be in one of nodeToAst or syntheticNodes but not
79 // both. 80 // both.
80 final Set<ir.Node> syntheticNodes = new Set<ir.Node>(); 81 final Set<ir.Node> syntheticNodes = new Set<ir.Node>();
81 82
83 final Map<ir.Node, ConstantExpression> parameterInitializerNodeToConstant =
84 <ir.Node, ConstantExpression>{};
85
82 /// FIFO queue of work that needs to be completed before the returned AST 86 /// FIFO queue of work that needs to be completed before the returned AST
83 /// nodes are correct. 87 /// nodes are correct.
84 final Queue<WorkItem> workQueue = new Queue<WorkItem>(); 88 final Queue<WorkItem> workQueue = new Queue<WorkItem>();
85 89
86 Kernel(this.compiler); 90 Kernel(this.compiler);
87 91
88 void addWork(Element element, WorkAction action) { 92 void addWork(Element element, WorkAction action) {
89 workQueue.addLast(new WorkItem(element, action)); 93 workQueue.addLast(new WorkItem(element, action));
90 } 94 }
91 95
(...skipping 667 matching lines...) Expand 10 before | Expand all | Expand 10 after
759 } 763 }
760 764
761 class ConstructorTarget { 765 class ConstructorTarget {
762 final ConstructorElement element; 766 final ConstructorElement element;
763 final DartType type; 767 final DartType type;
764 768
765 ConstructorTarget(this.element, this.type); 769 ConstructorTarget(this.element, this.type);
766 770
767 String toString() => "ConstructorTarget($element, $type)"; 771 String toString() => "ConstructorTarget($element, $type)";
768 } 772 }
OLDNEW
« no previous file with comments | « no previous file | pkg/compiler/lib/src/kernel/kernel_visitor.dart » ('j') | pkg/compiler/lib/src/ssa/builder_kernel.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698