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

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

Issue 11280103: Splitting out the Audio library. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Changed dart:audio to dart:web_audio Created 8 years, 1 month 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 part of dart2js; 5 part of dart2js;
6 6
7 /** 7 /**
8 * If true, print a warning for each method that was resolved, but not 8 * If true, print a warning for each method that was resolved, but not
9 * compiled. 9 * compiled.
10 */ 10 */
(...skipping 476 matching lines...) Expand 10 before | Expand all | Expand 10 after
487 // TODO(karlklose,floitsch): move this to the javascript backend. 487 // TODO(karlklose,floitsch): move this to the javascript backend.
488 /** Enable the 'JS' helper for a library if needed. */ 488 /** Enable the 'JS' helper for a library if needed. */
489 void maybeEnableJSHelper(LibraryElement library) { 489 void maybeEnableJSHelper(LibraryElement library) {
490 String libraryName = library.uri.toString(); 490 String libraryName = library.uri.toString();
491 if (library.entryCompilationUnit.script.name.contains( 491 if (library.entryCompilationUnit.script.name.contains(
492 'dart/tests/compiler/dart2js_native') 492 'dart/tests/compiler/dart2js_native')
493 || libraryName == 'dart:mirrors' 493 || libraryName == 'dart:mirrors'
494 || libraryName == 'dart:isolate' 494 || libraryName == 'dart:isolate'
495 || libraryName == 'dart:math' 495 || libraryName == 'dart:math'
496 || libraryName == 'dart:html' 496 || libraryName == 'dart:html'
497 || libraryName == 'dart:svg') { 497 || libraryName == 'dart:svg'
498 || libraryName == 'dart:web_audio') {
Anton Muhin 2012/11/22 03:22:51 just for my education, why <web>_audio? are there
Anton Muhin 2012/11/22 03:22:51 it might be time to switch to a list contains, but
blois 2012/11/27 00:07:45 I assume that there will be an audio for Android o
blois 2012/11/27 00:07:45 Good point, I'd like to do that as a separate CL (
498 if (libraryName == 'dart:html' || libraryName == 'dart:mirrors') { 499 if (libraryName == 'dart:html' || libraryName == 'dart:mirrors') {
499 // dart:html needs access to convertDartClosureToJS. 500 // dart:html needs access to convertDartClosureToJS.
500 // dart:mirrors needs access to the Primitives class. 501 // dart:mirrors needs access to the Primitives class.
501 importHelperLibrary(library); 502 importHelperLibrary(library);
502 } 503 }
503 library.addToScope(findHelper(const SourceString('JS')), this); 504 library.addToScope(findHelper(const SourceString('JS')), this);
504 Element jsIndexingBehaviorInterface = 505 Element jsIndexingBehaviorInterface =
505 findHelper(const SourceString('JavaScriptIndexingBehavior')); 506 findHelper(const SourceString('JavaScriptIndexingBehavior'));
506 if (jsIndexingBehaviorInterface != null) { 507 if (jsIndexingBehaviorInterface != null) {
507 library.addToScope(jsIndexingBehaviorInterface, this); 508 library.addToScope(jsIndexingBehaviorInterface, this);
(...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after
940 // TODO(johnniwinther): Use [spannable] and [message] to provide better 941 // TODO(johnniwinther): Use [spannable] and [message] to provide better
941 // information on assertion errors. 942 // information on assertion errors.
942 if (condition is Function){ 943 if (condition is Function){
943 condition = condition(); 944 condition = condition();
944 } 945 }
945 if (spannable == null || !condition) { 946 if (spannable == null || !condition) {
946 throw new SpannableAssertionFailure(spannable, message); 947 throw new SpannableAssertionFailure(spannable, message);
947 } 948 }
948 return true; 949 return true;
949 } 950 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698