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

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: Revert to using lexicalScope 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 355 matching lines...) Expand 10 before | Expand all | Expand 10 after
366 coreImplLibrary = scanBuiltinLibrary('coreimpl'); 366 coreImplLibrary = scanBuiltinLibrary('coreimpl');
367 jsHelperLibrary = scanBuiltinLibrary('_js_helper'); 367 jsHelperLibrary = scanBuiltinLibrary('_js_helper');
368 interceptorsLibrary = scanBuiltinLibrary('_interceptors'); 368 interceptorsLibrary = scanBuiltinLibrary('_interceptors');
369 369
370 addForeignFunctions(jsHelperLibrary); 370 addForeignFunctions(jsHelperLibrary);
371 addForeignFunctions(interceptorsLibrary); 371 addForeignFunctions(interceptorsLibrary);
372 372
373 libraries['dart:core'] = coreLibrary; 373 libraries['dart:core'] = coreLibrary;
374 libraries['dart:coreimpl'] = coreImplLibrary; 374 libraries['dart:coreimpl'] = coreImplLibrary;
375 375
376 assertMethod = coreLibrary.find(const SourceString('assert')); 376 assertMethod = jsHelperLibrary.find(const SourceString('assert'));
377 377
378 initializeSpecialClasses(); 378 initializeSpecialClasses();
379 379
380 //patchDartLibrary(coreLibrary, 'core'); 380 //patchDartLibrary(coreLibrary, 'core');
381 //patchDartLibrary(coreImplLibrary, 'coreimpl'); 381 //patchDartLibrary(coreImplLibrary, 'coreimpl');
382 } 382 }
383 383
384 void importCoreLibrary(LibraryElement library) { 384 void importCoreLibrary(LibraryElement library) {
385 Uri coreUri = new Uri.fromComponents(scheme: 'dart', path: 'core'); 385 Uri coreUri = new Uri.fromComponents(scheme: 'dart', path: 'core');
386 if (coreLibrary === null) { 386 if (coreLibrary === null) {
(...skipping 541 matching lines...) Expand 10 before | Expand all | Expand 10 after
928 final endOffset = end.charOffset + end.slowCharCount; 928 final endOffset = end.charOffset + end.slowCharCount;
929 929
930 // [begin] and [end] might be the same for the same empty token. This 930 // [begin] and [end] might be the same for the same empty token. This
931 // happens for instance when scanning '$$'. 931 // happens for instance when scanning '$$'.
932 assert(endOffset >= beginOffset); 932 assert(endOffset >= beginOffset);
933 return f(beginOffset, endOffset); 933 return f(beginOffset, endOffset);
934 } 934 }
935 935
936 String toString() => 'SourceSpan($uri, $begin, $end)'; 936 String toString() => 'SourceSpan($uri, $begin, $end)';
937 } 937 }
OLDNEW
« no previous file with comments | « no previous file | lib/compiler/implementation/elements/elements.dart » ('j') | lib/compiler/implementation/lib/mock.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698