| OLD | NEW |
| 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 309 bool StackFrame::HasHandler() const { | 309 bool StackFrame::HasHandler() const { |
| 310 StackHandlerIterator it(this, top_handler()); | 310 StackHandlerIterator it(this, top_handler()); |
| 311 return !it.done(); | 311 return !it.done(); |
| 312 } | 312 } |
| 313 | 313 |
| 314 void StackFrame::IteratePc(ObjectVisitor* v, | 314 void StackFrame::IteratePc(ObjectVisitor* v, |
| 315 Address* pc_address, | 315 Address* pc_address, |
| 316 Code* holder) { | 316 Code* holder) { |
| 317 Address pc = *pc_address; | 317 Address pc = *pc_address; |
| 318 ASSERT(holder->contains(pc)); | 318 ASSERT(holder->contains(pc)); |
| 319 unsigned pc_offset = pc - holder->instruction_start(); | 319 unsigned pc_offset = static_cast<unsigned>(pc - holder->instruction_start()); |
| 320 Object* code = holder; | 320 Object* code = holder; |
| 321 v->VisitPointer(&code); | 321 v->VisitPointer(&code); |
| 322 if (code != holder) { | 322 if (code != holder) { |
| 323 holder = reinterpret_cast<Code*>(code); | 323 holder = reinterpret_cast<Code*>(code); |
| 324 pc = holder->instruction_start() + pc_offset; | 324 pc = holder->instruction_start() + pc_offset; |
| 325 *pc_address = pc; | 325 *pc_address = pc; |
| 326 } | 326 } |
| 327 } | 327 } |
| 328 | 328 |
| 329 | 329 |
| (...skipping 568 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 898 ZoneList<StackFrame*> list(10); | 898 ZoneList<StackFrame*> list(10); |
| 899 for (StackFrameIterator it; !it.done(); it.Advance()) { | 899 for (StackFrameIterator it; !it.done(); it.Advance()) { |
| 900 StackFrame* frame = AllocateFrameCopy(it.frame()); | 900 StackFrame* frame = AllocateFrameCopy(it.frame()); |
| 901 list.Add(frame); | 901 list.Add(frame); |
| 902 } | 902 } |
| 903 return list.ToVector(); | 903 return list.ToVector(); |
| 904 } | 904 } |
| 905 | 905 |
| 906 | 906 |
| 907 } } // namespace v8::internal | 907 } } // namespace v8::internal |
| OLD | NEW |