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

Side by Side Diff: src/frames.cc

Issue 1702593002: More simplification and unification of frame handling (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix arm64 Created 4 years, 10 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/isolate.cc » ('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 <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 624 matching lines...) Expand 10 before | Expand all | Expand 10 after
635 void StandardFrame::IterateCompiledFrame(ObjectVisitor* v) const { 635 void StandardFrame::IterateCompiledFrame(ObjectVisitor* v) const {
636 // Make sure that we're not doing "safe" stack frame iteration. We cannot 636 // Make sure that we're not doing "safe" stack frame iteration. We cannot
637 // possibly find pointers in optimized frames in that state. 637 // possibly find pointers in optimized frames in that state.
638 DCHECK(can_access_heap_objects()); 638 DCHECK(can_access_heap_objects());
639 639
640 // Compute the safepoint information. 640 // Compute the safepoint information.
641 unsigned stack_slots = 0; 641 unsigned stack_slots = 0;
642 SafepointEntry safepoint_entry; 642 SafepointEntry safepoint_entry;
643 Code* code = StackFrame::GetSafepointData( 643 Code* code = StackFrame::GetSafepointData(
644 isolate(), pc(), &safepoint_entry, &stack_slots); 644 isolate(), pc(), &safepoint_entry, &stack_slots);
645 unsigned slot_space = stack_slots * kPointerSize; 645 unsigned slot_space =
646 stack_slots * kPointerSize - StandardFrameConstants::kFixedFrameSize;
646 647
647 // Visit the outgoing parameters. 648 // Visit the outgoing parameters.
648 Object** parameters_base = &Memory::Object_at(sp()); 649 Object** parameters_base = &Memory::Object_at(sp());
649 Object** parameters_limit = &Memory::Object_at( 650 Object** parameters_limit = &Memory::Object_at(
650 fp() + JavaScriptFrameConstants::kFunctionOffset - slot_space); 651 fp() + JavaScriptFrameConstants::kFunctionOffset - slot_space);
651 652
652 // Visit the parameters that may be on top of the saved registers. 653 // Visit the parameters that may be on top of the saved registers.
653 if (safepoint_entry.argument_count() > 0) { 654 if (safepoint_entry.argument_count() > 0) {
654 v->VisitPointers(parameters_base, 655 v->VisitPointers(parameters_base,
655 parameters_base + safepoint_entry.argument_count()); 656 parameters_base + safepoint_entry.argument_count());
(...skipping 983 matching lines...) Expand 10 before | Expand all | Expand 10 after
1639 for (StackFrameIterator it(isolate); !it.done(); it.Advance()) { 1640 for (StackFrameIterator it(isolate); !it.done(); it.Advance()) {
1640 StackFrame* frame = AllocateFrameCopy(it.frame(), zone); 1641 StackFrame* frame = AllocateFrameCopy(it.frame(), zone);
1641 list.Add(frame, zone); 1642 list.Add(frame, zone);
1642 } 1643 }
1643 return list.ToVector(); 1644 return list.ToVector();
1644 } 1645 }
1645 1646
1646 1647
1647 } // namespace internal 1648 } // namespace internal
1648 } // namespace v8 1649 } // namespace v8
OLDNEW
« no previous file with comments | « src/frames.h ('k') | src/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698