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

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

Issue 1864433004: Repeats and fixes the changes landed & reverted as CL 1789553003. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Updates to external dependents Created 4 years, 8 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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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/compiler_new.dart' show CompilerOptions; 7 import 'package:compiler/src/options.dart' show CompilerOptions;
8 import 'package:compiler/src/null_compiler_output.dart'; 8 import 'package:compiler/src/null_compiler_output.dart';
9 import 'memory_source_file_helper.dart'; 9 import 'memory_source_file_helper.dart';
10 10
11 Future<Map<String, String>> generate(String code, 11 Future<Map<String, String>> generate(String code,
12 [List<String> options = const []]) { 12 [List<String> options = const []]) {
13 Uri script = currentDirectory.resolveUri(Platform.script); 13 Uri script = currentDirectory.resolveUri(Platform.script);
14 Uri libraryRoot = script.resolve('../../../sdk/'); 14 Uri libraryRoot = script.resolve('../../../sdk/');
15 Uri packageRoot = script.resolve('./packages/'); 15 Uri packageRoot = script.resolve('./packages/');
16 16
17 var provider = new MemorySourceFileProvider({ 'main.dart': code }); 17 var provider = new MemorySourceFileProvider({ 'main.dart': code });
(...skipping 14 matching lines...) Expand all
32 var backend = compiler.backend; 32 var backend = compiler.backend;
33 for (var element in backend.generatedCode.keys) { 33 for (var element in backend.generatedCode.keys) {
34 if (element.compilationUnit.script.readableUri != uri) continue; 34 if (element.compilationUnit.script.readableUri != uri) continue;
35 var name = element.name; 35 var name = element.name;
36 var code = backend.getGeneratedCode(element); 36 var code = backend.getGeneratedCode(element);
37 result[name] = code; 37 result[name] = code;
38 } 38 }
39 return result; 39 return result;
40 }); 40 });
41 } 41 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/bad_loop_test.dart ('k') | tests/compiler/dart2js/diagnostic_reporter_helper.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698