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

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

Issue 137893024: Revert "Reapply "Implement new model for class members." and "Implement new model for interface mem… (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « tests/compiler/dart2js/members_test.dart ('k') | tests/compiler/dart2js/missing_file_test.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 library dart2js.test.memory_compiler; 5 library dart2js.test.memory_compiler;
6 6
7 import 'package:expect/expect.dart';
7 import 'memory_source_file_helper.dart'; 8 import 'memory_source_file_helper.dart';
8 9
9 import '../../../sdk/lib/_internal/compiler/implementation/dart2jslib.dart' 10 import '../../../sdk/lib/_internal/compiler/implementation/dart2jslib.dart'
10 show NullSink; 11 show NullSink;
11 import '../../../sdk/lib/_internal/compiler/implementation/filenames.dart';
12 12
13 import '../../../sdk/lib/_internal/compiler/compiler.dart' 13 import '../../../sdk/lib/_internal/compiler/compiler.dart'
14 show Diagnostic, DiagnosticHandler; 14 show Diagnostic, DiagnosticHandler;
15 15
16 import 'dart:async'; 16 import 'dart:async';
17 17
18 import '../../../sdk/lib/_internal/compiler/implementation/mirrors/mirrors.dart' ; 18 import '../../../sdk/lib/_internal/compiler/implementation/mirrors/mirrors.dart' ;
19 import '../../../sdk/lib/_internal/compiler/implementation/mirrors/dart2js_mirro r.dart'; 19 import '../../../sdk/lib/_internal/compiler/implementation/mirrors/dart2js_mirro r.dart';
20 20
21 class DiagnosticMessage { 21 class DiagnosticMessage {
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 return handler; 74 return handler;
75 } 75 }
76 76
77 Expando<MemorySourceFileProvider> expando = 77 Expando<MemorySourceFileProvider> expando =
78 new Expando<MemorySourceFileProvider>(); 78 new Expando<MemorySourceFileProvider>();
79 79
80 Compiler compilerFor(Map<String,String> memorySourceFiles, 80 Compiler compilerFor(Map<String,String> memorySourceFiles,
81 {DiagnosticHandler diagnosticHandler, 81 {DiagnosticHandler diagnosticHandler,
82 List<String> options: const [], 82 List<String> options: const [],
83 Compiler cachedCompiler, 83 Compiler cachedCompiler,
84 bool showDiagnostics: true, 84 bool showDiagnostics: true}) {
85 Uri packageRoot}) {
86 Uri script = currentDirectory.resolveUri(Platform.script); 85 Uri script = currentDirectory.resolveUri(Platform.script);
87 Uri libraryRoot = script.resolve('../../../sdk/'); 86 Uri libraryRoot = script.resolve('../../../sdk/');
88 if (packageRoot == null) { 87 Uri packageRoot = currentDirectory.resolve('${Platform.packageRoot}/');
89 packageRoot = currentDirectory.resolve(
90 appendSlash(nativeToUriPath(Platform.packageRoot)));
91 }
92 88
93 MemorySourceFileProvider provider; 89 MemorySourceFileProvider provider;
94 var readStringFromUri; 90 var readStringFromUri;
95 if (cachedCompiler == null) { 91 if (cachedCompiler == null) {
96 provider = new MemorySourceFileProvider(memorySourceFiles); 92 provider = new MemorySourceFileProvider(memorySourceFiles);
97 readStringFromUri = provider.readStringFromUri; 93 readStringFromUri = provider.readStringFromUri;
98 // Saving the provider in case we need it later for a cached compiler. 94 // Saving the provider in case we need it later for a cached compiler.
99 expando[readStringFromUri] = provider; 95 expando[readStringFromUri] = provider;
100 } else { 96 } else {
101 // When using a cached compiler, it has read a number of files from disk 97 // When using a cached compiler, it has read a number of files from disk
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 createDiagnosticHandler(diagnosticHandler, provider, showDiagnostics); 166 createDiagnosticHandler(diagnosticHandler, provider, showDiagnostics);
171 167
172 List<Uri> libraries = <Uri>[]; 168 List<Uri> libraries = <Uri>[];
173 memorySourceFiles.forEach((String path, _) { 169 memorySourceFiles.forEach((String path, _) {
174 libraries.add(new Uri(scheme: 'memory', path: path)); 170 libraries.add(new Uri(scheme: 'memory', path: path));
175 }); 171 });
176 172
177 return analyze(libraries, libraryRoot, packageRoot, 173 return analyze(libraries, libraryRoot, packageRoot,
178 provider, handler, options); 174 provider, handler, options);
179 } 175 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/members_test.dart ('k') | tests/compiler/dart2js/missing_file_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698