| 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 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 | 185 |
| 186 RawCode* StackFrame::GetCodeObject() const { | 186 RawCode* StackFrame::GetCodeObject() const { |
| 187 // We add a no gc scope to ensure that the code below does not trigger | 187 // We add a no gc scope to ensure that the code below does not trigger |
| 188 // a GC as we are handling raw object references here. It is possible | 188 // a GC as we are handling raw object references here. It is possible |
| 189 // that the code is called while a GC is in progress, that is ok. | 189 // that the code is called while a GC is in progress, that is ok. |
| 190 NoGCScope no_gc; | 190 NoGCScope no_gc; |
| 191 const uword pc_marker = | 191 const uword pc_marker = |
| 192 *(reinterpret_cast<uword*>(fp() + (kPcMarkerSlotFromFp * kWordSize))); | 192 *(reinterpret_cast<uword*>(fp() + (kPcMarkerSlotFromFp * kWordSize))); |
| 193 if (pc_marker != 0) { | 193 if (pc_marker != 0) { |
| 194 const uword entry_point = | 194 const uword entry_point = |
| 195 (pc_marker - Assembler::kEntryPointToPcMarkerOffset); | 195 (pc_marker - Assembler::EntryPointToPcMarkerOffset()); |
| 196 RawInstructions* instr = Instructions::FromEntryPoint(entry_point); | 196 RawInstructions* instr = Instructions::FromEntryPoint(entry_point); |
| 197 if (instr != Instructions::null()) { | 197 if (instr != Instructions::null()) { |
| 198 return instr->ptr()->code_; | 198 return instr->ptr()->code_; |
| 199 } | 199 } |
| 200 } | 200 } |
| 201 return Code::null(); | 201 return Code::null(); |
| 202 } | 202 } |
| 203 | 203 |
| 204 | 204 |
| 205 bool StackFrame::FindExceptionHandler(Isolate* isolate, | 205 bool StackFrame::FindExceptionHandler(Isolate* isolate, |
| (...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 482 if (deopt_instr->kind() == DeoptInstr::kCallerFp) { | 482 if (deopt_instr->kind() == DeoptInstr::kCallerFp) { |
| 483 return (index - num_materializations_); | 483 return (index - num_materializations_); |
| 484 } | 484 } |
| 485 } | 485 } |
| 486 UNREACHABLE(); | 486 UNREACHABLE(); |
| 487 return 0; | 487 return 0; |
| 488 } | 488 } |
| 489 | 489 |
| 490 | 490 |
| 491 } // namespace dart | 491 } // namespace dart |
| OLD | NEW |