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

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: Removed changes not related to assert. 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 345 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 coreImplLibrary = scanBuiltinLibrary('coreimpl'); 356 coreImplLibrary = scanBuiltinLibrary('coreimpl');
357 jsHelperLibrary = scanBuiltinLibrary('_js_helper'); 357 jsHelperLibrary = scanBuiltinLibrary('_js_helper');
358 interceptorsLibrary = scanBuiltinLibrary('_interceptors'); 358 interceptorsLibrary = scanBuiltinLibrary('_interceptors');
359 359
360 addForeignFunctions(jsHelperLibrary); 360 addForeignFunctions(jsHelperLibrary);
361 addForeignFunctions(interceptorsLibrary); 361 addForeignFunctions(interceptorsLibrary);
362 362
363 libraries['dart:core'] = coreLibrary; 363 libraries['dart:core'] = coreLibrary;
364 libraries['dart:coreimpl'] = coreImplLibrary; 364 libraries['dart:coreimpl'] = coreImplLibrary;
365 365
366 assertMethod = coreLibrary.find(const SourceString('assert')); 366 assertMethod = jsHelperLibrary.find(const SourceString('assert'));
367 367
368 initializeSpecialClasses(); 368 initializeSpecialClasses();
369 } 369 }
370 370
371 void importCoreLibrary(LibraryElement library) { 371 void importCoreLibrary(LibraryElement library) {
372 Uri coreUri = new Uri.fromComponents(scheme: 'dart', path: 'core'); 372 Uri coreUri = new Uri.fromComponents(scheme: 'dart', path: 'core');
373 if (coreLibrary === null) { 373 if (coreLibrary === null) {
374 coreLibrary = scanner.loadLibrary(coreUri, null, coreUri); 374 coreLibrary = scanner.loadLibrary(coreUri, null, coreUri);
375 } 375 }
376 scanner.importLibrary(library, 376 scanner.importLibrary(library,
(...skipping 549 matching lines...) Expand 10 before | Expand all | Expand 10 after
926 final endOffset = end.charOffset + end.slowCharCount; 926 final endOffset = end.charOffset + end.slowCharCount;
927 927
928 // [begin] and [end] might be the same for the same empty token. This 928 // [begin] and [end] might be the same for the same empty token. This
929 // happens for instance when scanning '$$'. 929 // happens for instance when scanning '$$'.
930 assert(endOffset >= beginOffset); 930 assert(endOffset >= beginOffset);
931 return f(beginOffset, endOffset); 931 return f(beginOffset, endOffset);
932 } 932 }
933 933
934 String toString() => 'SourceSpan($uri, $begin, $end)'; 934 String toString() => 'SourceSpan($uri, $begin, $end)';
935 } 935 }
OLDNEW
« no previous file with comments | « no previous file | lib/compiler/implementation/elements/elements.dart » ('j') | lib/compiler/implementation/resolver.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698