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

Side by Side Diff: sdk/lib/_internal/compiler/implementation/native_handler.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 library native; 5 library native;
6 6
7 import 'dart:uri'; 7 import 'dart:uri';
8 import 'dart2jslib.dart' hide SourceString; 8 import 'dart2jslib.dart' hide SourceString;
9 import 'elements/elements.dart'; 9 import 'elements/elements.dart';
10 import 'js_backend/js_backend.dart'; 10 import 'js_backend/js_backend.dart';
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 } 340 }
341 341
342 void maybeEnableNative(Compiler compiler, 342 void maybeEnableNative(Compiler compiler,
343 LibraryElement library, 343 LibraryElement library,
344 Uri uri) { 344 Uri uri) {
345 String libraryName = uri.toString(); 345 String libraryName = uri.toString();
346 if (library.entryCompilationUnit.script.name.contains( 346 if (library.entryCompilationUnit.script.name.contains(
347 'dart/tests/compiler/dart2js_native') 347 'dart/tests/compiler/dart2js_native')
348 || libraryName == 'dart:isolate' 348 || libraryName == 'dart:isolate'
349 || libraryName == 'dart:html' 349 || libraryName == 'dart:html'
350 || libraryName == 'dart:svg') { 350 || libraryName == 'dart:svg'
351 || libraryName == 'dart:web_audio') {
Anton Muhin 2012/11/22 03:22:51 fitto for switching to list and again your call.
blois 2012/11/27 00:07:45 Will address as an independent CL.
351 library.canUseNative = true; 352 library.canUseNative = true;
352 } 353 }
353 } 354 }
354 355
355 /** 356 /**
356 * A summary of the behavior of a native element. 357 * A summary of the behavior of a native element.
357 * 358 *
358 * Native code can return values of one type and cause native subtypes of 359 * Native code can return values of one type and cause native subtypes of
359 * another type to be instantiated. By default, we compute both from the 360 * another type to be instantiated. By default, we compute both from the
360 * declared type. 361 * declared type.
(...skipping 474 matching lines...) Expand 10 before | Expand all | Expand 10 after
835 String parameters) { 836 String parameters) {
836 buffer.add(" if (Object.getPrototypeOf(this).hasOwnProperty"); 837 buffer.add(" if (Object.getPrototypeOf(this).hasOwnProperty");
837 buffer.add("('$methodName')) {\n"); 838 buffer.add("('$methodName')) {\n");
838 buffer.add(" $code"); 839 buffer.add(" $code");
839 buffer.add(" } else {\n"); 840 buffer.add(" } else {\n");
840 buffer.add(" return Object.prototype.$methodName.call(this"); 841 buffer.add(" return Object.prototype.$methodName.call(this");
841 buffer.add(parameters == '' ? '' : ', $parameters'); 842 buffer.add(parameters == '' ? '' : ', $parameters');
842 buffer.add(");\n"); 843 buffer.add(");\n");
843 buffer.add(" }\n"); 844 buffer.add(" }\n");
844 } 845 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698