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

Side by Side Diff: src/api.cc

Issue 5274002: Version 2.5.8... (Closed) Base URL: http://v8.googlecode.com/svn/trunk/
Patch Set: Created 10 years 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/SConscript ('k') | src/apiutils.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 4651 matching lines...) Expand 10 before | Expand all | Expand 10 after
4662 } 4662 }
4663 4663
4664 4664
4665 Handle<Value> HeapGraphEdge::GetName() const { 4665 Handle<Value> HeapGraphEdge::GetName() const {
4666 IsDeadCheck("v8::HeapGraphEdge::GetName"); 4666 IsDeadCheck("v8::HeapGraphEdge::GetName");
4667 i::HeapGraphEdge* edge = ToInternal(this); 4667 i::HeapGraphEdge* edge = ToInternal(this);
4668 switch (edge->type()) { 4668 switch (edge->type()) {
4669 case i::HeapGraphEdge::kContextVariable: 4669 case i::HeapGraphEdge::kContextVariable:
4670 case i::HeapGraphEdge::kInternal: 4670 case i::HeapGraphEdge::kInternal:
4671 case i::HeapGraphEdge::kProperty: 4671 case i::HeapGraphEdge::kProperty:
4672 case i::HeapGraphEdge::kShortcut:
4672 return Handle<String>(ToApi<String>(i::Factory::LookupAsciiSymbol( 4673 return Handle<String>(ToApi<String>(i::Factory::LookupAsciiSymbol(
4673 edge->name()))); 4674 edge->name())));
4674 case i::HeapGraphEdge::kElement: 4675 case i::HeapGraphEdge::kElement:
4676 case i::HeapGraphEdge::kHidden:
4675 return Handle<Number>(ToApi<Number>(i::Factory::NewNumberFromInt( 4677 return Handle<Number>(ToApi<Number>(i::Factory::NewNumberFromInt(
4676 edge->index()))); 4678 edge->index())));
4677 default: UNREACHABLE(); 4679 default: UNREACHABLE();
4678 } 4680 }
4679 return ImplementationUtilities::Undefined(); 4681 return ImplementationUtilities::Undefined();
4680 } 4682 }
4681 4683
4682 4684
4683 const HeapGraphNode* HeapGraphEdge::GetFromNode() const { 4685 const HeapGraphNode* HeapGraphEdge::GetFromNode() const {
4684 IsDeadCheck("v8::HeapGraphEdge::GetFromNode"); 4686 IsDeadCheck("v8::HeapGraphEdge::GetFromNode");
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
4754 return static_cast<int>(ToInternal(this)->id()); 4756 return static_cast<int>(ToInternal(this)->id());
4755 } 4757 }
4756 4758
4757 4759
4758 int HeapGraphNode::GetSelfSize() const { 4760 int HeapGraphNode::GetSelfSize() const {
4759 IsDeadCheck("v8::HeapGraphNode::GetSelfSize"); 4761 IsDeadCheck("v8::HeapGraphNode::GetSelfSize");
4760 return ToInternal(this)->self_size(); 4762 return ToInternal(this)->self_size();
4761 } 4763 }
4762 4764
4763 4765
4764 int HeapGraphNode::GetReachableSize() const { 4766 int HeapGraphNode::GetRetainedSize(bool exact) const {
4765 IsDeadCheck("v8::HeapSnapshot::GetReachableSize"); 4767 IsDeadCheck("v8::HeapSnapshot::GetRetainedSize");
4766 return ToInternal(this)->ReachableSize(); 4768 return ToInternal(this)->RetainedSize(exact);
4767 } 4769 }
4768 4770
4769 4771
4770 int HeapGraphNode::GetRetainedSize() const {
4771 IsDeadCheck("v8::HeapSnapshot::GetRetainedSize");
4772 return ToInternal(this)->RetainedSize();
4773 }
4774
4775
4776 int HeapGraphNode::GetChildrenCount() const { 4772 int HeapGraphNode::GetChildrenCount() const {
4777 IsDeadCheck("v8::HeapSnapshot::GetChildrenCount"); 4773 IsDeadCheck("v8::HeapSnapshot::GetChildrenCount");
4778 return ToInternal(this)->children().length(); 4774 return ToInternal(this)->children().length();
4779 } 4775 }
4780 4776
4781 4777
4782 const HeapGraphEdge* HeapGraphNode::GetChild(int index) const { 4778 const HeapGraphEdge* HeapGraphNode::GetChild(int index) const {
4783 IsDeadCheck("v8::HeapSnapshot::GetChild"); 4779 IsDeadCheck("v8::HeapSnapshot::GetChild");
4784 return reinterpret_cast<const HeapGraphEdge*>( 4780 return reinterpret_cast<const HeapGraphEdge*>(
4785 &ToInternal(this)->children()[index]); 4781 &ToInternal(this)->children()[index]);
(...skipping 19 matching lines...) Expand all
4805 } 4801 }
4806 4802
4807 4803
4808 const HeapGraphPath* HeapGraphNode::GetRetainingPath(int index) const { 4804 const HeapGraphPath* HeapGraphNode::GetRetainingPath(int index) const {
4809 IsDeadCheck("v8::HeapSnapshot::GetRetainingPath"); 4805 IsDeadCheck("v8::HeapSnapshot::GetRetainingPath");
4810 return reinterpret_cast<const HeapGraphPath*>( 4806 return reinterpret_cast<const HeapGraphPath*>(
4811 ToInternal(this)->GetRetainingPaths()->at(index)); 4807 ToInternal(this)->GetRetainingPaths()->at(index));
4812 } 4808 }
4813 4809
4814 4810
4811 const HeapGraphNode* HeapGraphNode::GetDominatorNode() const {
4812 IsDeadCheck("v8::HeapSnapshot::GetDominatorNode");
4813 return reinterpret_cast<const HeapGraphNode*>(ToInternal(this)->dominator());
4814 }
4815
4816
4815 const HeapGraphNode* HeapSnapshotsDiff::GetAdditionsRoot() const { 4817 const HeapGraphNode* HeapSnapshotsDiff::GetAdditionsRoot() const {
4816 IsDeadCheck("v8::HeapSnapshotsDiff::GetAdditionsRoot"); 4818 IsDeadCheck("v8::HeapSnapshotsDiff::GetAdditionsRoot");
4817 i::HeapSnapshotsDiff* diff = 4819 i::HeapSnapshotsDiff* diff =
4818 const_cast<i::HeapSnapshotsDiff*>( 4820 const_cast<i::HeapSnapshotsDiff*>(
4819 reinterpret_cast<const i::HeapSnapshotsDiff*>(this)); 4821 reinterpret_cast<const i::HeapSnapshotsDiff*>(this));
4820 return reinterpret_cast<const HeapGraphNode*>(diff->additions_root()); 4822 return reinterpret_cast<const HeapGraphNode*>(diff->additions_root());
4821 } 4823 }
4822 4824
4823 4825
4824 const HeapGraphNode* HeapSnapshotsDiff::GetDeletionsRoot() const { 4826 const HeapGraphNode* HeapSnapshotsDiff::GetDeletionsRoot() const {
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
5003 5005
5004 5006
5005 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) { 5007 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) {
5006 HandleScopeImplementer* thread_local = 5008 HandleScopeImplementer* thread_local =
5007 reinterpret_cast<HandleScopeImplementer*>(storage); 5009 reinterpret_cast<HandleScopeImplementer*>(storage);
5008 thread_local->IterateThis(v); 5010 thread_local->IterateThis(v);
5009 return storage + ArchiveSpacePerThread(); 5011 return storage + ArchiveSpacePerThread();
5010 } 5012 }
5011 5013
5012 } } // namespace v8::internal 5014 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/SConscript ('k') | src/apiutils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698