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

Unified Diff: sdk/lib/_internal/compiler/implementation/native_handler.dart

Issue 11783009: Big merge from experimental to bleeding edge. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: sdk/lib/_internal/compiler/implementation/native_handler.dart
diff --git a/sdk/lib/_internal/compiler/implementation/native_handler.dart b/sdk/lib/_internal/compiler/implementation/native_handler.dart
index 4367c6d9dde631fe6498a6a9ea1f6481774e3f33..c0af4bf09d038b30e783aab7607d3964f8f58072 100644
--- a/sdk/lib/_internal/compiler/implementation/native_handler.dart
+++ b/sdk/lib/_internal/compiler/implementation/native_handler.dart
@@ -33,7 +33,7 @@ class SpecialType {
*/
class NativeEnqueuer {
/// Initial entry point to native enqueuer.
- void processNativeClasses(Collection<LibraryElement> libraries) {}
+ void processNativeClasses(Iterable<LibraryElement> libraries) {}
/// Notification of a main Enqueuer worklist element. For methods, adds
/// information from metadata attributes, and computes types instantiated due
@@ -101,7 +101,7 @@ abstract class NativeEnqueuerBase implements NativeEnqueuer {
/// Subclasses of [NativeEnqueuerBase] are constructed by the backend.
NativeEnqueuerBase(this.world, this.compiler, this.enableLiveTypeAnalysis);
- void processNativeClasses(Collection<LibraryElement> libraries) {
+ void processNativeClasses(Iterable<LibraryElement> libraries) {
libraries.forEach(processNativeClassesInLibrary);
processNativeClassesInLibrary(compiler.isolateHelperLibrary);
if (!enableLiveTypeAnalysis) {
@@ -350,7 +350,7 @@ abstract class NativeEnqueuerBase implements NativeEnqueuer {
enqueueUnusedClassesMatching(bool predicate(classElement),
cause,
[String reason]) {
- Collection matches = unusedClasses.filter(predicate);
+ Iterable matches = unusedClasses.where(predicate);
matches.forEach((c) => enqueueClass(c, cause));
}
@@ -400,7 +400,7 @@ class NativeCodegenEnqueuer extends NativeEnqueuerBase {
NativeCodegenEnqueuer(Enqueuer world, Compiler compiler, this.emitter)
: super(world, compiler, compiler.enableNativeLiveTypeAnalysis);
- void processNativeClasses(Collection<LibraryElement> libraries) {
+ void processNativeClasses(Iterable<LibraryElement> libraries) {
super.processNativeClasses(libraries);
// HACK HACK - add all the resolved classes.
@@ -454,6 +454,7 @@ void maybeEnableNative(Compiler compiler,
String libraryName = uri.toString();
if (library.entryCompilationUnit.script.name.contains(
'dart/tests/compiler/dart2js_native')
+ || libraryName == 'dart:async'
|| libraryName == 'dart:html'
|| libraryName == 'dart:html_common'
|| libraryName == 'dart:indexed_db'

Powered by Google App Engine
This is Rietveld 408576698