diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2009-10-16 14:05:12 +0200 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2009-10-16 14:30:27 +0200 |
commit | 8e6d978bba0f3c52b297573157e4547ed9d291d1 (patch) | |
tree | b568b8d396ea5c57c60bd26bff536baa84d2b872 /deps/v8/src/serialize.cc | |
parent | 5f82c4baf0e5aadb86f6bfc7f54f8e534ae0338a (diff) | |
download | node-new-8e6d978bba0f3c52b297573157e4547ed9d291d1.tar.gz |
Upgrade v8 to 1.3.16
and apply my V8 patch for debugging.
Diffstat (limited to 'deps/v8/src/serialize.cc')
-rw-r--r-- | deps/v8/src/serialize.cc | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/deps/v8/src/serialize.cc b/deps/v8/src/serialize.cc index 94cd02aac8..6ff1d7f5b0 100644 --- a/deps/v8/src/serialize.cc +++ b/deps/v8/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); } |