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

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

Issue 14367012: Move to new dart:typeddata types for dart2js (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 8 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
« no previous file with comments | « no previous file | sdk/lib/_internal/libraries.dart » ('j') | tests/html/url_test.dart » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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:collection' show Queue; 7 import 'dart:collection' show Queue;
8 import 'dart:uri'; 8 import 'dart:uri';
9 import 'dart2jslib.dart' hide SourceString; 9 import 'dart2jslib.dart' hide SourceString;
10 import 'dart_types.dart'; 10 import 'dart_types.dart';
(...skipping 471 matching lines...) Expand 10 before | Expand all | Expand 10 after
482 void maybeEnableNative(Compiler compiler, 482 void maybeEnableNative(Compiler compiler,
483 LibraryElement library) { 483 LibraryElement library) {
484 String libraryName = library.canonicalUri.toString(); 484 String libraryName = library.canonicalUri.toString();
485 if (library.entryCompilationUnit.script.name.contains( 485 if (library.entryCompilationUnit.script.name.contains(
486 'dart/tests/compiler/dart2js_native') 486 'dart/tests/compiler/dart2js_native')
487 || libraryName == 'dart:async' 487 || libraryName == 'dart:async'
488 || libraryName == 'dart:html' 488 || libraryName == 'dart:html'
489 || libraryName == 'dart:html_common' 489 || libraryName == 'dart:html_common'
490 || libraryName == 'dart:indexed_db' 490 || libraryName == 'dart:indexed_db'
491 || libraryName == 'dart:svg' 491 || libraryName == 'dart:svg'
492 || libraryName == 'dart:typeddata'
492 || libraryName == 'dart:web_audio' 493 || libraryName == 'dart:web_audio'
493 || libraryName == 'dart:web_gl' 494 || libraryName == 'dart:web_gl'
494 || libraryName == 'dart:web_sql') { 495 || libraryName == 'dart:web_sql') {
495 library.canUseNative = true; 496 library.canUseNative = true;
496 } 497 }
497 } 498 }
498 499
499 /** 500 /**
500 * A summary of the behavior of a native element. 501 * A summary of the behavior of a native element.
501 * 502 *
(...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after
907 } else { 908 } else {
908 if (parameters.parameterCount != 0) { 909 if (parameters.parameterCount != 0) {
909 compiler.cancel( 910 compiler.cancel(
910 'native "..." syntax is restricted to functions with zero parameters', 911 'native "..." syntax is restricted to functions with zero parameters',
911 node: nativeBody); 912 node: nativeBody);
912 } 913 }
913 LiteralString jsCode = nativeBody.asLiteralString(); 914 LiteralString jsCode = nativeBody.asLiteralString();
914 builder.push(new HForeign.statement(jsCode.dartString, <HInstruction>[])); 915 builder.push(new HForeign.statement(jsCode.dartString, <HInstruction>[]));
915 } 916 }
916 } 917 }
OLDNEW
« no previous file with comments | « no previous file | sdk/lib/_internal/libraries.dart » ('j') | tests/html/url_test.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698