| 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 10 matching lines...) Expand all Loading... |
| 21 | 21 |
| 22 | 22 |
| 23 bool StackFrame::IsStubFrame() const { | 23 bool StackFrame::IsStubFrame() const { |
| 24 ASSERT(!(IsEntryFrame() || IsExitFrame())); | 24 ASSERT(!(IsEntryFrame() || IsExitFrame())); |
| 25 #if !defined(TARGET_OS_WINDOWS) | 25 #if !defined(TARGET_OS_WINDOWS) |
| 26 // On Windows, the profiler calls this from a separate thread where | 26 // On Windows, the profiler calls this from a separate thread where |
| 27 // Thread::Current() is NULL, so we cannot create a NoSafepointScope. | 27 // Thread::Current() is NULL, so we cannot create a NoSafepointScope. |
| 28 NoSafepointScope no_safepoint; | 28 NoSafepointScope no_safepoint; |
| 29 #endif | 29 #endif |
| 30 RawCode* code = GetCodeObject(); | 30 RawCode* code = GetCodeObject(); |
| 31 intptr_t cid = code->ptr()->owner_->GetClassId(); | 31 const intptr_t cid = code->ptr()->owner_->GetClassId(); |
| 32 ASSERT(cid == kNullCid || cid == kClassCid || cid == kFunctionCid); | 32 ASSERT(cid == kNullCid || cid == kClassCid || cid == kFunctionCid); |
| 33 return cid == kNullCid || cid == kClassCid; | 33 return cid == kNullCid || cid == kClassCid; |
| 34 } | 34 } |
| 35 | 35 |
| 36 | 36 |
| 37 const char* StackFrame::ToCString() const { | 37 const char* StackFrame::ToCString() const { |
| 38 ASSERT(thread_ == Thread::Current()); | 38 ASSERT(thread_ == Thread::Current()); |
| 39 Zone* zone = Thread::Current()->zone(); | 39 Zone* zone = Thread::Current()->zone(); |
| 40 if (IsDartFrame()) { | 40 if (IsDartFrame()) { |
| 41 const Code& code = Code::Handle(LookupDartCode()); | 41 const Code& code = Code::Handle(LookupDartCode()); |
| (...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 490 if (deopt_instr->kind() == DeoptInstr::kCallerFp) { | 490 if (deopt_instr->kind() == DeoptInstr::kCallerFp) { |
| 491 return (index - num_materializations_); | 491 return (index - num_materializations_); |
| 492 } | 492 } |
| 493 } | 493 } |
| 494 UNREACHABLE(); | 494 UNREACHABLE(); |
| 495 return 0; | 495 return 0; |
| 496 } | 496 } |
| 497 | 497 |
| 498 | 498 |
| 499 } // namespace dart | 499 } // namespace dart |
| OLD | NEW |