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

Side by Side Diff: tests/compiler/dart2js/codegen_helper.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
« no previous file with comments | « tests/compiler/dart2js/bad_loop_test.dart ('k') | tests/compiler/dart2js/compiler_helper.dart » ('j') | 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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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:expect/expect.dart'; 6 import 'package:expect/expect.dart';
7 import 'package:compiler/src/null_compiler_output.dart'; 7 import 'package:compiler/src/null_compiler_output.dart';
8 import 'memory_source_file_helper.dart'; 8 import 'memory_source_file_helper.dart';
9 9
10 Future<Map<String, String>> generate(String code, 10 Future<Map<String, String>> generate(String code,
(...skipping 13 matching lines...) Expand all
24 options, 24 options,
25 {}); 25 {});
26 Uri uri = Uri.parse('memory:main.dart'); 26 Uri uri = Uri.parse('memory:main.dart');
27 return compiler.run(uri).then((success) { 27 return compiler.run(uri).then((success) {
28 Expect.isTrue(success); 28 Expect.isTrue(success);
29 Map<String, String> result = new Map<String, String>(); 29 Map<String, String> result = new Map<String, String>();
30 var backend = compiler.backend; 30 var backend = compiler.backend;
31 for (var element in backend.generatedCode.keys) { 31 for (var element in backend.generatedCode.keys) {
32 if (element.compilationUnit.script.readableUri != uri) continue; 32 if (element.compilationUnit.script.readableUri != uri) continue;
33 var name = element.name; 33 var name = element.name;
34 var code = backend.assembleCode(element); 34 var code = backend.getGeneratedCode(element);
35 result[name] = code; 35 result[name] = code;
36 } 36 }
37 return result; 37 return result;
38 }); 38 });
39 } 39 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/bad_loop_test.dart ('k') | tests/compiler/dart2js/compiler_helper.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698