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

Side by Side Diff: tests/compiler/dart2js/equivalence/id_equivalence_helper.dart

Issue 2992383002: Support use of dill in TypeEnv tests (Closed)
Patch Set: 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
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 'dart:async'; 5 import 'dart:async';
6 import 'package:compiler/src/commandline_options.dart'; 6 import 'package:compiler/src/commandline_options.dart';
7 import 'package:compiler/src/common.dart'; 7 import 'package:compiler/src/common.dart';
8 import 'package:compiler/src/common_elements.dart'; 8 import 'package:compiler/src/common_elements.dart';
9 import 'package:compiler/src/compiler.dart'; 9 import 'package:compiler/src/compiler.dart';
10 import 'package:compiler/src/elements/elements.dart'; 10 import 'package:compiler/src/elements/elements.dart';
(...skipping 26 matching lines...) Expand all
37 memorySourceFiles: {'main.dart': code.sourceCode}, options: options); 37 memorySourceFiles: {'main.dart': code.sourceCode}, options: options);
38 compiler.stopAfterTypeInference = true; 38 compiler.stopAfterTypeInference = true;
39 await compiler.run(mainUri); 39 await compiler.run(mainUri);
40 return compiler; 40 return compiler;
41 } 41 }
42 42
43 /// Compile [code] from .dill sources. 43 /// Compile [code] from .dill sources.
44 Future<Compiler> compileFromDill( 44 Future<Compiler> compileFromDill(
45 AnnotatedCode code, Uri mainUri, List<String> options) async { 45 AnnotatedCode code, Uri mainUri, List<String> options) async {
46 Compiler compiler = await compileWithDill( 46 Compiler compiler = await compileWithDill(
47 mainUri, 47 entryPoint: mainUri,
48 {'main.dart': code.sourceCode}, 48 memorySourceFiles: {'main.dart': code.sourceCode},
49 [Flags.disableTypeInference]..addAll(options), 49 options: [Flags.disableTypeInference]..addAll(options),
50 beforeRun: (Compiler compiler) { 50 beforeRun: (Compiler compiler) {
51 compiler.stopAfterTypeInference = true; 51 compiler.stopAfterTypeInference = true;
52 }); 52 });
53 return compiler; 53 return compiler;
54 } 54 }
55 55
56 /// Compute expected and actual data for all members defined in [annotatedCode]. 56 /// Compute expected and actual data for all members defined in [annotatedCode].
57 /// 57 ///
58 /// Actual data is computed using [computeMemberData] and [code] is compiled 58 /// Actual data is computed using [computeMemberData] and [code] is compiled
59 /// using [compileFunction]. 59 /// using [compileFunction].
60 Future<IdData> computeData( 60 Future<IdData> computeData(
61 String annotatedCode, 61 String annotatedCode,
62 ComputeMemberDataFunction computeMemberData, 62 ComputeMemberDataFunction computeMemberData,
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
315 visitVariableDeclaration(ir.VariableDeclaration node) { 315 visitVariableDeclaration(ir.VariableDeclaration node) {
316 computeForNode(node); 316 computeForNode(node);
317 super.visitVariableDeclaration(node); 317 super.visitVariableDeclaration(node);
318 } 318 }
319 319
320 visitFunctionDeclaration(ir.FunctionDeclaration node) { 320 visitFunctionDeclaration(ir.FunctionDeclaration node) {
321 computeForNode(node); 321 computeForNode(node);
322 super.visitFunctionDeclaration(node); 322 super.visitFunctionDeclaration(node);
323 } 323 }
324 } 324 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/class_set_test.dart ('k') | tests/compiler/dart2js/instantiated_classes_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698