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

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

Issue 11184042: Add comment to mock-compiler. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 2 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 | « no previous file | no next file » | 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/implementation/elements/elements.dart"); 9 #import("../../../lib/compiler/implementation/elements/elements.dart");
10 #import("../../../lib/compiler/implementation/leg.dart"); 10 #import("../../../lib/compiler/implementation/leg.dart");
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 enableConcreteTypeInference: enableConcreteTypeInference) { 89 enableConcreteTypeInference: enableConcreteTypeInference) {
90 coreLibrary = createLibrary("core", coreSource); 90 coreLibrary = createLibrary("core", coreSource);
91 // We need to set the assert method to avoid calls with a 'null' 91 // We need to set the assert method to avoid calls with a 'null'
92 // target being interpreted as a call to assert. 92 // target being interpreted as a call to assert.
93 jsHelperLibrary = createLibrary("helper", helperSource); 93 jsHelperLibrary = createLibrary("helper", helperSource);
94 assertMethod = jsHelperLibrary.find(buildSourceString('assert')); 94 assertMethod = jsHelperLibrary.find(buildSourceString('assert'));
95 interceptorsLibrary = createLibrary("interceptors", interceptorsSource); 95 interceptorsLibrary = createLibrary("interceptors", interceptorsSource);
96 96
97 mainApp = mockLibrary(this, ""); 97 mainApp = mockLibrary(this, "");
98 initializeSpecialClasses(); 98 initializeSpecialClasses();
99 // We need to make sure the Object class is resolved. When registering a
100 // dynamic invocation the ArgumentTypesRegistry eventually iterates over
ahe 2012/10/18 16:42:30 In that case, the ArgumentTypesRegistry registry s
floitsch 2012/10/18 17:16:50 Should I file a bug?
ahe 2012/10/22 16:50:08 Yes, that would be great!
101 // the interfaces of the Object class which would be 'null' if the class
102 // wasn't resolved.
99 objectClass.ensureResolved(this); 103 objectClass.ensureResolved(this);
100 } 104 }
101 105
102 /** 106 /**
103 * Used internally to create a library from a source text. The created library 107 * Used internally to create a library from a source text. The created library
104 * is fixed to export its top-level declarations. 108 * is fixed to export its top-level declarations.
105 */ 109 */
106 LibraryElement createLibrary(String name, String source) { 110 LibraryElement createLibrary(String name, String source) {
107 Uri uri = new Uri.fromComponents(scheme: "source", path: name); 111 Uri uri = new Uri.fromComponents(scheme: "source", path: name);
108 var script = new Script(uri, new MockFile(source)); 112 var script = new Script(uri, new MockFile(source));
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 }); 230 });
227 } 231 }
228 } 232 }
229 233
230 LibraryElement mockLibrary(Compiler compiler, String source) { 234 LibraryElement mockLibrary(Compiler compiler, String source) {
231 Uri uri = new Uri.fromComponents(scheme: "source"); 235 Uri uri = new Uri.fromComponents(scheme: "source");
232 var library = new LibraryElement(new Script(uri, new MockFile(source))); 236 var library = new LibraryElement(new Script(uri, new MockFile(source)));
233 importLibrary(library, compiler.coreLibrary, compiler); 237 importLibrary(library, compiler.coreLibrary, compiler);
234 return library; 238 return library;
235 } 239 }
OLDNEW
« 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