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

Unified Diff: runtime/vm/object.cc

Issue 1873283003: Provide a mechanism for naming a hash table so that it can be used in DumpStats to identify the tab… (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 8 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/hash_table_test.cc ('k') | runtime/vm/parser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.cc
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
index a02ce2761597c98a681f788f86efb920066026ab..3997ef499c174fcca8a733965eda0384e6f98545 100644
--- a/runtime/vm/object.cc
+++ b/runtime/vm/object.cc
@@ -2087,6 +2087,8 @@ class FunctionName {
// Traits for looking up Functions by name.
class ClassFunctionsTraits {
public:
+ static const char* Name() { return "ClassFunctionsTraits"; }
+
// Called when growing the table.
static bool IsMatch(const Object& a, const Object& b) {
ASSERT(a.IsFunction() && b.IsFunction());
@@ -8310,6 +8312,8 @@ RawTokenStream* TokenStream::New(intptr_t len) {
// It also supports lookup by TokenDescriptor.
class CompressedTokenTraits {
public:
+ static const char* Name() { return "CompressedTokenTraits"; }
+
static bool IsMatch(const Scanner::TokenDescriptor& descriptor,
const Object& key) {
if (!key.IsLiteralToken()) {
@@ -9239,6 +9243,8 @@ void Library::SetLoadError(const Instance& error) const {
// Traits for looking up Libraries by url in a hash set.
class LibraryUrlTraits {
public:
+ static const char* Name() { return "LibraryUrlTraits"; }
+
// Called when growing the table.
static bool IsMatch(const Object& a, const Object& b) {
ASSERT(a.IsLibrary() && b.IsLibrary());
@@ -9529,6 +9535,8 @@ RawObject* Library::ResolveName(const String& name) const {
class StringEqualsTraits {
public:
+ static const char* Name() { return "StringEqualsTraits"; }
+
static bool IsMatch(const Object& a, const Object& b) {
return String::Cast(a).Equals(String::Cast(b));
}
« no previous file with comments | « runtime/vm/hash_table_test.cc ('k') | runtime/vm/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698