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

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

Issue 10915083: Change assert implementation to not depend on a top-level function called 'assert'. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 3 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
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 350 matching lines...) Expand 10 before | Expand all | Expand 10 after
361 coreImplLibrary = scanBuiltinLibrary('coreimpl'); 361 coreImplLibrary = scanBuiltinLibrary('coreimpl');
362 jsHelperLibrary = scanBuiltinLibrary('_js_helper'); 362 jsHelperLibrary = scanBuiltinLibrary('_js_helper');
363 interceptorsLibrary = scanBuiltinLibrary('_interceptors'); 363 interceptorsLibrary = scanBuiltinLibrary('_interceptors');
364 364
365 addForeignFunctions(jsHelperLibrary); 365 addForeignFunctions(jsHelperLibrary);
366 addForeignFunctions(interceptorsLibrary); 366 addForeignFunctions(interceptorsLibrary);
367 367
368 libraries['dart:core'] = coreLibrary; 368 libraries['dart:core'] = coreLibrary;
369 libraries['dart:coreimpl'] = coreImplLibrary; 369 libraries['dart:coreimpl'] = coreImplLibrary;
370 370
371 assertMethod = coreLibrary.find(const SourceString('assert')); 371 assertMethod = coreLibrary.find(const SourceString('_assert'));
372 372
373 initializeSpecialClasses(); 373 initializeSpecialClasses();
374
375 //patchDartLibrary(coreLibrary, 'core');
376 //patchDartLibrary(coreImplLibrary, 'coreimpl');
377 } 374 }
378 375
379 void importCoreLibrary(LibraryElement library) { 376 void importCoreLibrary(LibraryElement library) {
380 Uri coreUri = new Uri.fromComponents(scheme: 'dart', path: 'core'); 377 Uri coreUri = new Uri.fromComponents(scheme: 'dart', path: 'core');
381 if (coreLibrary === null) { 378 if (coreLibrary === null) {
382 coreLibrary = scanner.loadLibrary(coreUri, null, coreUri); 379 coreLibrary = scanner.loadLibrary(coreUri, null, coreUri);
383 } 380 }
384 scanner.importLibrary(library, 381 scanner.importLibrary(library,
385 coreLibrary, 382 coreLibrary,
386 null, 383 null,
(...skipping 530 matching lines...) Expand 10 before | Expand all | Expand 10 after
917 final endOffset = end.charOffset + end.slowCharCount; 914 final endOffset = end.charOffset + end.slowCharCount;
918 915
919 // [begin] and [end] might be the same for the same empty token. This 916 // [begin] and [end] might be the same for the same empty token. This
920 // happens for instance when scanning '$$'. 917 // happens for instance when scanning '$$'.
921 assert(endOffset >= beginOffset); 918 assert(endOffset >= beginOffset);
922 return f(beginOffset, endOffset); 919 return f(beginOffset, endOffset);
923 } 920 }
924 921
925 String toString() => 'SourceSpan($uri, $begin, $end)'; 922 String toString() => 'SourceSpan($uri, $begin, $end)';
926 } 923 }
OLDNEW
« no previous file with comments | « no previous file | lib/compiler/implementation/lib/core_patch.dart » ('j') | lib/compiler/implementation/lib/core_patch.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698