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

Side by Side Diff: src/deoptimizer.h

Issue 7227006: Add inspection of function for optimized frames (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Address review comments Created 9 years, 5 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | src/deoptimizer.cc » ('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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 647 matching lines...) Expand 10 before | Expand all | Expand 10 after
658 public: 658 public:
659 DeoptimizedFrameInfo(Deoptimizer* deoptimizer, int frame_index); 659 DeoptimizedFrameInfo(Deoptimizer* deoptimizer, int frame_index);
660 virtual ~DeoptimizedFrameInfo(); 660 virtual ~DeoptimizedFrameInfo();
661 661
662 // GC support. 662 // GC support.
663 void Iterate(ObjectVisitor* v); 663 void Iterate(ObjectVisitor* v);
664 664
665 // Return the height of the expression stack. 665 // Return the height of the expression stack.
666 int expression_count() { return expression_count_; } 666 int expression_count() { return expression_count_; }
667 667
668 // Get the frame function.
669 JSFunction* GetFunction() {
670 return function_;
671 }
672
668 // Get an expression from the expression stack. 673 // Get an expression from the expression stack.
669 Object* GetExpression(int index) { 674 Object* GetExpression(int index) {
670 ASSERT(0 <= index && index < expression_count()); 675 ASSERT(0 <= index && index < expression_count());
671 return expression_stack_[index]; 676 return expression_stack_[index];
672 } 677 }
673 678
674 private: 679 private:
680 // Set the frame function.
681 void SetFunction(JSFunction* function) {
682 function_ = function;
683 }
684
675 // Set an expression on the expression stack. 685 // Set an expression on the expression stack.
676 void SetExpression(int index, Object* obj) { 686 void SetExpression(int index, Object* obj) {
677 ASSERT(0 <= index && index < expression_count()); 687 ASSERT(0 <= index && index < expression_count());
678 expression_stack_[index] = obj; 688 expression_stack_[index] = obj;
679 } 689 }
680 690
691 JSFunction* function_;
681 int expression_count_; 692 int expression_count_;
682 Object** expression_stack_; 693 Object** expression_stack_;
683 694
684 friend class Deoptimizer; 695 friend class Deoptimizer;
685 }; 696 };
686 #endif 697 #endif
687 698
688 } } // namespace v8::internal 699 } } // namespace v8::internal
689 700
690 #endif // V8_DEOPTIMIZER_H_ 701 #endif // V8_DEOPTIMIZER_H_
OLDNEW
« no previous file with comments | « no previous file | src/deoptimizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698