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

Side by Side Diff: runtime/vm/stack_frame.cc

Issue 2572563004: Improve the casing of Stackmap and Stacktrace. (Closed)
Patch Set: Build fixes Created 4 years 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 | « runtime/vm/snapshot.cc ('k') | runtime/vm/stub_code_arm.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 (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/stack_frame.h" 5 #include "vm/stack_frame.h"
6 6
7 #include "platform/memory_sanitizer.h" 7 #include "platform/memory_sanitizer.h"
8 #include "vm/assembler.h" 8 #include "vm/assembler.h"
9 #include "vm/deopt_instructions.h" 9 #include "vm/deopt_instructions.h"
10 #include "vm/isolate.h" 10 #include "vm/isolate.h"
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 code = GetCodeObject(); 98 code = GetCodeObject();
99 if (!code.IsNull()) { 99 if (!code.IsNull()) {
100 // Visit the code object. 100 // Visit the code object.
101 RawObject* raw_code = code.raw(); 101 RawObject* raw_code = code.raw();
102 visitor->VisitPointer(&raw_code); 102 visitor->VisitPointer(&raw_code);
103 103
104 // Optimized frames have a stack map. We need to visit the frame based 104 // Optimized frames have a stack map. We need to visit the frame based
105 // on the stack map. 105 // on the stack map.
106 Array maps; 106 Array maps;
107 maps = Array::null(); 107 maps = Array::null();
108 Stackmap map; 108 StackMap map;
109 const uword start = Instructions::PayloadStart(code.instructions()); 109 const uword start = Instructions::PayloadStart(code.instructions());
110 map = code.GetStackmap(pc() - start, &maps, &map); 110 map = code.GetStackMap(pc() - start, &maps, &map);
111 if (!map.IsNull()) { 111 if (!map.IsNull()) {
112 #if !defined(TARGET_ARCH_DBC) 112 #if !defined(TARGET_ARCH_DBC)
113 RawObject** first = reinterpret_cast<RawObject**>(sp()); 113 RawObject** first = reinterpret_cast<RawObject**>(sp());
114 RawObject** last = reinterpret_cast<RawObject**>( 114 RawObject** last = reinterpret_cast<RawObject**>(
115 fp() + (kFirstLocalSlotFromFp * kWordSize)); 115 fp() + (kFirstLocalSlotFromFp * kWordSize));
116 116
117 // A stack map is present in the code object, use the stack map to 117 // A stack map is present in the code object, use the stack map to
118 // visit frame slots which are marked as having objects. 118 // visit frame slots which are marked as having objects.
119 // 119 //
120 // The layout of the frame is (lower addresses to the right): 120 // The layout of the frame is (lower addresses to the right):
(...skipping 451 matching lines...) Expand 10 before | Expand all | Expand 10 after
572 StackFrameIterator frames(StackFrameIterator::kValidateFrames); 572 StackFrameIterator frames(StackFrameIterator::kValidateFrames);
573 StackFrame* frame = frames.NextFrame(); 573 StackFrame* frame = frames.NextFrame();
574 while (frame != NULL) { 574 while (frame != NULL) {
575 frame = frames.NextFrame(); 575 frame = frames.NextFrame();
576 } 576 }
577 } 577 }
578 #endif 578 #endif
579 579
580 580
581 } // namespace dart 581 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/snapshot.cc ('k') | runtime/vm/stub_code_arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698