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_macros.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" |
11 #include "vm/object_store.h" | 11 #include "vm/object_store.h" |
12 #include "vm/os.h" | 12 #include "vm/os.h" |
13 #include "vm/parser.h" | 13 #include "vm/parser.h" |
14 #include "vm/raw_object.h" | 14 #include "vm/raw_object.h" |
15 #include "vm/stub_code.h" | 15 #include "vm/stub_code.h" |
16 #include "vm/visitor.h" | 16 #include "vm/visitor.h" |
17 | 17 |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 | 136 |
137 RawCode* StackFrame::GetCodeObject() const { | 137 RawCode* StackFrame::GetCodeObject() const { |
138 // We add a no gc scope to ensure that the code below does not trigger | 138 // We add a no gc scope to ensure that the code below does not trigger |
139 // a GC as we are handling raw object references here. It is possible | 139 // a GC as we are handling raw object references here. It is possible |
140 // that the code is called while a GC is in progress, that is ok. | 140 // that the code is called while a GC is in progress, that is ok. |
141 NoGCScope no_gc; | 141 NoGCScope no_gc; |
142 uword saved_pc = | 142 uword saved_pc = |
143 *(reinterpret_cast<uword*>(fp() + EntrypointMarkerOffsetFromFp())); | 143 *(reinterpret_cast<uword*>(fp() + EntrypointMarkerOffsetFromFp())); |
144 if (saved_pc != 0) { | 144 if (saved_pc != 0) { |
145 uword entry_point = | 145 uword entry_point = |
146 (saved_pc - AssemblerMacros::kOffsetOfSavedPCfromEntrypoint); | 146 (saved_pc - Assembler::kOffsetOfSavedPCfromEntrypoint); |
147 RawInstructions* instr = Instructions::FromEntryPoint(entry_point); | 147 RawInstructions* instr = Instructions::FromEntryPoint(entry_point); |
148 if (instr != Instructions::null()) { | 148 if (instr != Instructions::null()) { |
149 return instr->ptr()->code_; | 149 return instr->ptr()->code_; |
150 } | 150 } |
151 } | 151 } |
152 return Code::null(); | 152 return Code::null(); |
153 } | 153 } |
154 | 154 |
155 | 155 |
156 bool StackFrame::FindExceptionHandler(uword* handler_pc) const { | 156 bool StackFrame::FindExceptionHandler(uword* handler_pc) const { |
(...skipping 182 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 |