| 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 "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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 // NOTE: This code runs while GC is in progress and runs within | 90 // NOTE: This code runs while GC is in progress and runs within |
| 91 // a NoHandleScope block. Hence it is not ok to use regular Zone or | 91 // a NoHandleScope block. Hence it is not ok to use regular Zone or |
| 92 // Scope handles. We use direct stack handles, the raw pointers in | 92 // Scope handles. We use direct stack handles, the raw pointers in |
| 93 // these handles are not traversed. The use of handles is mainly to | 93 // these handles are not traversed. The use of handles is mainly to |
| 94 // be able to reuse the handle based code and avoid having to add | 94 // be able to reuse the handle based code and avoid having to add |
| 95 // helper functions to the raw object interface. | 95 // helper functions to the raw object interface. |
| 96 NoSafepointScope no_safepoint; | 96 NoSafepointScope no_safepoint; |
| 97 Code code; | 97 Code code; |
| 98 code = GetCodeObject(); | 98 code = GetCodeObject(); |
| 99 if (!code.IsNull()) { | 99 if (!code.IsNull()) { |
| 100 // Visit the code object. | |
| 101 RawObject* raw_code = code.raw(); | |
| 102 visitor->VisitPointer(&raw_code); | |
| 103 | |
| 104 // Optimized frames have a stack map. We need to visit the frame based | 100 // Optimized frames have a stack map. We need to visit the frame based |
| 105 // on the stack map. | 101 // on the stack map. |
| 106 Array maps; | 102 Array maps; |
| 107 maps = Array::null(); | 103 maps = Array::null(); |
| 108 StackMap map; | 104 StackMap map; |
| 109 const uword start = Instructions::PayloadStart(code.instructions()); | 105 const uword start = Instructions::PayloadStart(code.instructions()); |
| 110 map = code.GetStackMap(pc() - start, &maps, &map); | 106 map = code.GetStackMap(pc() - start, &maps, &map); |
| 111 if (!map.IsNull()) { | 107 if (!map.IsNull()) { |
| 112 #if !defined(TARGET_ARCH_DBC) | 108 #if !defined(TARGET_ARCH_DBC) |
| 113 RawObject** first = reinterpret_cast<RawObject**>(sp()); | 109 RawObject** first = reinterpret_cast<RawObject**>(sp()); |
| (...skipping 469 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 583 StackFrameIterator frames(StackFrameIterator::kValidateFrames); | 579 StackFrameIterator frames(StackFrameIterator::kValidateFrames); |
| 584 StackFrame* frame = frames.NextFrame(); | 580 StackFrame* frame = frames.NextFrame(); |
| 585 while (frame != NULL) { | 581 while (frame != NULL) { |
| 586 frame = frames.NextFrame(); | 582 frame = frames.NextFrame(); |
| 587 } | 583 } |
| 588 } | 584 } |
| 589 #endif | 585 #endif |
| 590 | 586 |
| 591 | 587 |
| 592 } // namespace dart | 588 } // namespace dart |
| OLD | NEW |