summaryrefslogtreecommitdiff
path: root/deps/v8/src/profile-generator-inl.h
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2010-11-24 01:03:06 -0800
committerRyan Dahl <ry@tinyclouds.org>2010-11-24 01:03:06 -0800
commit73318fa09d0b67a67c1033bf0bfcc0e78883f257 (patch)
treeecdf0c18b14e3158cfbdff95d012f810b216f43d /deps/v8/src/profile-generator-inl.h
parentfa8ffaf9b2375f98ac86f887bf76f3aa81fa5aa4 (diff)
downloadnode-new-73318fa09d0b67a67c1033bf0bfcc0e78883f257.tar.gz
Upgrade V8 to 2.5.8
Diffstat (limited to 'deps/v8/src/profile-generator-inl.h')
-rw-r--r--deps/v8/src/profile-generator-inl.h43
1 files changed, 25 insertions, 18 deletions
diff --git a/deps/v8/src/profile-generator-inl.h b/deps/v8/src/profile-generator-inl.h
index cdfa9e2d71..8b5c1e21cb 100644
--- a/deps/v8/src/profile-generator-inl.h
+++ b/deps/v8/src/profile-generator-inl.h
@@ -105,24 +105,6 @@ void CodeMap::DeleteCode(Address addr) {
}
-template<class Visitor>
-void HeapEntriesMap::UpdateEntries(Visitor* visitor) {
- for (HashMap::Entry* p = entries_.Start();
- p != NULL;
- p = entries_.Next(p)) {
- if (!IsAlias(p->value)) {
- EntryInfo* entry_info = reinterpret_cast<EntryInfo*>(p->value);
- entry_info->entry = visitor->GetEntry(
- reinterpret_cast<HeapObject*>(p->key),
- entry_info->children_count,
- entry_info->retainers_count);
- entry_info->children_count = 0;
- entry_info->retainers_count = 0;
- }
- }
-}
-
-
CodeEntry* ProfileGenerator::EntryForVMState(StateTag tag) {
switch (tag) {
case GC:
@@ -139,6 +121,31 @@ CodeEntry* ProfileGenerator::EntryForVMState(StateTag tag) {
}
}
+
+inline uint64_t HeapEntry::id() {
+ union {
+ Id stored_id;
+ uint64_t returned_id;
+ } id_adaptor = {id_};
+ return id_adaptor.returned_id;
+}
+
+
+template<class Visitor>
+void HeapEntriesMap::UpdateEntries(Visitor* visitor) {
+ for (HashMap::Entry* p = entries_.Start();
+ p != NULL;
+ p = entries_.Next(p)) {
+ EntryInfo* entry_info = reinterpret_cast<EntryInfo*>(p->value);
+ entry_info->entry = visitor->GetEntry(
+ reinterpret_cast<HeapObject*>(p->key),
+ entry_info->children_count,
+ entry_info->retainers_count);
+ entry_info->children_count = 0;
+ entry_info->retainers_count = 0;
+ }
+}
+
} } // namespace v8::internal
#endif // ENABLE_LOGGING_AND_PROFILING