OLD | NEW |
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 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
255 } | 255 } |
256 | 256 |
257 | 257 |
258 template<typename Iterator> | 258 template<typename Iterator> |
259 inline JavaScriptFrameIteratorTemp<Iterator>::JavaScriptFrameIteratorTemp( | 259 inline JavaScriptFrameIteratorTemp<Iterator>::JavaScriptFrameIteratorTemp( |
260 Isolate* isolate) | 260 Isolate* isolate) |
261 : iterator_(isolate) { | 261 : iterator_(isolate) { |
262 if (!done()) Advance(); | 262 if (!done()) Advance(); |
263 } | 263 } |
264 | 264 |
| 265 |
| 266 template<typename Iterator> |
| 267 inline JavaScriptFrameIteratorTemp<Iterator>::JavaScriptFrameIteratorTemp( |
| 268 Isolate* isolate, ThreadLocalTop* top) |
| 269 : iterator_(isolate, top) { |
| 270 if (!done()) Advance(); |
| 271 } |
| 272 |
| 273 |
265 template<typename Iterator> | 274 template<typename Iterator> |
266 inline JavaScriptFrame* JavaScriptFrameIteratorTemp<Iterator>::frame() const { | 275 inline JavaScriptFrame* JavaScriptFrameIteratorTemp<Iterator>::frame() const { |
267 // TODO(1233797): The frame hierarchy needs to change. It's | 276 // TODO(1233797): The frame hierarchy needs to change. It's |
268 // problematic that we can't use the safe-cast operator to cast to | 277 // problematic that we can't use the safe-cast operator to cast to |
269 // the JavaScript frame type, because we may encounter arguments | 278 // the JavaScript frame type, because we may encounter arguments |
270 // adaptor frames. | 279 // adaptor frames. |
271 StackFrame* frame = iterator_.frame(); | 280 StackFrame* frame = iterator_.frame(); |
272 ASSERT(frame->is_java_script() || frame->is_arguments_adaptor()); | 281 ASSERT(frame->is_java_script() || frame->is_arguments_adaptor()); |
273 return static_cast<JavaScriptFrame*>(frame); | 282 return static_cast<JavaScriptFrame*>(frame); |
274 } | 283 } |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
310 template<typename Iterator> | 319 template<typename Iterator> |
311 void JavaScriptFrameIteratorTemp<Iterator>::Reset() { | 320 void JavaScriptFrameIteratorTemp<Iterator>::Reset() { |
312 iterator_.Reset(); | 321 iterator_.Reset(); |
313 if (!done()) Advance(); | 322 if (!done()) Advance(); |
314 } | 323 } |
315 | 324 |
316 | 325 |
317 } } // namespace v8::internal | 326 } } // namespace v8::internal |
318 | 327 |
319 #endif // V8_FRAMES_INL_H_ | 328 #endif // V8_FRAMES_INL_H_ |
OLD | NEW |