| 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'); | 25 bool verbose = args.contains('-v'); |
| 26 asyncTest(() async { | 26 asyncTest(() async { |
| 27 Directory dataDir = new Directory.fromUri(Platform.script.resolve('data')); | 27 Directory dataDir = new Directory.fromUri(Platform.script.resolve('data')); |
| 28 await checkTests(dataDir, computeClosureData, computeKernelClosureData, | 28 await checkTests(dataDir, computeClosureData, computeKernelClosureData, |
| 29 // TODO(johnnniwinther,efortuna): Enable these tests for .dill. | 29 skipForKernel: [], |
| 30 skipForKernel: [ | |
| 31 'captured_variable.dart', | |
| 32 'mixed.dart', | |
| 33 'mutations.dart', | |
| 34 'nested_closures.dart' | |
| 35 ], | |
| 36 options: [Flags.disableTypeInference], | 30 options: [Flags.disableTypeInference], |
| 37 verbose: verbose); | 31 verbose: verbose); |
| 38 }); | 32 }); |
| 39 } | 33 } |
| 40 | 34 |
| 41 /// Compute closure data mapping for [_member] as a [MemberElement]. | 35 /// Compute closure data mapping for [_member] as a [MemberElement]. |
| 42 /// | 36 /// |
| 43 /// Fills [actualMap] with the data and [sourceSpanMap] with the source spans | 37 /// Fills [actualMap] with the data and [sourceSpanMap] with the source spans |
| 44 /// for the data origin. | 38 /// for the data origin. |
| 45 void computeClosureData( | 39 void computeClosureData( |
| (...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 320 if (value != '') { | 314 if (value != '') { |
| 321 sb.write('='); | 315 sb.write('='); |
| 322 sb.write(value); | 316 sb.write(value); |
| 323 } | 317 } |
| 324 needsComma = true; | 318 needsComma = true; |
| 325 } | 319 } |
| 326 } | 320 } |
| 327 return sb.toString(); | 321 return sb.toString(); |
| 328 } | 322 } |
| 329 } | 323 } |
| OLD | NEW |