OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 handler_ = StackHandler::FromAddress( | 161 handler_ = StackHandler::FromAddress( |
162 Isolate::handler(thread_)); | 162 Isolate::handler(thread_)); |
163 } else { | 163 } else { |
164 ASSERT(fp_ != NULL); | 164 ASSERT(fp_ != NULL); |
165 state.fp = fp_; | 165 state.fp = fp_; |
166 state.sp = sp_; | 166 state.sp = sp_; |
167 state.pc_address = ResolveReturnAddressLocation( | 167 state.pc_address = ResolveReturnAddressLocation( |
168 reinterpret_cast<Address*>(StandardFrame::ComputePCAddress(fp_))); | 168 reinterpret_cast<Address*>(StandardFrame::ComputePCAddress(fp_))); |
169 type = StackFrame::ComputeType(isolate(), &state); | 169 type = StackFrame::ComputeType(isolate(), &state); |
170 } | 170 } |
171 if (SingletonFor(type) == NULL) return; | |
172 frame_ = SingletonFor(type, &state); | 171 frame_ = SingletonFor(type, &state); |
173 } | 172 } |
174 | 173 |
175 | 174 |
176 StackFrame* StackFrameIterator::SingletonFor(StackFrame::Type type, | 175 StackFrame* StackFrameIterator::SingletonFor(StackFrame::Type type, |
177 StackFrame::State* state) { | 176 StackFrame::State* state) { |
178 if (type == StackFrame::NONE) return NULL; | 177 if (type == StackFrame::NONE) return NULL; |
179 StackFrame* result = SingletonFor(type); | 178 StackFrame* result = SingletonFor(type); |
180 ASSERT(result != NULL); | 179 ASSERT(result != NULL); |
181 result->state_ = *state; | 180 result->state_ = *state; |
(...skipping 1312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1494 ZoneList<StackFrame*> list(10, zone); | 1493 ZoneList<StackFrame*> list(10, zone); |
1495 for (StackFrameIterator it(isolate); !it.done(); it.Advance()) { | 1494 for (StackFrameIterator it(isolate); !it.done(); it.Advance()) { |
1496 StackFrame* frame = AllocateFrameCopy(it.frame(), zone); | 1495 StackFrame* frame = AllocateFrameCopy(it.frame(), zone); |
1497 list.Add(frame, zone); | 1496 list.Add(frame, zone); |
1498 } | 1497 } |
1499 return list.ToVector(); | 1498 return list.ToVector(); |
1500 } | 1499 } |
1501 | 1500 |
1502 | 1501 |
1503 } } // namespace v8::internal | 1502 } } // namespace v8::internal |
OLD | NEW |