Commit 141e82b3 authored by whesse@chromium.org's avatar whesse@chromium.org

Allow List::sort, with an integer comparison function, to sort 64-bit pointers...

Allow List::sort, with an integer comparison function, to sort 64-bit pointers in profile-generator.  Change a static const int member to be declared and defined only inside the class declaration in class Runtime.
Review URL: http://codereview.chromium.org/3424002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5453 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 228d56bd
...@@ -2465,10 +2465,18 @@ void HeapSnapshotJSONSerializer::SerializeStrings() { ...@@ -2465,10 +2465,18 @@ void HeapSnapshotJSONSerializer::SerializeStrings() {
template<typename T> template<typename T>
inline static int SortUsingEntryValue(const T* x, const T* y) { inline static int SortUsingEntryValue(const T* x, const T* y) {
return reinterpret_cast<intptr_t>((*x)->value) - uintptr_t x_uint = reinterpret_cast<uintptr_t>((*x)->value);
reinterpret_cast<intptr_t>((*y)->value); uintptr_t y_uint = reinterpret_cast<uintptr_t>((*y)->value);
if (x_uint > y_uint) {
return 1;
} else if (x_uint == y_uint) {
return 0;
} else {
return -1;
}
} }
void HeapSnapshotJSONSerializer::SortHashMap( void HeapSnapshotJSONSerializer::SortHashMap(
HashMap* map, List<HashMap::Entry*>* sorted_entries) { HashMap* map, List<HashMap::Entry*>* sorted_entries) {
for (HashMap::Entry* p = map->Start(); p != NULL; p = map->Next(p)) for (HashMap::Entry* p = map->Start(); p != NULL; p = map->Next(p))
......
...@@ -10106,9 +10106,6 @@ Runtime::Function kIntrinsicFunctions[] = { ...@@ -10106,9 +10106,6 @@ Runtime::Function kIntrinsicFunctions[] = {
}; };
const int Runtime::kNotFound;
Object* Runtime::InitializeIntrinsicFunctionNames(Object* dictionary) { Object* Runtime::InitializeIntrinsicFunctionNames(Object* dictionary) {
ASSERT(dictionary != NULL); ASSERT(dictionary != NULL);
ASSERT(StringDictionary::cast(dictionary)->NumberOfElements() == 0); ASSERT(StringDictionary::cast(dictionary)->NumberOfElements() == 0);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment