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

Side by Side Diff: src/frames-inl.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/frames.h ('k') | src/full-codegen.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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 61
62 inline bool StackHandler::includes(Address address) const { 62 inline bool StackHandler::includes(Address address) const {
63 Address start = this->address(); 63 Address start = this->address();
64 Address end = start + StackHandlerConstants::kSize; 64 Address end = start + StackHandlerConstants::kSize;
65 return start <= address && address <= end; 65 return start <= address && address <= end;
66 } 66 }
67 67
68 68
69 inline void StackHandler::Iterate(ObjectVisitor* v, Code* holder) const { 69 inline void StackHandler::Iterate(ObjectVisitor* v, Code* holder) const {
70 v->VisitPointer(context_address()); 70 v->VisitPointer(context_address());
71 v->VisitPointer(code_address()); 71 StackFrame::IteratePc(v, pc_address(), holder);
72 } 72 }
73 73
74 74
75 inline StackHandler* StackHandler::FromAddress(Address address) { 75 inline StackHandler* StackHandler::FromAddress(Address address) {
76 return reinterpret_cast<StackHandler*>(address); 76 return reinterpret_cast<StackHandler*>(address);
77 } 77 }
78 78
79 79
80 inline bool StackHandler::is_entry() const { 80 inline bool StackHandler::is_entry() const {
81 return kind() == ENTRY; 81 return state() == ENTRY;
82 } 82 }
83 83
84 84
85 inline bool StackHandler::is_try_catch() const { 85 inline bool StackHandler::is_try_catch() const {
86 return kind() == TRY_CATCH; 86 return state() == TRY_CATCH;
87 } 87 }
88 88
89 89
90 inline bool StackHandler::is_try_finally() const { 90 inline bool StackHandler::is_try_finally() const {
91 return kind() == TRY_FINALLY; 91 return state() == TRY_FINALLY;
92 } 92 }
93 93
94 94
95 inline StackHandler::Kind StackHandler::kind() const { 95 inline StackHandler::State StackHandler::state() const {
96 const int offset = StackHandlerConstants::kStateOffset; 96 const int offset = StackHandlerConstants::kStateOffset;
97 return KindField::decode(Memory::unsigned_at(address() + offset)); 97 return static_cast<State>(Memory::int_at(address() + offset));
98 } 98 }
99 99
100 100
101 inline Object** StackHandler::context_address() const { 101 inline Object** StackHandler::context_address() const {
102 const int offset = StackHandlerConstants::kContextOffset; 102 const int offset = StackHandlerConstants::kContextOffset;
103 return reinterpret_cast<Object**>(address() + offset); 103 return reinterpret_cast<Object**>(address() + offset);
104 } 104 }
105 105
106 106
107 inline Object** StackHandler::code_address() const { 107 inline Address* StackHandler::pc_address() const {
108 const int offset = StackHandlerConstants::kCodeOffset; 108 const int offset = StackHandlerConstants::kPCOffset;
109 return reinterpret_cast<Object**>(address() + offset); 109 return reinterpret_cast<Address*>(address() + offset);
110 } 110 }
111 111
112 112
113 inline StackFrame::StackFrame(StackFrameIterator* iterator) 113 inline StackFrame::StackFrame(StackFrameIterator* iterator)
114 : iterator_(iterator), isolate_(iterator_->isolate()) { 114 : iterator_(iterator), isolate_(iterator_->isolate()) {
115 } 115 }
116 116
117 117
118 inline StackHandler* StackFrame::top_handler() const { 118 inline StackHandler* StackFrame::top_handler() const {
119 return iterator_->handler(); 119 return iterator_->handler();
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 template<typename Iterator> 319 template<typename Iterator>
320 void JavaScriptFrameIteratorTemp<Iterator>::Reset() { 320 void JavaScriptFrameIteratorTemp<Iterator>::Reset() {
321 iterator_.Reset(); 321 iterator_.Reset();
322 if (!done()) Advance(); 322 if (!done()) Advance();
323 } 323 }
324 324
325 325
326 } } // namespace v8::internal 326 } } // namespace v8::internal
327 327
328 #endif // V8_FRAMES_INL_H_ 328 #endif // V8_FRAMES_INL_H_
OLDNEW
« no previous file with comments | « src/frames.h ('k') | src/full-codegen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698