| 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 661 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 672 for (unsigned index = 0; index < stack_slots; index++) { | 672 for (unsigned index = 0; index < stack_slots; index++) { |
| 673 int byte_index = index >> kBitsPerByteLog2; | 673 int byte_index = index >> kBitsPerByteLog2; |
| 674 int bit_index = index & (kBitsPerByte - 1); | 674 int bit_index = index & (kBitsPerByte - 1); |
| 675 if ((safepoint_bits[byte_index] & (1U << bit_index)) != 0) { | 675 if ((safepoint_bits[byte_index] & (1U << bit_index)) != 0) { |
| 676 v->VisitPointer(parameters_limit + index); | 676 v->VisitPointer(parameters_limit + index); |
| 677 } | 677 } |
| 678 } | 678 } |
| 679 | 679 |
| 680 // Visit the return address in the callee and incoming arguments. | 680 // Visit the return address in the callee and incoming arguments. |
| 681 IteratePc(v, pc_address(), code); | 681 IteratePc(v, pc_address(), code); |
| 682 |
| 683 // Visit the context in stub frame and JavaScript frame. |
| 684 // Visit the function in JavaScript frame. |
| 685 Object** fixed_base = &Memory::Object_at( |
| 686 fp() + StandardFrameConstants::kMarkerOffset); |
| 687 Object** fixed_limit = &Memory::Object_at(fp()); |
| 688 v->VisitPointers(fixed_base, fixed_limit); |
| 682 } | 689 } |
| 683 | 690 |
| 684 | 691 |
| 685 void StubFrame::Iterate(ObjectVisitor* v) const { | 692 void StubFrame::Iterate(ObjectVisitor* v) const { |
| 686 IterateCompiledFrame(v); | 693 IterateCompiledFrame(v); |
| 687 } | 694 } |
| 688 | 695 |
| 689 | 696 |
| 690 Code* StubFrame::unchecked_code() const { | 697 Code* StubFrame::unchecked_code() const { |
| 691 return static_cast<Code*>(isolate()->heap()->FindCodeObject(pc())); | 698 return static_cast<Code*>(isolate()->heap()->FindCodeObject(pc())); |
| (...skipping 11 matching lines...) Expand all Loading... |
| 703 | 710 |
| 704 | 711 |
| 705 void OptimizedFrame::Iterate(ObjectVisitor* v) const { | 712 void OptimizedFrame::Iterate(ObjectVisitor* v) const { |
| 706 #ifdef DEBUG | 713 #ifdef DEBUG |
| 707 // Make sure that optimized frames do not contain any stack handlers. | 714 // Make sure that optimized frames do not contain any stack handlers. |
| 708 StackHandlerIterator it(this, top_handler()); | 715 StackHandlerIterator it(this, top_handler()); |
| 709 ASSERT(it.done()); | 716 ASSERT(it.done()); |
| 710 #endif | 717 #endif |
| 711 | 718 |
| 712 IterateCompiledFrame(v); | 719 IterateCompiledFrame(v); |
| 713 | |
| 714 // Visit the context and the function. | |
| 715 Object** fixed_base = &Memory::Object_at( | |
| 716 fp() + JavaScriptFrameConstants::kFunctionOffset); | |
| 717 Object** fixed_limit = &Memory::Object_at(fp()); | |
| 718 v->VisitPointers(fixed_base, fixed_limit); | |
| 719 } | 720 } |
| 720 | 721 |
| 721 | 722 |
| 722 void JavaScriptFrame::SetParameterValue(int index, Object* value) const { | 723 void JavaScriptFrame::SetParameterValue(int index, Object* value) const { |
| 723 Memory::Object_at(GetParameterSlot(index)) = value; | 724 Memory::Object_at(GetParameterSlot(index)) = value; |
| 724 } | 725 } |
| 725 | 726 |
| 726 | 727 |
| 727 bool JavaScriptFrame::IsConstructor() const { | 728 bool JavaScriptFrame::IsConstructor() const { |
| 728 Address fp = caller_fp(); | 729 Address fp = caller_fp(); |
| (...skipping 775 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1504 ZoneList<StackFrame*> list(10, zone); | 1505 ZoneList<StackFrame*> list(10, zone); |
| 1505 for (StackFrameIterator it; !it.done(); it.Advance()) { | 1506 for (StackFrameIterator it; !it.done(); it.Advance()) { |
| 1506 StackFrame* frame = AllocateFrameCopy(it.frame(), zone); | 1507 StackFrame* frame = AllocateFrameCopy(it.frame(), zone); |
| 1507 list.Add(frame, zone); | 1508 list.Add(frame, zone); |
| 1508 } | 1509 } |
| 1509 return list.ToVector(); | 1510 return list.ToVector(); |
| 1510 } | 1511 } |
| 1511 | 1512 |
| 1512 | 1513 |
| 1513 } } // namespace v8::internal | 1514 } } // namespace v8::internal |
| OLD | NEW |