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

Side by Side 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 unified diff | Download patch
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 part of js_backend; 5 part of js_backend;
6 6
7 const VERBOSE_OPTIMIZER_HINTS = false; 7 const VERBOSE_OPTIMIZER_HINTS = false;
8 8
9 class JavaScriptItemCompilationContext extends ItemCompilationContext { 9 class JavaScriptItemCompilationContext extends ItemCompilationContext {
10 final Set<HInstruction> boundsChecked = new Set<HInstruction>(); 10 final Set<HInstruction> boundsChecked = new Set<HInstruction>();
(...skipping 2559 matching lines...) Expand 10 before | Expand all | Expand 10 after
2570 yieldStarExpression: emitter.staticFunctionAccess( 2570 yieldStarExpression: emitter.staticFunctionAccess(
2571 helpers.yieldStar), 2571 helpers.yieldStar),
2572 bodyName: namer.deriveAsyncBodyName(name)); 2572 bodyName: namer.deriveAsyncBodyName(name));
2573 break; 2573 break;
2574 default: 2574 default:
2575 assert(element.asyncMarker == AsyncMarker.SYNC); 2575 assert(element.asyncMarker == AsyncMarker.SYNC);
2576 return code; 2576 return code;
2577 } 2577 }
2578 return rewriter.rewrite(code); 2578 return rewriter.rewrite(code);
2579 } 2579 }
2580
2581 /// The locations of js patch-files relative to the sdk-descriptors.
2582 static const _patchLocations = const <String, String>{
2583 "async": "_internal/js_runtime/lib/async_patch.dart",
2584 "collection": "_internal/js_runtime/lib/collection_patch.dart",
2585 "convert": "_internal/js_runtime/lib/convert_patch.dart",
2586 "core": "_internal/js_runtime/lib/core_patch.dart",
2587 "developer": "_internal/js_runtime/lib/developer_patch.dart",
2588 "io": "_internal/js_runtime/lib/io_patch.dart",
2589 "isolate": "_internal/js_runtime/lib/isolate_patch.dart",
2590 "math": "_internal/js_runtime/lib/math_patch.dart",
2591 "mirrors": "_internal/js_runtime/lib/mirrors_patch.dart",
2592 "typed_data": "_internal/js_runtime/lib/typed_data_patch.dart",
2593 "_internal": "_internal/js_runtime/lib/internal_patch.dart"
2594 };
2595
2596 @override
2597 Uri resolvePatchUri(String libraryName, Uri platformConfigUri) {
2598 String patchLocation = _patchLocations[libraryName];
2599 if (patchLocation == null) return null;
2600 return platformConfigUri.resolve(patchLocation);
2601 }
2580 } 2602 }
2581 2603
2582 /// Handling of special annotations for tests. 2604 /// Handling of special annotations for tests.
2583 class Annotations { 2605 class Annotations {
2584 static final Uri PACKAGE_EXPECT = 2606 static final Uri PACKAGE_EXPECT =
2585 new Uri(scheme: 'package', path: 'expect/expect.dart'); 2607 new Uri(scheme: 'package', path: 'expect/expect.dart');
2586 2608
2587 final Compiler compiler; 2609 final Compiler compiler;
2588 2610
2589 ClassElement expectNoInlineClass; 2611 ClassElement expectNoInlineClass;
(...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after
3001 } 3023 }
3002 } 3024 }
3003 3025
3004 /// Records that [constant] is used by the element behind [registry]. 3026 /// Records that [constant] is used by the element behind [registry].
3005 class Dependency { 3027 class Dependency {
3006 final ConstantValue constant; 3028 final ConstantValue constant;
3007 final Element annotatedElement; 3029 final Element annotatedElement;
3008 3030
3009 const Dependency(this.constant, this.annotatedElement); 3031 const Dependency(this.constant, this.annotatedElement);
3010 } 3032 }
OLDNEW
« 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