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

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

Issue 343803002: Finishes removing intptr_t from raw object fields. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 5 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 | Annotate | Revision Log
« runtime/vm/object.h ('K') | « runtime/vm/snapshot.cc ('k') | no next file » | 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 "vm/assembler.h" 7 #include "vm/assembler.h"
8 #include "vm/deopt_instructions.h" 8 #include "vm/deopt_instructions.h"
9 #include "vm/isolate.h" 9 #include "vm/isolate.h"
10 #include "vm/object.h" 10 #include "vm/object.h"
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 if (!code.IsNull()) { 89 if (!code.IsNull()) {
90 // Visit the code object. 90 // Visit the code object.
91 RawObject* raw_code = code.raw(); 91 RawObject* raw_code = code.raw();
92 visitor->VisitPointer(&raw_code); 92 visitor->VisitPointer(&raw_code);
93 93
94 // Optimized frames have a stack map. We need to visit the frame based 94 // Optimized frames have a stack map. We need to visit the frame based
95 // on the stack map. 95 // on the stack map.
96 Array maps; 96 Array maps;
97 maps = Array::null(); 97 maps = Array::null();
98 Stackmap map; 98 Stackmap map;
99 map = code.GetStackmap(pc(), &maps, &map); 99 const uword entry = reinterpret_cast<uword>(code.instructions()->ptr()) +
100 Instructions::HeaderSize();
101 map = code.GetStackmap(pc() - entry, &maps, &map);
100 if (!map.IsNull()) { 102 if (!map.IsNull()) {
101 RawObject** first = reinterpret_cast<RawObject**>(sp()); 103 RawObject** first = reinterpret_cast<RawObject**>(sp());
102 RawObject** last = reinterpret_cast<RawObject**>( 104 RawObject** last = reinterpret_cast<RawObject**>(
103 fp() + (kFirstLocalSlotFromFp * kWordSize)); 105 fp() + (kFirstLocalSlotFromFp * kWordSize));
104 106
105 // A stack map is present in the code object, use the stack map to 107 // A stack map is present in the code object, use the stack map to
106 // visit frame slots which are marked as having objects. 108 // visit frame slots which are marked as having objects.
107 // 109 //
108 // The layout of the frame is (lower addresses to the right): 110 // The layout of the frame is (lower addresses to the right):
109 // | spill slots | outgoing arguments | saved registers | 111 // | spill slots | outgoing arguments | saved registers |
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after
456 if (deopt_instr->kind() == DeoptInstr::kCallerFp) { 458 if (deopt_instr->kind() == DeoptInstr::kCallerFp) {
457 return (index - num_materializations_); 459 return (index - num_materializations_);
458 } 460 }
459 } 461 }
460 UNREACHABLE(); 462 UNREACHABLE();
461 return 0; 463 return 0;
462 } 464 }
463 465
464 466
465 } // namespace dart 467 } // namespace dart
OLDNEW
« runtime/vm/object.h ('K') | « runtime/vm/snapshot.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698