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

Side by Side Diff: src/deoptimizer.h

Issue 7343005: Support scope information and evaluation in optimized frames (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: 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/mirror-debugger.js » ('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 699 matching lines...) Expand 10 before | Expand all | Expand 10 after
710 } 710 }
711 711
712 JSFunction* function_; 712 JSFunction* function_;
713 int parameters_count_; 713 int parameters_count_;
714 int expression_count_; 714 int expression_count_;
715 Object** parameters_; 715 Object** parameters_;
716 Object** expression_stack_; 716 Object** expression_stack_;
717 717
718 friend class Deoptimizer; 718 friend class Deoptimizer;
719 }; 719 };
720
721
722 // Scoped version of DeoptimizedFrameInfo.
723 class ScopedDeoptimizedFrameInfo {
Sven Panne 2011/07/12 13:40:32 This class looks a bits strange: If the frame pass
Søren Thygesen Gjesse 2011/07/12 14:20:36 That is true, but it was the simplest way to have
724 public:
725 ScopedDeoptimizedFrameInfo(JavaScriptFrame* frame,
726 int inlined_frame_index,
727 Isolate* isolate)
728 : deoptimized_frame_(NULL), isolate_(isolate) {
729 // Calculate the deoptimized frame.
730 if (frame->is_optimized()) {
731 deoptimized_frame_ = Deoptimizer::DebuggerInspectableFrame(
732 frame, inlined_frame_index, isolate);
733 }
734 }
735
736 ~ScopedDeoptimizedFrameInfo() {
737 // Get rid of the calculated deoptimized frame if any.
738 if (deoptimized_frame_ != NULL) {
739 Deoptimizer::DeleteDebuggerInspectableFrame(deoptimized_frame_,
740 isolate_);
741 }
742 }
743
744 int parameters_count() { return deoptimized_frame_->parameters_count(); }
745 int expression_count() { return deoptimized_frame_->expression_count(); }
746 JSFunction* GetFunction() { return deoptimized_frame_->GetFunction(); }
747 Object* GetParameter(int index) {
748 return deoptimized_frame_->GetParameter(index);
749 }
750 Object* GetExpression(int index) {
751 return deoptimized_frame_->GetExpression(index);
752 }
753
754 private:
755 DeoptimizedFrameInfo* deoptimized_frame_;
756 Isolate* isolate_;
757 };
720 #endif 758 #endif
721 759
722 } } // namespace v8::internal 760 } } // namespace v8::internal
723 761
724 #endif // V8_DEOPTIMIZER_H_ 762 #endif // V8_DEOPTIMIZER_H_
OLDNEW
« no previous file with comments | « no previous file | src/mirror-debugger.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698