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

Side by Side Diff: pkg/dev_compiler/tool/input_sdk/private/isolate_helper.dart

Issue 2871363002: Fix more errors in DDC SDK. (Closed)
Patch Set: Merge branch 'master' into ddc-sdk-errors Created 3 years, 7 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
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 dart._isolate_helper; 5 library dart._isolate_helper;
6 6
7 import 'dart:_js_embedded_names' 7 import 'dart:_js_embedded_names'
8 show 8 show
9 CLASS_ID_EXTRACTOR, 9 CLASS_ID_EXTRACTOR,
10 CLASS_FIELDS_EXTRACTOR, 10 CLASS_FIELDS_EXTRACTOR,
(...skipping 728 matching lines...) Expand 10 before | Expand all | Expand 10 after
739 // primitives that require support for spawning workers. The field starts out 739 // primitives that require support for spawning workers. The field starts out
740 // by being null, and dart2js' type inference will track if it can have a 740 // by being null, and dart2js' type inference will track if it can have a
741 // non-null value. So by testing if this value is not null, we generate code 741 // non-null value. So by testing if this value is not null, we generate code
742 // that dart2js knows is dead when worker support isn't needed. 742 // that dart2js knows is dead when worker support isn't needed.
743 // TODO(herhut): Initialize this to false when able to track compile-time 743 // TODO(herhut): Initialize this to false when able to track compile-time
744 // constants. 744 // constants.
745 static var enableSpawnWorker; 745 static var enableSpawnWorker;
746 746
747 static String thisScript = computeThisScript(); 747 static String thisScript = computeThisScript();
748 748
749 /// Returns the base path added to Uri.base to resolve `package:` Uris.
750 ///
751 /// This is used by `Isolate.resolvePackageUri` to load resources. The default
752 /// value is `packages/` but users can override this by using the
753 /// `defaultPackagesBase` hook.
754 static String get packagesBase =>
755 JS('String', r'#.defaultPackagesBase || "packages/"', global);
756
749 /// Associates an ID with a native worker object. 757 /// Associates an ID with a native worker object.
750 static final Expando<int> workerIds = new Expando<int>(); 758 static final Expando<int> workerIds = new Expando<int>();
751 759
752 /** 760 /**
753 * The src url for the script tag that loaded this Used to create 761 * The src url for the script tag that loaded this Used to create
754 * JavaScript workers. 762 * JavaScript workers.
755 */ 763 */
756 static String computeThisScript() { 764 static String computeThisScript() {
757 // See: https://github.com/dart-lang/dev_compiler/issues/164 765 // See: https://github.com/dart-lang/dev_compiler/issues/164
758 // var currentScript = JS_EMBEDDED_GLOBAL('', CURRENT_SCRIPT); 766 // var currentScript = JS_EMBEDDED_GLOBAL('', CURRENT_SCRIPT);
(...skipping 692 matching lines...) Expand 10 before | Expand all | Expand 10 after
1451 } 1459 }
1452 1460
1453 bool operator ==(Object other) { 1461 bool operator ==(Object other) {
1454 if (identical(other, this)) return true; 1462 if (identical(other, this)) return true;
1455 if (other is CapabilityImpl) { 1463 if (other is CapabilityImpl) {
1456 return identical(_id, other._id); 1464 return identical(_id, other._id);
1457 } 1465 }
1458 return false; 1466 return false;
1459 } 1467 }
1460 } 1468 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698