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

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

Issue 14362026: Make mock_compiler initialize the identical function, and use the identical function element direct… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 8 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 | « tests/compiler/dart2js/dart_backend_test.dart ('k') | tests/compiler/dart2js/size_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 "package:expect/expect.dart"; 7 import "package:expect/expect.dart";
8 import 'dart:collection'; 8 import 'dart:collection';
9 import 'dart:uri'; 9 import 'dart:uri';
10 10
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 interceptorsLibrary = createLibrary("interceptors", interceptorsSource); 192 interceptorsLibrary = createLibrary("interceptors", interceptorsSource);
193 isolateHelperLibrary = createLibrary("isolate_helper", isolateHelperSource); 193 isolateHelperLibrary = createLibrary("isolate_helper", isolateHelperSource);
194 194
195 // Set up the library imports. 195 // Set up the library imports.
196 importHelperLibrary(coreLibrary); 196 importHelperLibrary(coreLibrary);
197 libraryLoader.importLibrary(jsHelperLibrary, coreLibrary, null); 197 libraryLoader.importLibrary(jsHelperLibrary, coreLibrary, null);
198 libraryLoader.importLibrary(interceptorsLibrary, coreLibrary, null); 198 libraryLoader.importLibrary(interceptorsLibrary, coreLibrary, null);
199 libraryLoader.importLibrary(isolateHelperLibrary, coreLibrary, null); 199 libraryLoader.importLibrary(isolateHelperLibrary, coreLibrary, null);
200 200
201 assertMethod = jsHelperLibrary.find(buildSourceString('assert')); 201 assertMethod = jsHelperLibrary.find(buildSourceString('assert'));
202 identicalFunction = coreLibrary.find(buildSourceString('identical'));
202 203
203 mainApp = mockLibrary(this, ""); 204 mainApp = mockLibrary(this, "");
204 initializeSpecialClasses(); 205 initializeSpecialClasses();
205 // We need to make sure the Object class is resolved. When registering a 206 // We need to make sure the Object class is resolved. When registering a
206 // dynamic invocation the ArgumentTypesRegistry eventually iterates over 207 // dynamic invocation the ArgumentTypesRegistry eventually iterates over
207 // the interfaces of the Object class which would be 'null' if the class 208 // the interfaces of the Object class which would be 'null' if the class
208 // wasn't resolved. 209 // wasn't resolved.
209 objectClass.ensureResolved(this); 210 objectClass.ensureResolved(this);
210 211
211 // Our unit tests check code generation output that is affected by 212 // Our unit tests check code generation output that is affected by
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
393 } 394 }
394 } 395 }
395 396
396 class MockDeferredLoadTask extends DeferredLoadTask { 397 class MockDeferredLoadTask extends DeferredLoadTask {
397 MockDeferredLoadTask(Compiler compiler) : super(compiler); 398 MockDeferredLoadTask(Compiler compiler) : super(compiler);
398 399
399 void registerMainApp(LibraryElement mainApp) { 400 void registerMainApp(LibraryElement mainApp) {
400 // Do nothing. 401 // Do nothing.
401 } 402 }
402 } 403 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/dart_backend_test.dart ('k') | tests/compiler/dart2js/size_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698