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

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

Issue 1320503003: dart2js: add initial support for lookup-maps (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: 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
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 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 registerSource(Uris.dart_mirrors, 127 registerSource(Uris.dart_mirrors,
128 buildLibrarySource(DEFAULT_MIRRORS_LIBRARY)); 128 buildLibrarySource(DEFAULT_MIRRORS_LIBRARY));
129 129
130 Map<String, String> asyncLibrarySource = <String, String>{}; 130 Map<String, String> asyncLibrarySource = <String, String>{};
131 asyncLibrarySource.addAll(DEFAULT_ASYNC_LIBRARY); 131 asyncLibrarySource.addAll(DEFAULT_ASYNC_LIBRARY);
132 if (enableAsyncAwait) { 132 if (enableAsyncAwait) {
133 asyncLibrarySource.addAll(ASYNC_AWAIT_LIBRARY); 133 asyncLibrarySource.addAll(ASYNC_AWAIT_LIBRARY);
134 } 134 }
135 registerSource(Uris.dart_async, 135 registerSource(Uris.dart_async,
136 buildLibrarySource(asyncLibrarySource)); 136 buildLibrarySource(asyncLibrarySource));
137 registerSource(JavaScriptBackend.PACKAGE_LOOKUP_MAP,
138 buildLibrarySource(DEFAULT_LOOKUP_MAP_LIBRARY));
137 } 139 }
138 140
139 String get patchVersion { 141 String get patchVersion {
140 return testedPatchVersion != null ? testedPatchVersion : super.patchVersion; 142 return testedPatchVersion != null ? testedPatchVersion : super.patchVersion;
141 } 143 }
142 144
143 /// Initialize the mock compiler with an empty main library. 145 /// Initialize the mock compiler with an empty main library.
144 Future<Uri> init([String mainSource = ""]) { 146 Future<Uri> init([String mainSource = ""]) {
145 Uri uri = new Uri(scheme: "mock"); 147 Uri uri = new Uri(scheme: "mock");
146 registerSource(uri, mainSource); 148 registerSource(uri, mainSource);
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
426 MockElement(Element enclosingElement) 428 MockElement(Element enclosingElement)
427 : super('', ElementKind.FUNCTION, Modifiers.EMPTY, 429 : super('', ElementKind.FUNCTION, Modifiers.EMPTY,
428 enclosingElement); 430 enclosingElement);
429 431
430 get node => null; 432 get node => null;
431 433
432 parseNode(_) => null; 434 parseNode(_) => null;
433 435
434 bool get hasNode => false; 436 bool get hasNode => false;
435 } 437 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698