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

Unified Diff: tests/compiler/dart2js/mock_compiler.dart

Issue 23954002: Remove use of deprecatedFutureValue. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/compiler/dart2js/mock_compiler.dart
diff --git a/tests/compiler/dart2js/mock_compiler.dart b/tests/compiler/dart2js/mock_compiler.dart
index 4407e63c451aefc806d84122df8678602212e88c..c7708370173e6865b523eb5cc53a39d94b6496e9 100644
--- a/tests/compiler/dart2js/mock_compiler.dart
+++ b/tests/compiler/dart2js/mock_compiler.dart
@@ -24,8 +24,6 @@ import '../../../sdk/lib/_internal/compiler/implementation/elements/modelx.dart'
import '../../../sdk/lib/_internal/compiler/implementation/dart2jslib.dart'
hide TreeElementMapping;
-import '../../../sdk/lib/_internal/compiler/implementation/dart_types.dart';
Johnni Winther 2013/09/04 12:13:41 Unused import.
-
import '../../../sdk/lib/_internal/compiler/implementation/deferred_load.dart'
show DeferredLoadTask;
@@ -239,18 +237,14 @@ class MockCompiler extends Compiler {
analyzeOnly: analyzeOnly,
emitJavaScript: emitJavaScript,
preserveComments: preserveComments) {
- coreLibrary = deprecatedFutureValue(createLibrary("core", coreSource));
+ coreLibrary = createLibrary("core", coreSource);
// We need to set the assert method to avoid calls with a 'null'
// target being interpreted as a call to assert.
- jsHelperLibrary = deprecatedFutureValue(
- createLibrary("helper", helperSource));
- foreignLibrary = deprecatedFutureValue(
- createLibrary("foreign", FOREIGN_LIBRARY));
- interceptorsLibrary = deprecatedFutureValue(
- createLibrary("interceptors", interceptorsSource));
- isolateHelperLibrary = deprecatedFutureValue(
- createLibrary("isolate_helper", isolateHelperSource));
+ jsHelperLibrary = createLibrary("helper", helperSource);
+ foreignLibrary = createLibrary("foreign", FOREIGN_LIBRARY);
+ interceptorsLibrary = createLibrary("interceptors", interceptorsSource);
+ isolateHelperLibrary = createLibrary("isolate_helper", isolateHelperSource);
// Set up the library imports.
importHelperLibrary(coreLibrary);
@@ -288,7 +282,7 @@ class MockCompiler extends Compiler {
* Used internally to create a library from a source text. The created library
* is fixed to export its top-level declarations.
*/
- Future<LibraryElement> createLibrary(String name, String source) {
+ LibraryElement createLibrary(String name, String source) {
Uri uri = new Uri(scheme: "dart", path: name);
var script = new Script(uri, new MockFile(source));
var library = new LibraryElementX(script);
@@ -297,7 +291,7 @@ class MockCompiler extends Compiler {
library.setExports(library.localScope.values.toList());
registerSource(uri, source);
libraries.putIfAbsent(uri.toString(), () => library);
- return new Future.value(library);
+ return library;
}
void reportWarning(Node node, var message) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698