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

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

Issue 675113002: Support async/await in the dart2js frontend. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated cf. comments Created 6 years, 1 month 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
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 mock_compiler; 5 library mock_compiler;
6 6
7 import "package:expect/expect.dart"; 7 import "package:expect/expect.dart";
8 import 'dart:async'; 8 import 'dart:async';
9 import 'dart:collection'; 9 import 'dart:collection';
10 10
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 registerSource(JavaScriptBackend.DART_JS_HELPER, 100 registerSource(JavaScriptBackend.DART_JS_HELPER,
101 buildLibrarySource(DEFAULT_JS_HELPER_LIBRARY)); 101 buildLibrarySource(DEFAULT_JS_HELPER_LIBRARY));
102 registerSource(JavaScriptBackend.DART_FOREIGN_HELPER, 102 registerSource(JavaScriptBackend.DART_FOREIGN_HELPER,
103 buildLibrarySource(DEFAULT_FOREIGN_HELPER_LIBRARY)); 103 buildLibrarySource(DEFAULT_FOREIGN_HELPER_LIBRARY));
104 registerSource(JavaScriptBackend.DART_INTERCEPTORS, 104 registerSource(JavaScriptBackend.DART_INTERCEPTORS,
105 buildLibrarySource(DEFAULT_INTERCEPTORS_LIBRARY)); 105 buildLibrarySource(DEFAULT_INTERCEPTORS_LIBRARY));
106 registerSource(JavaScriptBackend.DART_ISOLATE_HELPER, 106 registerSource(JavaScriptBackend.DART_ISOLATE_HELPER,
107 buildLibrarySource(DEFAULT_ISOLATE_HELPER_LIBRARY)); 107 buildLibrarySource(DEFAULT_ISOLATE_HELPER_LIBRARY));
108 registerSource(Compiler.DART_MIRRORS, 108 registerSource(Compiler.DART_MIRRORS,
109 buildLibrarySource(DEFAULT_MIRRORS_LIBRARY)); 109 buildLibrarySource(DEFAULT_MIRRORS_LIBRARY));
110 registerSource(Compiler.DART_ASYNC,
111 buildLibrarySource(DEFAULT_ASYNC_LIBRARY));
110 } 112 }
111 113
112 /// Initialize the mock compiler with an empty main library. 114 /// Initialize the mock compiler with an empty main library.
113 Future<Uri> init([String mainSource = ""]) { 115 Future<Uri> init([String mainSource = ""]) {
114 Uri uri = new Uri(scheme: "mock"); 116 Uri uri = new Uri(scheme: "mock");
115 registerSource(uri, mainSource); 117 registerSource(uri, mainSource);
116 return libraryLoader.loadLibrary(uri) 118 return libraryLoader.loadLibrary(uri)
117 .then((LibraryElement library) { 119 .then((LibraryElement library) {
118 mainApp = library; 120 mainApp = library;
119 // We need to make sure the Object class is resolved. When registering a 121 // We need to make sure the Object class is resolved. When registering a
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
387 MockElement(Element enclosingElement) 389 MockElement(Element enclosingElement)
388 : super('', ElementKind.FUNCTION, Modifiers.EMPTY, 390 : super('', ElementKind.FUNCTION, Modifiers.EMPTY,
389 enclosingElement, false); 391 enclosingElement, false);
390 392
391 get node => null; 393 get node => null;
392 394
393 parseNode(_) => null; 395 parseNode(_) => null;
394 396
395 bool get hasNode => false; 397 bool get hasNode => false;
396 } 398 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/message_kind_test.dart ('k') | tests/compiler/dart2js/mock_libraries.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698