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

Side by Side Diff: src/frames.h

Issue 1854713002: Correctly annotate eval origin. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebase Created 4 years, 8 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
« no previous file with comments | « src/factory.cc ('k') | src/frames.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_FRAMES_H_ 5 #ifndef V8_FRAMES_H_
6 #define V8_FRAMES_H_ 6 #define V8_FRAMES_H_
7 7
8 #include "src/allocation.h" 8 #include "src/allocation.h"
9 #include "src/handles.h" 9 #include "src/handles.h"
10 #include "src/safepoint-table.h" 10 #include "src/safepoint-table.h"
(...skipping 622 matching lines...) Expand 10 before | Expand all | Expand 10 after
633 inline explicit ExitFrame(StackFrameIteratorBase* iterator); 633 inline explicit ExitFrame(StackFrameIteratorBase* iterator);
634 634
635 Address GetCallerStackPointer() const override; 635 Address GetCallerStackPointer() const override;
636 636
637 private: 637 private:
638 void ComputeCallerState(State* state) const override; 638 void ComputeCallerState(State* state) const override;
639 639
640 friend class StackFrameIteratorBase; 640 friend class StackFrameIteratorBase;
641 }; 641 };
642 642
643 class JavaScriptFrame;
644
643 class FrameSummary BASE_EMBEDDED { 645 class FrameSummary BASE_EMBEDDED {
644 public: 646 public:
645 FrameSummary(Object* receiver, JSFunction* function, 647 FrameSummary(Object* receiver, JSFunction* function,
646 AbstractCode* abstract_code, int code_offset, 648 AbstractCode* abstract_code, int code_offset,
647 bool is_constructor); 649 bool is_constructor);
648 650
651 static FrameSummary GetFirst(JavaScriptFrame* frame);
652
649 Handle<Object> receiver() { return receiver_; } 653 Handle<Object> receiver() { return receiver_; }
650 Handle<JSFunction> function() { return function_; } 654 Handle<JSFunction> function() { return function_; }
651 Handle<AbstractCode> abstract_code() { return abstract_code_; } 655 Handle<AbstractCode> abstract_code() { return abstract_code_; }
652 int code_offset() { return code_offset_; } 656 int code_offset() { return code_offset_; }
653 bool is_constructor() { return is_constructor_; } 657 bool is_constructor() { return is_constructor_; }
654 658
655 void Print(); 659 void Print();
656 660
657 private: 661 private:
658 Handle<Object> receiver_; 662 Handle<Object> receiver_;
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
722 static inline bool IsConstructFrame(Address fp); 726 static inline bool IsConstructFrame(Address fp);
723 727
724 // Used by OptimizedFrames and StubFrames. 728 // Used by OptimizedFrames and StubFrames.
725 void IterateCompiledFrame(ObjectVisitor* v) const; 729 void IterateCompiledFrame(ObjectVisitor* v) const;
726 730
727 private: 731 private:
728 friend class StackFrame; 732 friend class StackFrame;
729 friend class SafeStackFrameIterator; 733 friend class SafeStackFrameIterator;
730 }; 734 };
731 735
732
733 class JavaScriptFrame : public StandardFrame { 736 class JavaScriptFrame : public StandardFrame {
734 public: 737 public:
735 Type type() const override { return JAVA_SCRIPT; } 738 Type type() const override { return JAVA_SCRIPT; }
736 739
737 JSFunction* function() const override; 740 JSFunction* function() const override;
738 Object* receiver() const override; 741 Object* receiver() const override;
739 742
740 inline void set_receiver(Object* value); 743 inline void set_receiver(Object* value);
741 744
742 // Access the parameters. 745 // Access the parameters.
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
890 int* data, HandlerTable::CatchPrediction* prediction) override; 893 int* data, HandlerTable::CatchPrediction* prediction) override;
891 894
892 // Returns the current offset into the bytecode stream. 895 // Returns the current offset into the bytecode stream.
893 int GetBytecodeOffset() const; 896 int GetBytecodeOffset() const;
894 897
895 // Updates the current offset into the bytecode stream, mainly used for stack 898 // Updates the current offset into the bytecode stream, mainly used for stack
896 // unwinding to continue execution at a different bytecode offset. 899 // unwinding to continue execution at a different bytecode offset.
897 void PatchBytecodeOffset(int new_offset); 900 void PatchBytecodeOffset(int new_offset);
898 901
899 // Returns the frame's current bytecode array. 902 // Returns the frame's current bytecode array.
900 Object* GetBytecodeArray() const; 903 BytecodeArray* GetBytecodeArray() const;
901 904
902 // Updates the frame's BytecodeArray with |bytecode_array|. Used by the 905 // Updates the frame's BytecodeArray with |bytecode_array|. Used by the
903 // debugger to swap execution onto a BytecodeArray patched with breakpoints. 906 // debugger to swap execution onto a BytecodeArray patched with breakpoints.
904 void PatchBytecodeArray(Object* bytecode_array); 907 void PatchBytecodeArray(BytecodeArray* bytecode_array);
905 908
906 // Access to the interpreter register file for this frame. 909 // Access to the interpreter register file for this frame.
907 Object* GetInterpreterRegister(int register_index) const; 910 Object* GetInterpreterRegister(int register_index) const;
908 911
909 // Build a list with summaries for this frame including all inlined frames. 912 // Build a list with summaries for this frame including all inlined frames.
910 void Summarize(List<FrameSummary>* frames) const override; 913 void Summarize(List<FrameSummary>* frames) const override;
911 914
912 protected: 915 protected:
913 inline explicit InterpretedFrame(StackFrameIteratorBase* iterator); 916 inline explicit InterpretedFrame(StackFrameIteratorBase* iterator);
914 917
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
1214 1217
1215 1218
1216 // Reads all frames on the current stack and copies them into the current 1219 // Reads all frames on the current stack and copies them into the current
1217 // zone memory. 1220 // zone memory.
1218 Vector<StackFrame*> CreateStackMap(Isolate* isolate, Zone* zone); 1221 Vector<StackFrame*> CreateStackMap(Isolate* isolate, Zone* zone);
1219 1222
1220 } // namespace internal 1223 } // namespace internal
1221 } // namespace v8 1224 } // namespace v8
1222 1225
1223 #endif // V8_FRAMES_H_ 1226 #endif // V8_FRAMES_H_
OLDNEW
« no previous file with comments | « src/factory.cc ('k') | src/frames.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698