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

Unified Diff: src/serialize.cc

Issue 196139: X64: Convert smis to holding 32 bits of payload. (Closed)
Patch Set: Addressed review comments. Forwarded to head. Created 11 years, 2 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 | « src/runtime.cc ('k') | src/top.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/serialize.cc
diff --git a/src/serialize.cc b/src/serialize.cc
index 94cd02aac850c39d413b3e63a82860e8ec1672ee..6ff1d7f5b0063941ef0b922e993e142b48e5fc07 100644
--- a/src/serialize.cc
+++ b/src/serialize.cc
@@ -38,6 +38,7 @@
#include "serialize.h"
#include "stub-cache.h"
#include "v8threads.h"
+#include "top.h"
namespace v8 {
namespace internal {
@@ -612,12 +613,23 @@ void ExternalReferenceTable::PopulateTable() {
}
// Top addresses
- const char* top_address_format = "Top::get_address_from_id(%i)";
- size_t top_format_length = strlen(top_address_format);
+ const char* top_address_format = "Top::%s";
+
+ const char* AddressNames[] = {
+#define C(name) #name,
+ TOP_ADDRESS_LIST(C)
+ TOP_ADDRESS_LIST_PROF(C)
+ NULL
+#undef C
+ };
+
+ size_t top_format_length = strlen(top_address_format) - 2;
for (uint16_t i = 0; i < Top::k_top_address_count; ++i) {
- Vector<char> name = Vector<char>::New(top_format_length + 1);
+ const char* address_name = AddressNames[i];
+ Vector<char> name =
+ Vector<char>::New(top_format_length + strlen(address_name) + 1);
const char* chars = name.start();
- OS::SNPrintF(name, top_address_format, i);
+ OS::SNPrintF(name, top_address_format, address_name);
Add(Top::get_address_from_id((Top::AddressId)i), TOP_ADDRESS, i, chars);
}
« no previous file with comments | « src/runtime.cc ('k') | src/top.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698