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

Unified Diff: lib/runtime/dart_sdk.js

Issue 2032903003: Switch how we track whether trackDdcProfile is set to reduce the performance impact. sra was seeing… (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 4 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:
Download patch
« no previous file with comments | « no previous file | lib/src/compiler/code_generator.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/runtime/dart_sdk.js
diff --git a/lib/runtime/dart_sdk.js b/lib/runtime/dart_sdk.js
index a1c927671592c7aaea7d06a1cdf6b8f7655b021e..45afbe05969c6d98d99fc81ee768e511cd51a8da 100644
--- a/lib/runtime/dart_sdk.js
+++ b/lib/runtime/dart_sdk.js
@@ -1100,7 +1100,7 @@ dart_library.library('dart_sdk', null, /* Imports */[
dart._callMethodStats[dartx.clear]();
};
dart._trackCall = function(obj, name) {
- if (!dart.global.trackDdcProfile) return;
+ if (!dart.trackProfile) return;
let actual = dart.getReifiedType(obj);
let stackStr = new Error().stack;
let stack = stackStr[dartx.split]('\n at ');
@@ -1885,6 +1885,12 @@ dart_library.library('dart_sdk', null, /* Imports */[
},
set _callMethodStats(_) {}
});
+ dart.defineLazy(dart, {
+ get trackProfile() {
+ return dart.global.trackDdcProfile;
+ },
+ set trackProfile(_) {}
+ });
dart._ignoreTypeFailure = (() => {
return dart._ignoreMemo((actual, type) => {
if (!!dart.isSubtype(type, core.Iterable) && !!dart.isSubtype(actual, core.Iterable) || !!dart.isSubtype(type, async.Future) && !!dart.isSubtype(actual, async.Future) || !!dart.isSubtype(type, core.Map) && !!dart.isSubtype(actual, core.Map) || dart.isFunctionType(type) && dart.isFunctionType(actual) || !!dart.isSubtype(type, async.Stream) && !!dart.isSubtype(actual, async.Stream) || !!dart.isSubtype(type, async.StreamSubscription) && !!dart.isSubtype(actual, async.StreamSubscription)) {
« no previous file with comments | « no previous file | lib/src/compiler/code_generator.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698