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

Unified Diff: pkg/compiler/lib/src/js_backend/backend.dart

Issue 1408253006: Introduce "platform configurations" to replace categories and libraries.dart. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Fix create_sdk scripts according to review Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/compiler/lib/src/dart_backend/backend.dart ('k') | pkg/compiler/lib/src/platform_configuration.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/js_backend/backend.dart
diff --git a/pkg/compiler/lib/src/js_backend/backend.dart b/pkg/compiler/lib/src/js_backend/backend.dart
index 6236ed0202a5544865e68d60a9f540e73236b377..62c863cd519526ec83f1ad85a25cea371e885bfc 100644
--- a/pkg/compiler/lib/src/js_backend/backend.dart
+++ b/pkg/compiler/lib/src/js_backend/backend.dart
@@ -2577,6 +2577,28 @@ class JavaScriptBackend extends Backend {
}
return rewriter.rewrite(code);
}
+
+ /// The locations of js patch-files relative to the sdk-descriptors.
+ static const _patchLocations = const <String, String>{
+ "async": "_internal/js_runtime/lib/async_patch.dart",
+ "collection": "_internal/js_runtime/lib/collection_patch.dart",
+ "convert": "_internal/js_runtime/lib/convert_patch.dart",
+ "core": "_internal/js_runtime/lib/core_patch.dart",
+ "developer": "_internal/js_runtime/lib/developer_patch.dart",
+ "io": "_internal/js_runtime/lib/io_patch.dart",
+ "isolate": "_internal/js_runtime/lib/isolate_patch.dart",
+ "math": "_internal/js_runtime/lib/math_patch.dart",
+ "mirrors": "_internal/js_runtime/lib/mirrors_patch.dart",
+ "typed_data": "_internal/js_runtime/lib/typed_data_patch.dart",
+ "_internal": "_internal/js_runtime/lib/internal_patch.dart"
+ };
+
+ @override
+ Uri resolvePatchUri(String libraryName, Uri platformConfigUri) {
+ String patchLocation = _patchLocations[libraryName];
+ if (patchLocation == null) return null;
+ return platformConfigUri.resolve(patchLocation);
+ }
}
/// Handling of special annotations for tests.
« no previous file with comments | « pkg/compiler/lib/src/dart_backend/backend.dart ('k') | pkg/compiler/lib/src/platform_configuration.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698