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

Side by Side Diff: src/frames-inl.h

Issue 7618007: Simplify handling of exits from with and catch. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Incorporate review comments Created 9 years, 4 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 | « 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 2006-2008 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
11 // with the distribution. 11 // with the distribution.
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 60
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 StackFrame::IteratePc(v, pc_address(), holder); 71 StackFrame::IteratePc(v, pc_address(), holder);
71 } 72 }
72 73
73 74
74 inline StackHandler* StackHandler::FromAddress(Address address) { 75 inline StackHandler* StackHandler::FromAddress(Address address) {
75 return reinterpret_cast<StackHandler*>(address); 76 return reinterpret_cast<StackHandler*>(address);
76 } 77 }
77 78
78 79
79 inline StackHandler::State StackHandler::state() const { 80 inline StackHandler::State StackHandler::state() const {
80 const int offset = StackHandlerConstants::kStateOffset; 81 const int offset = StackHandlerConstants::kStateOffset;
81 return static_cast<State>(Memory::int_at(address() + offset)); 82 return static_cast<State>(Memory::int_at(address() + offset));
82 } 83 }
83 84
84 85
86 inline Object** StackHandler::context_address() const {
87 const int offset = StackHandlerConstants::kContextOffset;
88 return reinterpret_cast<Object**>(address() + offset);
89 }
90
91
85 inline Address* StackHandler::pc_address() const { 92 inline Address* StackHandler::pc_address() const {
86 const int offset = StackHandlerConstants::kPCOffset; 93 const int offset = StackHandlerConstants::kPCOffset;
87 return reinterpret_cast<Address*>(address() + offset); 94 return reinterpret_cast<Address*>(address() + offset);
88 } 95 }
89 96
90 97
91 inline StackFrame::StackFrame(StackFrameIterator* iterator) 98 inline StackFrame::StackFrame(StackFrameIterator* iterator)
92 : iterator_(iterator), isolate_(iterator_->isolate()) { 99 : iterator_(iterator), isolate_(iterator_->isolate()) {
93 } 100 }
94 101
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 template<typename Iterator> 245 template<typename Iterator>
239 void JavaScriptFrameIteratorTemp<Iterator>::Reset() { 246 void JavaScriptFrameIteratorTemp<Iterator>::Reset() {
240 iterator_.Reset(); 247 iterator_.Reset();
241 if (!done()) Advance(); 248 if (!done()) Advance();
242 } 249 }
243 250
244 251
245 } } // namespace v8::internal 252 } } // namespace v8::internal
246 253
247 #endif // V8_FRAMES_INL_H_ 254 #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