OLD | NEW |
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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 void StackFrame::VisitObjectPointers(ObjectPointerVisitor* visitor) { | 54 void StackFrame::VisitObjectPointers(ObjectPointerVisitor* visitor) { |
55 // NOTE: This code runs while GC is in progress and runs within | 55 // NOTE: This code runs while GC is in progress and runs within |
56 // a NoHandleScope block. Hence it is not ok to use regular Zone or | 56 // a NoHandleScope block. Hence it is not ok to use regular Zone or |
57 // Scope handles. We use direct stack handles, the raw pointers in | 57 // Scope handles. We use direct stack handles, the raw pointers in |
58 // these handles are not traversed. The use of handles is mainly to | 58 // these handles are not traversed. The use of handles is mainly to |
59 // be able to reuse the handle based code and avoid having to add | 59 // be able to reuse the handle based code and avoid having to add |
60 // helper functions to the raw object interface. | 60 // helper functions to the raw object interface. |
61 ASSERT(visitor != NULL); | 61 ASSERT(visitor != NULL); |
62 NoGCScope no_gc; | 62 NoGCScope no_gc; |
63 RawObject** start_addr = reinterpret_cast<RawObject**>(sp()); | 63 RawObject** start_addr = reinterpret_cast<RawObject**>(sp()); |
64 RawObject** end_addr = reinterpret_cast<RawObject**>(fp()) + | 64 RawObject** end_addr = |
65 ParsedFunction::kFirstLocalSlotIndex; | 65 reinterpret_cast<RawObject**>(fp()) + kFirstLocalSlotIndex; |
66 Code code; | 66 Code code; |
67 code = LookupDartCode(); | 67 code = LookupDartCode(); |
68 if (!code.IsNull()) { | 68 if (!code.IsNull()) { |
69 // Visit the code object. | 69 // Visit the code object. |
70 RawObject* raw_code = code.raw(); | 70 RawObject* raw_code = code.raw(); |
71 visitor->VisitPointer(&raw_code); | 71 visitor->VisitPointer(&raw_code); |
72 // Visit stack based on stack maps. | 72 // Visit stack based on stack maps. |
73 Array maps; | 73 Array maps; |
74 maps = Array::null(); | 74 maps = Array::null(); |
75 Stackmap map; | 75 Stackmap map; |
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
339 &func); | 339 &func); |
340 code_ = func.unoptimized_code(); | 340 code_ = func.unoptimized_code(); |
341 function_ = func.raw(); | 341 function_ = func.raw(); |
342 return; | 342 return; |
343 } | 343 } |
344 } | 344 } |
345 SetDone(); | 345 SetDone(); |
346 } | 346 } |
347 | 347 |
348 } // namespace dart | 348 } // namespace dart |
OLD | NEW |