OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/frames.h" | 5 #include "src/frames.h" |
6 | 6 |
7 #include <sstream> | 7 #include <sstream> |
8 | 8 |
9 #include "src/ast/ast.h" | 9 #include "src/ast/ast.h" |
10 #include "src/ast/scopeinfo.h" | 10 #include "src/ast/scopeinfo.h" |
(...skipping 731 matching lines...) Loading... |
742 } | 742 } |
743 // Skip the words containing the register values. | 743 // Skip the words containing the register values. |
744 parameters_base += kNumSafepointRegisters; | 744 parameters_base += kNumSafepointRegisters; |
745 } | 745 } |
746 | 746 |
747 // We're done dealing with the register bits. | 747 // We're done dealing with the register bits. |
748 uint8_t* safepoint_bits = safepoint_entry.bits(); | 748 uint8_t* safepoint_bits = safepoint_entry.bits(); |
749 safepoint_bits += kNumSafepointRegisters >> kBitsPerByteLog2; | 749 safepoint_bits += kNumSafepointRegisters >> kBitsPerByteLog2; |
750 | 750 |
751 // Visit the rest of the parameters. | 751 // Visit the rest of the parameters. |
752 if (!is_js_to_wasm() && !is_wasm()) { | 752 if (!is_wasm() || is_wasm_to_js()) { |
753 // Non-WASM frames have tagged values as parameters. | 753 // Non-WASM frames have tagged values as parameters. |
754 v->VisitPointers(parameters_base, parameters_limit); | 754 v->VisitPointers(parameters_base, parameters_limit); |
755 } | 755 } |
756 | 756 |
757 // Visit pointer spill slots and locals. | 757 // Visit pointer spill slots and locals. |
758 for (unsigned index = 0; index < stack_slots; index++) { | 758 for (unsigned index = 0; index < stack_slots; index++) { |
759 int byte_index = index >> kBitsPerByteLog2; | 759 int byte_index = index >> kBitsPerByteLog2; |
760 int bit_index = index & (kBitsPerByte - 1); | 760 int bit_index = index & (kBitsPerByte - 1); |
761 if ((safepoint_bits[byte_index] & (1U << bit_index)) != 0) { | 761 if ((safepoint_bits[byte_index] & (1U << bit_index)) != 0) { |
762 v->VisitPointer(parameters_limit + index); | 762 v->VisitPointer(parameters_limit + index); |
763 } | 763 } |
764 } | 764 } |
765 | 765 |
766 // Visit the return address in the callee and incoming arguments. | 766 // Visit the return address in the callee and incoming arguments. |
767 IteratePc(v, pc_address(), constant_pool_address(), code); | 767 IteratePc(v, pc_address(), constant_pool_address(), code); |
768 | 768 |
769 if (!is_wasm() && !is_wasm_to_js()) { | 769 if (!is_wasm() || is_js_to_wasm()) { |
770 // Visit the context in stub frame and JavaScript frame. | 770 // Visit the context in stub frame and JavaScript frame. |
771 // Visit the function in JavaScript frame. | 771 // Visit the function in JavaScript frame. |
772 v->VisitPointers(frame_header_base, frame_header_limit); | 772 v->VisitPointers(frame_header_base, frame_header_limit); |
773 } | 773 } |
774 } | 774 } |
775 | 775 |
776 | 776 |
777 void StubFrame::Iterate(ObjectVisitor* v) const { | 777 void StubFrame::Iterate(ObjectVisitor* v) const { |
778 IterateCompiledFrame(v); | 778 IterateCompiledFrame(v); |
779 } | 779 } |
(...skipping 942 matching lines...) Loading... |
1722 for (StackFrameIterator it(isolate); !it.done(); it.Advance()) { | 1722 for (StackFrameIterator it(isolate); !it.done(); it.Advance()) { |
1723 StackFrame* frame = AllocateFrameCopy(it.frame(), zone); | 1723 StackFrame* frame = AllocateFrameCopy(it.frame(), zone); |
1724 list.Add(frame, zone); | 1724 list.Add(frame, zone); |
1725 } | 1725 } |
1726 return list.ToVector(); | 1726 return list.ToVector(); |
1727 } | 1727 } |
1728 | 1728 |
1729 | 1729 |
1730 } // namespace internal | 1730 } // namespace internal |
1731 } // namespace v8 | 1731 } // namespace v8 |
OLD | NEW |