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

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

Issue 11267018: Make getKeys, getValues getters (keys, values). (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Update status files with co19 issue number. Created 8 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
« no previous file with comments | « tests/co19/co19-runtime.status ('k') | tests/compiler/dart2js/resolver_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) 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 'dart:uri'; 7 import 'dart:uri';
8 8
9 import '../../../lib/compiler/compiler.dart' as api; 9 import '../../../lib/compiler/compiler.dart' as api;
10 import '../../../lib/compiler/implementation/dart2jslib.dart' hide TreeElementMa pping; 10 import '../../../lib/compiler/implementation/dart2jslib.dart' hide TreeElementMa pping;
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 106
107 /** 107 /**
108 * Used internally to create a library from a source text. The created library 108 * Used internally to create a library from a source text. The created library
109 * is fixed to export its top-level declarations. 109 * is fixed to export its top-level declarations.
110 */ 110 */
111 LibraryElement createLibrary(String name, String source) { 111 LibraryElement createLibrary(String name, String source) {
112 Uri uri = new Uri.fromComponents(scheme: "source", path: name); 112 Uri uri = new Uri.fromComponents(scheme: "source", path: name);
113 var script = new Script(uri, new MockFile(source)); 113 var script = new Script(uri, new MockFile(source));
114 var library = new LibraryElement(script); 114 var library = new LibraryElement(script);
115 parseScript(source, library); 115 parseScript(source, library);
116 library.setExports(library.localScope.getValues()); 116 library.setExports(library.localScope.values);
117 return library; 117 return library;
118 } 118 }
119 119
120 void reportWarning(Node node, var message) { 120 void reportWarning(Node node, var message) {
121 warnings.add(new WarningMessage(node, message.message)); 121 warnings.add(new WarningMessage(node, message.message));
122 } 122 }
123 123
124 void reportError(Node node, var message) { 124 void reportError(Node node, var message) {
125 if (message is String && message.startsWith("no library name found in")) { 125 if (message is String && message.startsWith("no library name found in")) {
126 // TODO(ahe): Fix the MockCompiler to not have this problem. 126 // TODO(ahe): Fix the MockCompiler to not have this problem.
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 operator []=(Node node, Element element) { 250 operator []=(Node node, Element element) {
251 map[node] = element; 251 map[node] = element;
252 } 252 }
253 253
254 operator [](Node node) => map[node]; 254 operator [](Node node) => map[node];
255 255
256 void remove(Node node) { 256 void remove(Node node) {
257 map.remove(node); 257 map.remove(node);
258 } 258 }
259 } 259 }
OLDNEW
« no previous file with comments | « tests/co19/co19-runtime.status ('k') | tests/compiler/dart2js/resolver_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698