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

Unified Diff: runtime/vm/object.cc

Issue 1830473002: Speedup function profile by using a hash table instead of a linear scan (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 9 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
Index: runtime/vm/object.cc
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
index 6591ecbbca4a0847001316b906b8bd2ddb1b112b..d50432eb253f1b52150af9906821f7c198b8eca7 100644
--- a/runtime/vm/object.cc
+++ b/runtime/vm/object.cc
@@ -5174,6 +5174,11 @@ void PatchClass::set_script(const Script& value) const {
}
+intptr_t Function::Hash() const {
+ return String::HashRawSymbol(name());
+}
+
+
bool Function::HasBreakpoint() const {
if (!FLAG_support_debugger) {
return false;

Powered by Google App Engine
This is Rietveld 408576698