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

Side by Side Diff: src/frames.h

Issue 8540005: Revert "Add a level of indirection to exception handler addresses." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 1 month 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/code-stubs.cc ('k') | src/frames-inl.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 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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 77
78 static const int kInnerPointerToCodeCacheSize = 1024; 78 static const int kInnerPointerToCodeCacheSize = 1024;
79 InnerPointerToCodeCacheEntry cache_[kInnerPointerToCodeCacheSize]; 79 InnerPointerToCodeCacheEntry cache_[kInnerPointerToCodeCacheSize];
80 80
81 DISALLOW_COPY_AND_ASSIGN(InnerPointerToCodeCache); 81 DISALLOW_COPY_AND_ASSIGN(InnerPointerToCodeCache);
82 }; 82 };
83 83
84 84
85 class StackHandler BASE_EMBEDDED { 85 class StackHandler BASE_EMBEDDED {
86 public: 86 public:
87 enum Kind { 87 enum State {
88 ENTRY, 88 ENTRY,
89 TRY_CATCH, 89 TRY_CATCH,
90 TRY_FINALLY 90 TRY_FINALLY
91 }; 91 };
92 92
93 static const int kKindWidth = 2;
94 static const int kOffsetWidth = 32 - kKindWidth;
95 class KindField: public BitField<StackHandler::Kind, 0, kKindWidth> {};
96 class OffsetField: public BitField<unsigned, kKindWidth, kOffsetWidth> {};
97
98 // Get the address of this stack handler. 93 // Get the address of this stack handler.
99 inline Address address() const; 94 inline Address address() const;
100 95
101 // Get the next stack handler in the chain. 96 // Get the next stack handler in the chain.
102 inline StackHandler* next() const; 97 inline StackHandler* next() const;
103 98
104 // Tells whether the given address is inside this handler. 99 // Tells whether the given address is inside this handler.
105 inline bool includes(Address address) const; 100 inline bool includes(Address address) const;
106 101
107 // Garbage collection support. 102 // Garbage collection support.
108 inline void Iterate(ObjectVisitor* v, Code* holder) const; 103 inline void Iterate(ObjectVisitor* v, Code* holder) const;
109 104
110 // Conversion support. 105 // Conversion support.
111 static inline StackHandler* FromAddress(Address address); 106 static inline StackHandler* FromAddress(Address address);
112 107
113 // Testers 108 // Testers
114 inline bool is_entry() const; 109 inline bool is_entry() const;
115 inline bool is_try_catch() const; 110 inline bool is_try_catch() const;
116 inline bool is_try_finally() const; 111 inline bool is_try_finally() const;
117 112
118 private: 113 private:
119 // Accessors. 114 // Accessors.
120 inline Kind kind() const; 115 inline State state() const;
121 116
122 inline Object** context_address() const; 117 inline Object** context_address() const;
123 inline Object** code_address() const; 118 inline Address* pc_address() const;
124 119
125 DISALLOW_IMPLICIT_CONSTRUCTORS(StackHandler); 120 DISALLOW_IMPLICIT_CONSTRUCTORS(StackHandler);
126 }; 121 };
127 122
128 123
129 #define STACK_FRAME_TYPE_LIST(V) \ 124 #define STACK_FRAME_TYPE_LIST(V) \
130 V(ENTRY, EntryFrame) \ 125 V(ENTRY, EntryFrame) \
131 V(ENTRY_CONSTRUCT, EntryConstructFrame) \ 126 V(ENTRY_CONSTRUCT, EntryConstructFrame) \
132 V(EXIT, ExitFrame) \ 127 V(EXIT, ExitFrame) \
133 V(JAVA_SCRIPT, JavaScriptFrame) \ 128 V(JAVA_SCRIPT, JavaScriptFrame) \
(...skipping 740 matching lines...) Expand 10 before | Expand all | Expand 10 after
874 }; 869 };
875 870
876 871
877 // Reads all frames on the current stack and copies them into the current 872 // Reads all frames on the current stack and copies them into the current
878 // zone memory. 873 // zone memory.
879 Vector<StackFrame*> CreateStackMap(); 874 Vector<StackFrame*> CreateStackMap();
880 875
881 } } // namespace v8::internal 876 } } // namespace v8::internal
882 877
883 #endif // V8_FRAMES_H_ 878 #endif // V8_FRAMES_H_
OLDNEW
« no previous file with comments | « src/code-stubs.cc ('k') | src/frames-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698