OLD | NEW |
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:js_runtime/shared/embedded_names.dart'; | 5 import 'package:js_runtime/shared/embedded_names.dart'; |
6 import 'package:kernel/ast.dart' as ir; | 6 import 'package:kernel/ast.dart' as ir; |
7 | 7 |
8 import '../common.dart'; | 8 import '../common.dart'; |
9 import '../common/names.dart'; | 9 import '../common/names.dart'; |
10 import '../compiler.dart'; | 10 import '../compiler.dart'; |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 } | 56 } |
57 for (ClassElement classElement in kernel.classes.keys) { | 57 for (ClassElement classElement in kernel.classes.keys) { |
58 _nodeToElement[kernel.classes[classElement]] = classElement; | 58 _nodeToElement[kernel.classes[classElement]] = classElement; |
59 } | 59 } |
60 for (LibraryElement libraryElement in kernel.libraries.keys) { | 60 for (LibraryElement libraryElement in kernel.libraries.keys) { |
61 _nodeToElement[kernel.libraries[libraryElement]] = libraryElement; | 61 _nodeToElement[kernel.libraries[libraryElement]] = libraryElement; |
62 } | 62 } |
63 for (LocalFunctionElement localFunction in kernel.localFunctions.keys) { | 63 for (LocalFunctionElement localFunction in kernel.localFunctions.keys) { |
64 _nodeToElement[kernel.localFunctions[localFunction]] = localFunction; | 64 _nodeToElement[kernel.localFunctions[localFunction]] = localFunction; |
65 } | 65 } |
| 66 for (TypeVariableElement typeVariable in kernel.typeParameters.keys) { |
| 67 _nodeToElement[kernel.typeParameters[typeVariable]] = typeVariable; |
| 68 } |
66 _typeConverter = new DartTypeConverter(this); | 69 _typeConverter = new DartTypeConverter(this); |
67 } | 70 } |
68 | 71 |
69 Compiler get _compiler => _backend.compiler; | 72 Compiler get _compiler => _backend.compiler; |
70 TreeElements get elements => _resolvedAst.elements; | 73 TreeElements get elements => _resolvedAst.elements; |
71 DiagnosticReporter get reporter => _compiler.reporter; | 74 DiagnosticReporter get reporter => _compiler.reporter; |
72 Element get _target => _resolvedAst.element; | 75 Element get _target => _resolvedAst.element; |
73 | 76 |
74 GlobalTypeInferenceResults get _globalInferenceResults => | 77 GlobalTypeInferenceResults get _globalInferenceResults => |
75 _compiler.globalInference.results; | 78 _compiler.globalInference.results; |
(...skipping 862 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
938 | 941 |
939 @override | 942 @override |
940 String get name => null; | 943 String get name => null; |
941 | 944 |
942 @override | 945 @override |
943 int get nestingLevel => 1; | 946 int get nestingLevel => 1; |
944 | 947 |
945 @override | 948 @override |
946 ast.Node get statement => null; | 949 ast.Node get statement => null; |
947 } | 950 } |
OLD | NEW |