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

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

Issue 11014010: Made assert a keyword. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fixed grammar. 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/js_helper.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 372 matching lines...) Expand 10 before | Expand all | Expand 10 after
383 // The core and coreimpl libraries were loaded and patched before 383 // The core and coreimpl libraries were loaded and patched before
384 // jsHelperLibrary was initialized, so it wasn't imported into those 384 // jsHelperLibrary was initialized, so it wasn't imported into those
385 // two libraries during patching. 385 // two libraries during patching.
386 importHelperLibrary(coreLibrary); 386 importHelperLibrary(coreLibrary);
387 importHelperLibrary(coreImplLibrary); 387 importHelperLibrary(coreImplLibrary);
388 importHelperLibrary(interceptorsLibrary); 388 importHelperLibrary(interceptorsLibrary);
389 389
390 addForeignFunctions(jsHelperLibrary); 390 addForeignFunctions(jsHelperLibrary);
391 addForeignFunctions(interceptorsLibrary); 391 addForeignFunctions(interceptorsLibrary);
392 392
393 assertMethod = jsHelperLibrary.find(const SourceString('assert')); 393 assertMethod = jsHelperLibrary.find(const SourceString('assertHelper'));
394 identicalFunction = coreLibrary.find(const SourceString('identical')); 394 identicalFunction = coreLibrary.find(const SourceString('identical'));
395 395
396 initializeSpecialClasses(); 396 initializeSpecialClasses();
397 397
398 functionClass.ensureResolved(this); 398 functionClass.ensureResolved(this);
399 functionApplyMethod = 399 functionApplyMethod =
400 functionClass.lookupLocalMember(const SourceString('apply')); 400 functionClass.lookupLocalMember(const SourceString('apply'));
401 } 401 }
402 402
403 void loadCoreImplLibrary() { 403 void loadCoreImplLibrary() {
(...skipping 444 matching lines...) Expand 10 before | Expand all | Expand 10 after
848 // TODO(johnniwinther): Use [spannable] and [message] to provide better 848 // TODO(johnniwinther): Use [spannable] and [message] to provide better
849 // information on assertion errors. 849 // information on assertion errors.
850 if (condition is Function){ 850 if (condition is Function){
851 condition = condition(); 851 condition = condition();
852 } 852 }
853 if (!condition && message != null) { 853 if (!condition && message != null) {
854 print('assertion failed: $message'); 854 print('assertion failed: $message');
855 } 855 }
856 return spannable != null && condition; 856 return spannable != null && condition;
857 } 857 }
OLDNEW
« no previous file with comments | « no previous file | lib/compiler/implementation/lib/js_helper.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698