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

Side by Side Diff: lib/compiler/implementation/compiler.dart

Issue 11085020: Revert "Address Peter's comments on Function.apply." (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 | lib/compiler/implementation/lib/core_patch.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 5
6 /** 6 /**
7 * If true, print a warning for each method that was resolved, but not 7 * If true, print a warning for each method that was resolved, but not
8 * compiled. 8 * compiled.
9 */ 9 */
10 const bool REPORT_EXCESS_RESOLUTION = false; 10 const bool REPORT_EXCESS_RESOLUTION = false;
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after
377 // two libraries during patching. 377 // two libraries during patching.
378 importHelperLibrary(coreLibrary); 378 importHelperLibrary(coreLibrary);
379 importHelperLibrary(coreImplLibrary); 379 importHelperLibrary(coreImplLibrary);
380 importHelperLibrary(interceptorsLibrary); 380 importHelperLibrary(interceptorsLibrary);
381 381
382 addForeignFunctions(jsHelperLibrary); 382 addForeignFunctions(jsHelperLibrary);
383 addForeignFunctions(interceptorsLibrary); 383 addForeignFunctions(interceptorsLibrary);
384 384
385 assertMethod = jsHelperLibrary.find(const SourceString('assert')); 385 assertMethod = jsHelperLibrary.find(const SourceString('assert'));
386 identicalFunction = coreLibrary.find(const SourceString('identical')); 386 identicalFunction = coreLibrary.find(const SourceString('identical'));
387 functionApplyMethod =
388 jsHelperLibrary.find(const SourceString('applyFunction'));
389 387
390 initializeSpecialClasses(); 388 initializeSpecialClasses();
389
390 functionClass.ensureResolved(this);
391 functionApplyMethod =
392 functionClass.lookupLocalMember(const SourceString('apply'));
391 } 393 }
392 394
393 void loadCoreImplLibrary() { 395 void loadCoreImplLibrary() {
394 Uri coreImplUri = new Uri.fromComponents(scheme: 'dart', path: 'coreimpl'); 396 Uri coreImplUri = new Uri.fromComponents(scheme: 'dart', path: 'coreimpl');
395 coreImplLibrary = scanner.loadLibrary(coreImplUri, null, coreImplUri); 397 coreImplLibrary = scanner.loadLibrary(coreImplUri, null, coreImplUri);
396 } 398 }
397 399
398 void importHelperLibrary(LibraryElement library) { 400 void importHelperLibrary(LibraryElement library) {
399 if (jsHelperLibrary !== null) { 401 if (jsHelperLibrary !== null) {
400 scanner.importLibrary(library, jsHelperLibrary, null); 402 scanner.importLibrary(library, jsHelperLibrary, null);
(...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after
854 * information in the generated error message. 856 * information in the generated error message.
855 */ 857 */
856 bool invariant(Spannable spannable, var condition, {String message: null}) { 858 bool invariant(Spannable spannable, var condition, {String message: null}) {
857 // TODO(johnniwinther): Use [spannable] and [message] to provide better 859 // TODO(johnniwinther): Use [spannable] and [message] to provide better
858 // information on assertion errors. 860 // information on assertion errors.
859 if (condition is Function){ 861 if (condition is Function){
860 condition = condition(); 862 condition = condition();
861 } 863 }
862 return spannable != null && condition; 864 return spannable != null && condition;
863 } 865 }
OLDNEW
« no previous file with comments | « no previous file | lib/compiler/implementation/lib/core_patch.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698