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

Side by Side Diff: tests/compiler/dart2js/semantic_visitor_test.dart

Issue 1322973007: Use memory compiler in compiler_helper.dart. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Update cf. comments. Created 5 years, 3 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) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 library dart2js.semantics_visitor_test; 5 library dart2js.semantics_visitor_test;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:mirrors'; 8 import 'dart:mirrors';
9 import 'package:async_helper/async_helper.dart'; 9 import 'package:async_helper/async_helper.dart';
10 import 'package:expect/expect.dart'; 10 import 'package:expect/expect.dart';
11 import 'package:compiler/src/commandline_options.dart';
11 import 'package:compiler/src/constants/expressions.dart'; 12 import 'package:compiler/src/constants/expressions.dart';
12 import 'package:compiler/src/dart_types.dart'; 13 import 'package:compiler/src/dart_types.dart';
13 import 'package:compiler/src/diagnostics/spannable.dart'; 14 import 'package:compiler/src/diagnostics/spannable.dart';
14 import 'package:compiler/src/diagnostics/messages.dart' show MessageKind; 15 import 'package:compiler/src/diagnostics/messages.dart' show MessageKind;
15 import 'package:compiler/src/compiler.dart'; 16 import 'package:compiler/src/compiler.dart';
16 import 'package:compiler/src/elements/elements.dart'; 17 import 'package:compiler/src/elements/elements.dart';
17 import 'package:compiler/src/resolution/operators.dart'; 18 import 'package:compiler/src/resolution/operators.dart';
18 import 'package:compiler/src/resolution/semantic_visitor.dart'; 19 import 'package:compiler/src/resolution/semantic_visitor.dart';
19 import 'package:compiler/src/resolution/tree_elements.dart'; 20 import 'package:compiler/src/resolution/tree_elements.dart';
20 import 'package:compiler/src/tree/tree.dart'; 21 import 'package:compiler/src/tree/tree.dart';
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 mainSource.writeln("import '$filename';"); 286 mainSource.writeln("import '$filename';");
286 testMap[filename] = test; 287 testMap[filename] = test;
287 index++; 288 index++;
288 }); 289 });
289 }); 290 });
290 mainSource.writeln("main() {}"); 291 mainSource.writeln("main() {}");
291 sourceFiles['main.dart'] = mainSource.toString(); 292 sourceFiles['main.dart'] = mainSource.toString();
292 293
293 CompilationResult result = await runCompiler( 294 CompilationResult result = await runCompiler(
294 memorySourceFiles: sourceFiles, 295 memorySourceFiles: sourceFiles,
295 options: ['--analyze-all', 296 options: [Flags.analyzeAll, Flags.analyzeOnly]);
296 '--analyze-only',
297 '--enable-null-aware-operators']);
298 Compiler compiler = result.compiler; 297 Compiler compiler = result.compiler;
299 testMap.forEach((String filename, Test test) { 298 testMap.forEach((String filename, Test test) {
300 LibraryElement library = compiler.libraryLoader.lookupLibrary( 299 LibraryElement library = compiler.libraryLoader.lookupLibrary(
301 Uri.parse('memory:$filename')); 300 Uri.parse('memory:$filename'));
302 Element element; 301 Element element;
303 String cls = test.cls; 302 String cls = test.cls;
304 String method = test.method; 303 String method = test.method;
305 if (cls == null) { 304 if (cls == null) {
306 element = library.find(method); 305 element = library.find(method);
307 } else { 306 } else {
(...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after
753 ERROR_INVALID_INDEX_SET, 752 ERROR_INVALID_INDEX_SET,
754 ERROR_INVALID_COMPOUND_INDEX_SET, 753 ERROR_INVALID_COMPOUND_INDEX_SET,
755 ERROR_INVALID_INDEX_PREFIX, 754 ERROR_INVALID_INDEX_PREFIX,
756 ERROR_INVALID_INDEX_POSTFIX, 755 ERROR_INVALID_INDEX_POSTFIX,
757 756
758 VISIT_CONSTANT_GET, 757 VISIT_CONSTANT_GET,
759 VISIT_CONSTANT_INVOKE, 758 VISIT_CONSTANT_INVOKE,
760 759
761 PREVISIT_DEFERRED_ACCESS, 760 PREVISIT_DEFERRED_ACCESS,
762 } 761 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/pretty_parameter_test.dart ('k') | tests/compiler/dart2js/serialization_analysis_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698