Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(389)

Side by Side Diff: src/frames.cc

Issue 2801073006: Decouple root visitors from object visitors. (Closed)
Patch Set: rebase Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/frames.h ('k') | src/global-handles.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <memory> 7 #include <memory>
8 #include <sstream> 8 #include <sstream>
9 9
10 #include "src/base/bits.h" 10 #include "src/base/bits.h"
11 #include "src/deoptimizer.h" 11 #include "src/deoptimizer.h"
12 #include "src/frames-inl.h" 12 #include "src/frames-inl.h"
13 #include "src/full-codegen/full-codegen.h" 13 #include "src/full-codegen/full-codegen.h"
14 #include "src/ic/ic-stats.h" 14 #include "src/ic/ic-stats.h"
15 #include "src/register-configuration.h" 15 #include "src/register-configuration.h"
16 #include "src/safepoint-table.h" 16 #include "src/safepoint-table.h"
17 #include "src/string-stream.h" 17 #include "src/string-stream.h"
18 #include "src/visitors.h"
18 #include "src/vm-state-inl.h" 19 #include "src/vm-state-inl.h"
19 #include "src/wasm/wasm-module.h" 20 #include "src/wasm/wasm-module.h"
20 #include "src/wasm/wasm-objects.h" 21 #include "src/wasm/wasm-objects.h"
21 22
22 namespace v8 { 23 namespace v8 {
23 namespace internal { 24 namespace internal {
24 25
25 ReturnAddressLocationResolver 26 ReturnAddressLocationResolver
26 StackFrame::return_address_location_resolver_ = NULL; 27 StackFrame::return_address_location_resolver_ = NULL;
27 28
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after
398 *safepoint_entry = entry->safepoint_entry; 399 *safepoint_entry = entry->safepoint_entry;
399 *stack_slots = code->stack_slots(); 400 *stack_slots = code->stack_slots();
400 return code; 401 return code;
401 } 402 }
402 403
403 404
404 #ifdef DEBUG 405 #ifdef DEBUG
405 static bool GcSafeCodeContains(HeapObject* object, Address addr); 406 static bool GcSafeCodeContains(HeapObject* object, Address addr);
406 #endif 407 #endif
407 408
408 409 void StackFrame::IteratePc(RootVisitor* v, Address* pc_address,
409 void StackFrame::IteratePc(ObjectVisitor* v, Address* pc_address,
410 Address* constant_pool_address, Code* holder) { 410 Address* constant_pool_address, Code* holder) {
411 Address pc = *pc_address; 411 Address pc = *pc_address;
412 DCHECK(GcSafeCodeContains(holder, pc)); 412 DCHECK(GcSafeCodeContains(holder, pc));
413 unsigned pc_offset = static_cast<unsigned>(pc - holder->instruction_start()); 413 unsigned pc_offset = static_cast<unsigned>(pc - holder->instruction_start());
414 Object* code = holder; 414 Object* code = holder;
415 v->VisitPointer(&code); 415 v->VisitRootPointer(Root::kTop, &code);
416 if (code == holder) return; 416 if (code == holder) return;
417 holder = reinterpret_cast<Code*>(code); 417 holder = reinterpret_cast<Code*>(code);
418 pc = holder->instruction_start() + pc_offset; 418 pc = holder->instruction_start() + pc_offset;
419 *pc_address = pc; 419 *pc_address = pc;
420 if (FLAG_enable_embedded_constant_pool && constant_pool_address) { 420 if (FLAG_enable_embedded_constant_pool && constant_pool_address) {
421 *constant_pool_address = holder->constant_pool(); 421 *constant_pool_address = holder->constant_pool();
422 } 422 }
423 } 423 }
424 424
425 425
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
594 state->constant_pool_address = reinterpret_cast<Address*>( 594 state->constant_pool_address = reinterpret_cast<Address*>(
595 fp() + ExitFrameConstants::kConstantPoolOffset); 595 fp() + ExitFrameConstants::kConstantPoolOffset);
596 } 596 }
597 } 597 }
598 598
599 599
600 void ExitFrame::SetCallerFp(Address caller_fp) { 600 void ExitFrame::SetCallerFp(Address caller_fp) {
601 Memory::Address_at(fp() + ExitFrameConstants::kCallerFPOffset) = caller_fp; 601 Memory::Address_at(fp() + ExitFrameConstants::kCallerFPOffset) = caller_fp;
602 } 602 }
603 603
604 604 void ExitFrame::Iterate(RootVisitor* v) const {
605 void ExitFrame::Iterate(ObjectVisitor* v) const {
606 // The arguments are traversed as part of the expression stack of 605 // The arguments are traversed as part of the expression stack of
607 // the calling frame. 606 // the calling frame.
608 IteratePc(v, pc_address(), constant_pool_address(), LookupCode()); 607 IteratePc(v, pc_address(), constant_pool_address(), LookupCode());
609 v->VisitPointer(&code_slot()); 608 v->VisitRootPointer(Root::kTop, &code_slot());
610 } 609 }
611 610
612 611
613 Address ExitFrame::GetCallerStackPointer() const { 612 Address ExitFrame::GetCallerStackPointer() const {
614 return fp() + ExitFrameConstants::kCallerSPOffset; 613 return fp() + ExitFrameConstants::kCallerSPOffset;
615 } 614 }
616 615
617 616
618 StackFrame::Type ExitFrame::GetStateForFramePointer(Address fp, State* state) { 617 StackFrame::Type ExitFrame::GetStateForFramePointer(Address fp, State* state) {
619 if (fp == 0) return NONE; 618 if (fp == 0) return NONE;
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
775 } 774 }
776 775
777 bool StandardFrame::IsConstructor() const { return false; } 776 bool StandardFrame::IsConstructor() const { return false; }
778 777
779 void StandardFrame::Summarize(List<FrameSummary>* functions, 778 void StandardFrame::Summarize(List<FrameSummary>* functions,
780 FrameSummary::Mode mode) const { 779 FrameSummary::Mode mode) const {
781 // This should only be called on frames which override this method. 780 // This should only be called on frames which override this method.
782 UNREACHABLE(); 781 UNREACHABLE();
783 } 782 }
784 783
785 void StandardFrame::IterateCompiledFrame(ObjectVisitor* v) const { 784 void StandardFrame::IterateCompiledFrame(RootVisitor* v) const {
786 // Make sure that we're not doing "safe" stack frame iteration. We cannot 785 // Make sure that we're not doing "safe" stack frame iteration. We cannot
787 // possibly find pointers in optimized frames in that state. 786 // possibly find pointers in optimized frames in that state.
788 DCHECK(can_access_heap_objects()); 787 DCHECK(can_access_heap_objects());
789 788
790 // Compute the safepoint information. 789 // Compute the safepoint information.
791 unsigned stack_slots = 0; 790 unsigned stack_slots = 0;
792 SafepointEntry safepoint_entry; 791 SafepointEntry safepoint_entry;
793 Code* code = StackFrame::GetSafepointData( 792 Code* code = StackFrame::GetSafepointData(
794 isolate(), pc(), &safepoint_entry, &stack_slots); 793 isolate(), pc(), &safepoint_entry, &stack_slots);
795 unsigned slot_space = stack_slots * kPointerSize; 794 unsigned slot_space = stack_slots * kPointerSize;
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
835 (frame_header_size + StandardFrameConstants::kFixedFrameSizeAboveFp); 834 (frame_header_size + StandardFrameConstants::kFixedFrameSizeAboveFp);
836 835
837 Object** frame_header_base = &Memory::Object_at(fp() - frame_header_size); 836 Object** frame_header_base = &Memory::Object_at(fp() - frame_header_size);
838 Object** frame_header_limit = 837 Object** frame_header_limit =
839 &Memory::Object_at(fp() - StandardFrameConstants::kCPSlotSize); 838 &Memory::Object_at(fp() - StandardFrameConstants::kCPSlotSize);
840 Object** parameters_base = &Memory::Object_at(sp()); 839 Object** parameters_base = &Memory::Object_at(sp());
841 Object** parameters_limit = frame_header_base - slot_space / kPointerSize; 840 Object** parameters_limit = frame_header_base - slot_space / kPointerSize;
842 841
843 // Visit the parameters that may be on top of the saved registers. 842 // Visit the parameters that may be on top of the saved registers.
844 if (safepoint_entry.argument_count() > 0) { 843 if (safepoint_entry.argument_count() > 0) {
845 v->VisitPointers(parameters_base, 844 v->VisitRootPointers(Root::kTop, parameters_base,
846 parameters_base + safepoint_entry.argument_count()); 845 parameters_base + safepoint_entry.argument_count());
847 parameters_base += safepoint_entry.argument_count(); 846 parameters_base += safepoint_entry.argument_count();
848 } 847 }
849 848
850 // Skip saved double registers. 849 // Skip saved double registers.
851 if (safepoint_entry.has_doubles()) { 850 if (safepoint_entry.has_doubles()) {
852 // Number of doubles not known at snapshot time. 851 // Number of doubles not known at snapshot time.
853 DCHECK(!isolate()->serializer_enabled()); 852 DCHECK(!isolate()->serializer_enabled());
854 parameters_base += RegisterConfiguration::Crankshaft() 853 parameters_base += RegisterConfiguration::Crankshaft()
855 ->num_allocatable_double_registers() * 854 ->num_allocatable_double_registers() *
856 kDoubleSize / kPointerSize; 855 kDoubleSize / kPointerSize;
857 } 856 }
858 857
859 // Visit the registers that contain pointers if any. 858 // Visit the registers that contain pointers if any.
860 if (safepoint_entry.HasRegisters()) { 859 if (safepoint_entry.HasRegisters()) {
861 for (int i = kNumSafepointRegisters - 1; i >=0; i--) { 860 for (int i = kNumSafepointRegisters - 1; i >=0; i--) {
862 if (safepoint_entry.HasRegisterAt(i)) { 861 if (safepoint_entry.HasRegisterAt(i)) {
863 int reg_stack_index = MacroAssembler::SafepointRegisterStackIndex(i); 862 int reg_stack_index = MacroAssembler::SafepointRegisterStackIndex(i);
864 v->VisitPointer(parameters_base + reg_stack_index); 863 v->VisitRootPointer(Root::kTop, parameters_base + reg_stack_index);
865 } 864 }
866 } 865 }
867 // Skip the words containing the register values. 866 // Skip the words containing the register values.
868 parameters_base += kNumSafepointRegisters; 867 parameters_base += kNumSafepointRegisters;
869 } 868 }
870 869
871 // We're done dealing with the register bits. 870 // We're done dealing with the register bits.
872 uint8_t* safepoint_bits = safepoint_entry.bits(); 871 uint8_t* safepoint_bits = safepoint_entry.bits();
873 safepoint_bits += kNumSafepointRegisters >> kBitsPerByteLog2; 872 safepoint_bits += kNumSafepointRegisters >> kBitsPerByteLog2;
874 873
875 // Visit the rest of the parameters if they are tagged. 874 // Visit the rest of the parameters if they are tagged.
876 if (code->has_tagged_params()) { 875 if (code->has_tagged_params()) {
877 v->VisitPointers(parameters_base, parameters_limit); 876 v->VisitRootPointers(Root::kTop, parameters_base, parameters_limit);
878 } 877 }
879 878
880 // Visit pointer spill slots and locals. 879 // Visit pointer spill slots and locals.
881 for (unsigned index = 0; index < stack_slots; index++) { 880 for (unsigned index = 0; index < stack_slots; index++) {
882 int byte_index = index >> kBitsPerByteLog2; 881 int byte_index = index >> kBitsPerByteLog2;
883 int bit_index = index & (kBitsPerByte - 1); 882 int bit_index = index & (kBitsPerByte - 1);
884 if ((safepoint_bits[byte_index] & (1U << bit_index)) != 0) { 883 if ((safepoint_bits[byte_index] & (1U << bit_index)) != 0) {
885 v->VisitPointer(parameters_limit + index); 884 v->VisitRootPointer(Root::kTop, parameters_limit + index);
886 } 885 }
887 } 886 }
888 887
889 // Visit the return address in the callee and incoming arguments. 888 // Visit the return address in the callee and incoming arguments.
890 IteratePc(v, pc_address(), constant_pool_address(), code); 889 IteratePc(v, pc_address(), constant_pool_address(), code);
891 890
892 if (!is_wasm() && !is_wasm_to_js()) { 891 if (!is_wasm() && !is_wasm_to_js()) {
893 // If this frame has JavaScript ABI, visit the context (in stub and JS 892 // If this frame has JavaScript ABI, visit the context (in stub and JS
894 // frames) and the function (in JS frames). 893 // frames) and the function (in JS frames).
895 v->VisitPointers(frame_header_base, frame_header_limit); 894 v->VisitRootPointers(Root::kTop, frame_header_base, frame_header_limit);
896 } 895 }
897 } 896 }
898 897
899 898 void StubFrame::Iterate(RootVisitor* v) const { IterateCompiledFrame(v); }
900 void StubFrame::Iterate(ObjectVisitor* v) const {
901 IterateCompiledFrame(v);
902 }
903
904 899
905 Code* StubFrame::unchecked_code() const { 900 Code* StubFrame::unchecked_code() const {
906 return isolate()->FindCodeObject(pc()); 901 return isolate()->FindCodeObject(pc());
907 } 902 }
908 903
909 904
910 Address StubFrame::GetCallerStackPointer() const { 905 Address StubFrame::GetCallerStackPointer() const {
911 return fp() + ExitFrameConstants::kCallerSPOffset; 906 return fp() + ExitFrameConstants::kCallerSPOffset;
912 } 907 }
913 908
914 909
915 int StubFrame::GetNumberOfIncomingArguments() const { 910 int StubFrame::GetNumberOfIncomingArguments() const {
916 return 0; 911 return 0;
917 } 912 }
918 913
919 int StubFrame::LookupExceptionHandlerInTable(int* stack_slots) { 914 int StubFrame::LookupExceptionHandlerInTable(int* stack_slots) {
920 Code* code = LookupCode(); 915 Code* code = LookupCode();
921 DCHECK(code->is_turbofanned()); 916 DCHECK(code->is_turbofanned());
922 DCHECK_EQ(code->kind(), Code::BUILTIN); 917 DCHECK_EQ(code->kind(), Code::BUILTIN);
923 HandlerTable* table = HandlerTable::cast(code->handler_table()); 918 HandlerTable* table = HandlerTable::cast(code->handler_table());
924 int pc_offset = static_cast<int>(pc() - code->entry()); 919 int pc_offset = static_cast<int>(pc() - code->entry());
925 *stack_slots = code->stack_slots(); 920 *stack_slots = code->stack_slots();
926 return table->LookupReturn(pc_offset); 921 return table->LookupReturn(pc_offset);
927 } 922 }
928 923
929 void OptimizedFrame::Iterate(ObjectVisitor* v) const { 924 void OptimizedFrame::Iterate(RootVisitor* v) const { IterateCompiledFrame(v); }
930 IterateCompiledFrame(v);
931 }
932
933 925
934 void JavaScriptFrame::SetParameterValue(int index, Object* value) const { 926 void JavaScriptFrame::SetParameterValue(int index, Object* value) const {
935 Memory::Object_at(GetParameterSlot(index)) = value; 927 Memory::Object_at(GetParameterSlot(index)) = value;
936 } 928 }
937 929
938 930
939 bool JavaScriptFrame::IsConstructor() const { 931 bool JavaScriptFrame::IsConstructor() const {
940 Address fp = caller_fp(); 932 Address fp = caller_fp();
941 if (has_adapted_arguments()) { 933 if (has_adapted_arguments()) {
942 // Skip the arguments adaptor frame and look at the real caller. 934 // Skip the arguments adaptor frame and look at the real caller.
(...skipping 777 matching lines...) Expand 10 before | Expand all | Expand 10 after
1720 func_name[func_name_len] = '\0'; 1712 func_name[func_name_len] = '\0';
1721 accumulator->Add("], function #%u ('%s'), pc=%p, pos=%d\n", 1713 accumulator->Add("], function #%u ('%s'), pc=%p, pos=%d\n",
1722 this->function_index(), func_name, pc, this->position()); 1714 this->function_index(), func_name, pc, this->position());
1723 if (mode != OVERVIEW) accumulator->Add("\n"); 1715 if (mode != OVERVIEW) accumulator->Add("\n");
1724 } 1716 }
1725 1717
1726 Code* WasmCompiledFrame::unchecked_code() const { 1718 Code* WasmCompiledFrame::unchecked_code() const {
1727 return isolate()->FindCodeObject(pc()); 1719 return isolate()->FindCodeObject(pc());
1728 } 1720 }
1729 1721
1730 void WasmCompiledFrame::Iterate(ObjectVisitor* v) const { 1722 void WasmCompiledFrame::Iterate(RootVisitor* v) const {
1731 IterateCompiledFrame(v); 1723 IterateCompiledFrame(v);
1732 } 1724 }
1733 1725
1734 Address WasmCompiledFrame::GetCallerStackPointer() const { 1726 Address WasmCompiledFrame::GetCallerStackPointer() const {
1735 return fp() + ExitFrameConstants::kCallerSPOffset; 1727 return fp() + ExitFrameConstants::kCallerSPOffset;
1736 } 1728 }
1737 1729
1738 WasmInstanceObject* WasmCompiledFrame::wasm_instance() const { 1730 WasmInstanceObject* WasmCompiledFrame::wasm_instance() const {
1739 WasmInstanceObject* obj = wasm::GetOwningWasmInstance(LookupCode()); 1731 WasmInstanceObject* obj = wasm::GetOwningWasmInstance(LookupCode());
1740 // This is a live stack frame; it must have a live instance. 1732 // This is a live stack frame; it must have a live instance.
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
1780 1772
1781 int WasmCompiledFrame::LookupExceptionHandlerInTable(int* stack_slots) { 1773 int WasmCompiledFrame::LookupExceptionHandlerInTable(int* stack_slots) {
1782 DCHECK_NOT_NULL(stack_slots); 1774 DCHECK_NOT_NULL(stack_slots);
1783 Code* code = LookupCode(); 1775 Code* code = LookupCode();
1784 HandlerTable* table = HandlerTable::cast(code->handler_table()); 1776 HandlerTable* table = HandlerTable::cast(code->handler_table());
1785 int pc_offset = static_cast<int>(pc() - code->entry()); 1777 int pc_offset = static_cast<int>(pc() - code->entry());
1786 *stack_slots = code->stack_slots(); 1778 *stack_slots = code->stack_slots();
1787 return table->LookupReturn(pc_offset); 1779 return table->LookupReturn(pc_offset);
1788 } 1780 }
1789 1781
1790 void WasmInterpreterEntryFrame::Iterate(ObjectVisitor* v) const { 1782 void WasmInterpreterEntryFrame::Iterate(RootVisitor* v) const {
1791 IterateCompiledFrame(v); 1783 IterateCompiledFrame(v);
1792 } 1784 }
1793 1785
1794 void WasmInterpreterEntryFrame::Print(StringStream* accumulator, PrintMode mode, 1786 void WasmInterpreterEntryFrame::Print(StringStream* accumulator, PrintMode mode,
1795 int index) const { 1787 int index) const {
1796 PrintIndex(accumulator, mode, index); 1788 PrintIndex(accumulator, mode, index);
1797 accumulator->Add("WASM INTERPRETER ENTRY ["); 1789 accumulator->Add("WASM INTERPRETER ENTRY [");
1798 Script* script = this->script(); 1790 Script* script = this->script();
1799 accumulator->PrintName(script->name()); 1791 accumulator->PrintName(script->name());
1800 accumulator->Add("]"); 1792 accumulator->Add("]");
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
2026 accumulator->Add(" [%02d] : %o", i, GetParameter(i)); 2018 accumulator->Add(" [%02d] : %o", i, GetParameter(i));
2027 if (expected != -1 && i >= expected) { 2019 if (expected != -1 && i >= expected) {
2028 accumulator->Add(" // not passed to callee"); 2020 accumulator->Add(" // not passed to callee");
2029 } 2021 }
2030 accumulator->Add("\n"); 2022 accumulator->Add("\n");
2031 } 2023 }
2032 2024
2033 accumulator->Add("}\n\n"); 2025 accumulator->Add("}\n\n");
2034 } 2026 }
2035 2027
2036 2028 void EntryFrame::Iterate(RootVisitor* v) const {
2037 void EntryFrame::Iterate(ObjectVisitor* v) const {
2038 IteratePc(v, pc_address(), constant_pool_address(), LookupCode()); 2029 IteratePc(v, pc_address(), constant_pool_address(), LookupCode());
2039 } 2030 }
2040 2031
2041 2032 void StandardFrame::IterateExpressions(RootVisitor* v) const {
2042 void StandardFrame::IterateExpressions(ObjectVisitor* v) const {
2043 const int offset = StandardFrameConstants::kLastObjectOffset; 2033 const int offset = StandardFrameConstants::kLastObjectOffset;
2044 Object** base = &Memory::Object_at(sp()); 2034 Object** base = &Memory::Object_at(sp());
2045 Object** limit = &Memory::Object_at(fp() + offset) + 1; 2035 Object** limit = &Memory::Object_at(fp() + offset) + 1;
2046 v->VisitPointers(base, limit); 2036 v->VisitRootPointers(Root::kTop, base, limit);
2047 } 2037 }
2048 2038
2049 2039 void JavaScriptFrame::Iterate(RootVisitor* v) const {
2050 void JavaScriptFrame::Iterate(ObjectVisitor* v) const {
2051 IterateExpressions(v); 2040 IterateExpressions(v);
2052 IteratePc(v, pc_address(), constant_pool_address(), LookupCode()); 2041 IteratePc(v, pc_address(), constant_pool_address(), LookupCode());
2053 } 2042 }
2054 2043
2055 void InternalFrame::Iterate(ObjectVisitor* v) const { 2044 void InternalFrame::Iterate(RootVisitor* v) const {
2056 Code* code = LookupCode(); 2045 Code* code = LookupCode();
2057 IteratePc(v, pc_address(), constant_pool_address(), code); 2046 IteratePc(v, pc_address(), constant_pool_address(), code);
2058 // Internal frames typically do not receive any arguments, hence their stack 2047 // Internal frames typically do not receive any arguments, hence their stack
2059 // only contains tagged pointers. 2048 // only contains tagged pointers.
2060 // We are misusing the has_tagged_params flag here to tell us whether 2049 // We are misusing the has_tagged_params flag here to tell us whether
2061 // the full stack frame contains only tagged pointers or only raw values. 2050 // the full stack frame contains only tagged pointers or only raw values.
2062 // This is used for the WasmCompileLazy builtin, where we actually pass 2051 // This is used for the WasmCompileLazy builtin, where we actually pass
2063 // untagged arguments and also store untagged values on the stack. 2052 // untagged arguments and also store untagged values on the stack.
2064 if (code->has_tagged_params()) IterateExpressions(v); 2053 if (code->has_tagged_params()) IterateExpressions(v);
2065 } 2054 }
2066 2055
2067 2056 void StubFailureTrampolineFrame::Iterate(RootVisitor* v) const {
2068 void StubFailureTrampolineFrame::Iterate(ObjectVisitor* v) const {
2069 Object** base = &Memory::Object_at(sp()); 2057 Object** base = &Memory::Object_at(sp());
2070 Object** limit = &Memory::Object_at( 2058 Object** limit = &Memory::Object_at(
2071 fp() + StubFailureTrampolineFrameConstants::kFixedHeaderBottomOffset); 2059 fp() + StubFailureTrampolineFrameConstants::kFixedHeaderBottomOffset);
2072 v->VisitPointers(base, limit); 2060 v->VisitRootPointers(Root::kTop, base, limit);
2073 base = &Memory::Object_at(fp() + StandardFrameConstants::kFunctionOffset); 2061 base = &Memory::Object_at(fp() + StandardFrameConstants::kFunctionOffset);
2074 const int offset = StandardFrameConstants::kLastObjectOffset; 2062 const int offset = StandardFrameConstants::kLastObjectOffset;
2075 limit = &Memory::Object_at(fp() + offset) + 1; 2063 limit = &Memory::Object_at(fp() + offset) + 1;
2076 v->VisitPointers(base, limit); 2064 v->VisitRootPointers(Root::kTop, base, limit);
2077 IteratePc(v, pc_address(), constant_pool_address(), LookupCode()); 2065 IteratePc(v, pc_address(), constant_pool_address(), LookupCode());
2078 } 2066 }
2079 2067
2080 2068
2081 Address StubFailureTrampolineFrame::GetCallerStackPointer() const { 2069 Address StubFailureTrampolineFrame::GetCallerStackPointer() const {
2082 return fp() + StandardFrameConstants::kCallerSPOffset; 2070 return fp() + StandardFrameConstants::kCallerSPOffset;
2083 } 2071 }
2084 2072
2085 2073
2086 Code* StubFailureTrampolineFrame::unchecked_code() const { 2074 Code* StubFailureTrampolineFrame::unchecked_code() const {
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
2277 for (StackFrameIterator it(isolate); !it.done(); it.Advance()) { 2265 for (StackFrameIterator it(isolate); !it.done(); it.Advance()) {
2278 StackFrame* frame = AllocateFrameCopy(it.frame(), zone); 2266 StackFrame* frame = AllocateFrameCopy(it.frame(), zone);
2279 list.Add(frame, zone); 2267 list.Add(frame, zone);
2280 } 2268 }
2281 return list.ToVector(); 2269 return list.ToVector();
2282 } 2270 }
2283 2271
2284 2272
2285 } // namespace internal 2273 } // namespace internal
2286 } // namespace v8 2274 } // namespace v8
OLDNEW
« no previous file with comments | « src/frames.h ('k') | src/global-handles.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698