Reviewers: yurys, loislo, Yang,
Description:
Move anonymous function name beautifying out of v8.
Please review this at https://codereview.chromium.org/425223004/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files (+2, -11 lines):
M src/profile-generator.h
M src/profile-generator.cc
Index: src/profile-generator.cc
diff --git a/src/profile-generator.cc b/src/profile-generator.cc
index
44f7555b350cfeff8f078ac0da75fa75f09547fd..1cabebfc062c14459f669a7fa5cd6a147cbe902a
100644
--- a/src/profile-generator.cc
+++ b/src/profile-generator.cc
@@ -107,17 +107,12 @@ const char* StringsStorage::GetName(int index) {
const char* StringsStorage::GetFunctionName(Name* name) {
- return BeautifyFunctionName(GetName(name));
+ return GetName(name);
}
const char* StringsStorage::GetFunctionName(const char* name) {
- return BeautifyFunctionName(GetCopy(name));
-}
-
-
-const char* StringsStorage::BeautifyFunctionName(const char* name) {
- return (*name == 0) ? ProfileGenerator::kAnonymousFunctionName : name;
+ return GetCopy(name);
}
@@ -552,8 +547,6 @@ CodeEntry* CpuProfilesCollection::NewCodeEntry(
}
-const char* const ProfileGenerator::kAnonymousFunctionName =
- "(anonymous function)";
const char* const ProfileGenerator::kProgramEntryName =
"(program)";
const char* const ProfileGenerator::kIdleEntryName =
Index: src/profile-generator.h
diff --git a/src/profile-generator.h b/src/profile-generator.h
index
1fb2a464b3159be02dc9bdf30c3f0e17b700a23e..5ebb92bba3b0ed6ed87b02e2dbe6f02280c30a9f
100644
--- a/src/profile-generator.h
+++ b/src/profile-generator.h
@@ -34,7 +34,6 @@ class StringsStorage {
static const int kMaxNameSize = 1024;
static bool StringsMatch(void* key1, void* key2);
- const char* BeautifyFunctionName(const char* name);
const char* AddOrDisposeString(char* str, int len);
HashMap::Entry* GetEntry(const char* str, int len);
@@ -313,7 +312,6 @@ class ProfileGenerator {
CodeMap* code_map() { return &code_map_; }
- static const char* const kAnonymousFunctionName;
static const char* const kProgramEntryName;
static const char* const kIdleEntryName;
static const char* const kGarbageCollectorEntryName;
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.