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

Unified Diff: runtime/vm/weak_code.cc

Issue 1559653002: Investigate & fix issues around usage_count and deoptimization_count (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: d Created 4 years, 12 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
« no previous file with comments | « runtime/vm/weak_code.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/weak_code.cc
diff --git a/runtime/vm/weak_code.cc b/runtime/vm/weak_code.cc
index e6422046c81d6575a967e6281809ba03a7389e14..7c817d03ab8843fdd9c34869e75e3b5c926fb9b6 100644
--- a/runtime/vm/weak_code.cc
+++ b/runtime/vm/weak_code.cc
@@ -14,6 +14,11 @@
namespace dart {
+bool WeakCodeReferences::HasCodes() const {
+ return !array_.IsNull() && (array_.Length() > 0);
+}
+
+
void WeakCodeReferences::Register(const Code& value) {
if (!array_.IsNull()) {
// Try to find and reuse cleared WeakProperty to avoid allocating new one.
« no previous file with comments | « runtime/vm/weak_code.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698