| OLD | NEW |
| 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 'dart:io' hide Link; | 5 import 'dart:io' hide Link; |
| 6 import 'package:async_helper/async_helper.dart'; | 6 import 'package:async_helper/async_helper.dart'; |
| 7 import 'package:compiler/src/closure.dart'; | 7 import 'package:compiler/src/closure.dart'; |
| 8 import 'package:compiler/src/commandline_options.dart'; | 8 import 'package:compiler/src/commandline_options.dart'; |
| 9 import 'package:compiler/src/common.dart'; | 9 import 'package:compiler/src/common.dart'; |
| 10 import 'package:compiler/src/compiler.dart'; | 10 import 'package:compiler/src/compiler.dart'; |
| 11 import 'package:compiler/src/diagnostics/diagnostic_listener.dart'; | 11 import 'package:compiler/src/diagnostics/diagnostic_listener.dart'; |
| 12 import 'package:compiler/src/elements/elements.dart'; | 12 import 'package:compiler/src/elements/elements.dart'; |
| 13 import 'package:compiler/src/elements/entities.dart'; | 13 import 'package:compiler/src/elements/entities.dart'; |
| 14 import 'package:compiler/src/kernel/element_map.dart'; | 14 import 'package:compiler/src/kernel/element_map.dart'; |
| 15 import 'package:compiler/src/kernel/kernel_backend_strategy.dart'; | 15 import 'package:compiler/src/kernel/kernel_backend_strategy.dart'; |
| 16 import 'package:compiler/src/js_model/locals.dart'; | 16 import 'package:compiler/src/js_model/locals.dart'; |
| 17 import 'package:compiler/src/tree/nodes.dart' as ast; | 17 import 'package:compiler/src/tree/nodes.dart' as ast; |
| 18 import 'package:compiler/src/util/util.dart'; | 18 import 'package:compiler/src/util/util.dart'; |
| 19 import 'package:expect/expect.dart'; | 19 import 'package:expect/expect.dart'; |
| 20 import '../equivalence/id_equivalence.dart'; | 20 import '../equivalence/id_equivalence.dart'; |
| 21 import '../equivalence/id_equivalence_helper.dart'; | 21 import '../equivalence/id_equivalence_helper.dart'; |
| 22 import 'package:kernel/ast.dart' as ir; | 22 import 'package:kernel/ast.dart' as ir; |
| 23 | 23 |
| 24 main(List<String> args) { | 24 main(List<String> args) { |
| 25 bool verbose = args.contains('-v'); | |
| 26 asyncTest(() async { | 25 asyncTest(() async { |
| 27 Directory dataDir = new Directory.fromUri(Platform.script.resolve('data')); | 26 Directory dataDir = new Directory.fromUri(Platform.script.resolve('data')); |
| 28 await checkTests(dataDir, computeClosureData, computeKernelClosureData, | 27 await checkTests(dataDir, computeClosureData, computeKernelClosureData, |
| 29 skipForKernel: [], | 28 skipForKernel: [], options: [Flags.disableTypeInference], args: args); |
| 30 options: [Flags.disableTypeInference], | |
| 31 verbose: verbose); | |
| 32 }); | 29 }); |
| 33 } | 30 } |
| 34 | 31 |
| 35 /// Compute closure data mapping for [_member] as a [MemberElement]. | 32 /// Compute closure data mapping for [_member] as a [MemberElement]. |
| 36 /// | 33 /// |
| 37 /// Fills [actualMap] with the data and [sourceSpanMap] with the source spans | 34 /// Fills [actualMap] with the data and [sourceSpanMap] with the source spans |
| 38 /// for the data origin. | 35 /// for the data origin. |
| 39 void computeClosureData( | 36 void computeClosureData( |
| 40 Compiler compiler, MemberEntity _member, Map<Id, ActualData> actualMap, | 37 Compiler compiler, MemberEntity _member, Map<Id, ActualData> actualMap, |
| 41 {bool verbose: false}) { | 38 {bool verbose: false}) { |
| (...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 314 if (value != '') { | 311 if (value != '') { |
| 315 sb.write('='); | 312 sb.write('='); |
| 316 sb.write(value); | 313 sb.write(value); |
| 317 } | 314 } |
| 318 needsComma = true; | 315 needsComma = true; |
| 319 } | 316 } |
| 320 } | 317 } |
| 321 return sb.toString(); | 318 return sb.toString(); |
| 322 } | 319 } |
| 323 } | 320 } |
| OLD | NEW |