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

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

Issue 11549017: Clean up the patch file for the isolate library by introducing a new builtin library: isolate_helpe… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years 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 434 matching lines...) Expand 10 before | Expand all | Expand 10 after
445 '${unusedClasses.length} native classes omitted.'); 445 '${unusedClasses.length} native classes omitted.');
446 } 446 }
447 } 447 }
448 448
449 void maybeEnableNative(Compiler compiler, 449 void maybeEnableNative(Compiler compiler,
450 LibraryElement library, 450 LibraryElement library,
451 Uri uri) { 451 Uri uri) {
452 String libraryName = uri.toString(); 452 String libraryName = uri.toString();
453 if (library.entryCompilationUnit.script.name.contains( 453 if (library.entryCompilationUnit.script.name.contains(
454 'dart/tests/compiler/dart2js_native') 454 'dart/tests/compiler/dart2js_native')
455 || libraryName == 'dart:isolate'
456 || libraryName == 'dart:html' 455 || libraryName == 'dart:html'
457 || libraryName == 'dart:html_common' 456 || libraryName == 'dart:html_common'
458 || libraryName == 'dart:indexed_db' 457 || libraryName == 'dart:indexed_db'
459 || libraryName == 'dart:svg' 458 || libraryName == 'dart:svg'
460 || libraryName == 'dart:web_audio') { 459 || libraryName == 'dart:web_audio') {
461 library.canUseNative = true; 460 library.canUseNative = true;
462 } 461 }
463 } 462 }
464 463
465 /** 464 /**
(...skipping 422 matching lines...) Expand 10 before | Expand all | Expand 10 after
888 builder.add(new HForeign( 887 builder.add(new HForeign(
889 new DartString.literal('${parameter.name.slowToString()} = #'), 888 new DartString.literal('${parameter.name.slowToString()} = #'),
890 const LiteralDartString('void'), 889 const LiteralDartString('void'),
891 <HInstruction>[jsClosure])); 890 <HInstruction>[jsClosure]));
892 } 891 }
893 }); 892 });
894 LiteralString jsCode = nativeBody.asLiteralString(); 893 LiteralString jsCode = nativeBody.asLiteralString();
895 builder.push(new HForeign.statement(jsCode.dartString, <HInstruction>[])); 894 builder.push(new HForeign.statement(jsCode.dartString, <HInstruction>[]));
896 } 895 }
897 } 896 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698