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

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

Issue 77413004: Pushes 0 for PC marker in runtime call stubs on ARM and MIPS. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 1 month 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
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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 // map. The outgoing arguments are assumed to be tagged; the number 90 // map. The outgoing arguments are assumed to be tagged; the number
91 // of outgoing arguments is not explicitly tracked. 91 // of outgoing arguments is not explicitly tracked.
92 // 92 //
93 // TODO(kmillikin): This does not handle slow path calls with 93 // TODO(kmillikin): This does not handle slow path calls with
94 // arguments, where the arguments are pushed after the live registers. 94 // arguments, where the arguments are pushed after the live registers.
95 // Enable such calls. 95 // Enable such calls.
96 intptr_t length = map.Length(); 96 intptr_t length = map.Length();
97 // Spill slots are at the 'bottom' of the frame. 97 // Spill slots are at the 'bottom' of the frame.
98 intptr_t spill_slot_count = length - map.RegisterBitCount(); 98 intptr_t spill_slot_count = length - map.RegisterBitCount();
99 for (intptr_t bit = 0; bit < spill_slot_count; ++bit) { 99 for (intptr_t bit = 0; bit < spill_slot_count; ++bit) {
100 if (map.IsObject(bit)) visitor->VisitPointer(last); 100 if (map.IsObject(bit)) {
101 visitor->VisitPointer(last);
102 }
101 --last; 103 --last;
102 } 104 }
103 105
104 // The live registers at the 'top' of the frame comprise the rest of the 106 // The live registers at the 'top' of the frame comprise the rest of the
105 // stack map. 107 // stack map.
106 for (intptr_t bit = length - 1; bit >= spill_slot_count; --bit) { 108 for (intptr_t bit = length - 1; bit >= spill_slot_count; --bit) {
107 if (map.IsObject(bit)) visitor->VisitPointer(first); 109 if (map.IsObject(bit)) {
110 visitor->VisitPointer(first);
111 }
108 ++first; 112 ++first;
109 } 113 }
110 114
111 // The last slot can be one slot (but not more) past the last slot 115 // The last slot can be one slot (but not more) past the last slot
112 // in the case that all slots were covered by the stack map. 116 // in the case that all slots were covered by the stack map.
113 ASSERT((last + 1) >= first); 117 ASSERT((last + 1) >= first);
114 visitor->VisitPointers(first, last); 118 visitor->VisitPointers(first, last);
115 119
116 // Now visit other slots which might be part of the calling convention. 120 // Now visit other slots which might be part of the calling convention.
117 first = reinterpret_cast<RawObject**>( 121 first = reinterpret_cast<RawObject**>(
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after
424 if (deopt_instr->kind() == DeoptInstr::kCallerFp) { 428 if (deopt_instr->kind() == DeoptInstr::kCallerFp) {
425 return index; 429 return index;
426 } 430 }
427 } 431 }
428 UNREACHABLE(); 432 UNREACHABLE();
429 return 0; 433 return 0;
430 } 434 }
431 435
432 436
433 } // namespace dart 437 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698