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

Side by Side Diff: tests/compiler/dart2js/inference/inference_test_helper.dart

Issue 2999003002: Add more tested features to closure_test (Closed)
Patch Set: Updated cf. comments. 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 | « tests/compiler/dart2js/equivalence/id_equivalence_test.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) 2017, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2017, 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:compiler/src/common.dart'; 5 import 'package:compiler/src/common.dart';
6 import 'package:compiler/src/compiler.dart'; 6 import 'package:compiler/src/compiler.dart';
7 import 'package:compiler/src/elements/elements.dart'; 7 import 'package:compiler/src/elements/elements.dart';
8 import 'package:compiler/src/elements/entities.dart'; 8 import 'package:compiler/src/elements/entities.dart';
9 import 'package:compiler/src/tree/nodes.dart'; 9 import 'package:compiler/src/tree/nodes.dart';
10 import 'package:compiler/src/types/types.dart'; 10 import 'package:compiler/src/types/types.dart';
11 11
12 import '../equivalence/id_equivalence.dart'; 12 import '../equivalence/id_equivalence.dart';
13 import '../equivalence/id_equivalence_helper.dart'; 13 import '../equivalence/id_equivalence_helper.dart';
14 14
15 /// Compute type inference data for [_member] as a [MemberElement]. 15 /// Compute type inference data for [_member] as a [MemberElement].
16 /// 16 ///
17 /// Fills [actualMap] with the data and [sourceSpanMap] with the source spans 17 /// Fills [actualMap] with the data and [sourceSpanMap] with the source spans
18 /// for the data origin. 18 /// for the data origin.
19 void computeMemberAstTypeMasks(Compiler compiler, MemberEntity _member, 19 void computeMemberAstTypeMasks(Compiler compiler, MemberEntity _member,
20 Map<Id, String> actualMap, Map<Id, Spannable> spannableMap) { 20 Map<Id, String> actualMap, Map<Id, Spannable> spannableMap,
21 {bool verbose: false}) {
21 MemberElement member = _member; 22 MemberElement member = _member;
22 ResolvedAst resolvedAst = member.resolvedAst; 23 ResolvedAst resolvedAst = member.resolvedAst;
23 if (resolvedAst.kind != ResolvedAstKind.PARSED) return; 24 if (resolvedAst.kind != ResolvedAstKind.PARSED) return;
24 compiler.reporter.withCurrentElement(member.implementation, () { 25 compiler.reporter.withCurrentElement(member.implementation, () {
25 new TypeMaskComputer(compiler.reporter, actualMap, spannableMap, 26 new TypeMaskComputer(compiler.reporter, actualMap, spannableMap,
26 resolvedAst, compiler.globalInference.results) 27 resolvedAst, compiler.globalInference.results)
27 .run(); 28 .run();
28 }); 29 });
29 } 30 }
30 31
(...skipping 30 matching lines...) Expand all
61 String computeNodeValue(Node node, [AstElement element]) { 62 String computeNodeValue(Node node, [AstElement element]) {
62 if (node is Send) { 63 if (node is Send) {
63 TypeMask value = result.typeOfSend(node); 64 TypeMask value = result.typeOfSend(node);
64 return value != null ? '$value' : null; 65 return value != null ? '$value' : null;
65 } else if (element != null && element.isLocal) { 66 } else if (element != null && element.isLocal) {
66 return computeElementValue(element); 67 return computeElementValue(element);
67 } 68 }
68 return null; 69 return null;
69 } 70 }
70 } 71 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/equivalence/id_equivalence_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698