| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/frames.h" | 5 #include "src/frames.h" |
| 6 | 6 |
| 7 #include <sstream> | 7 #include <sstream> |
| 8 | 8 |
| 9 #include "src/ast/ast.h" | 9 #include "src/ast/ast.h" |
| 10 #include "src/ast/scopeinfo.h" | 10 #include "src/ast/scopeinfo.h" |
| (...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 410 return (pc >= interpreter_entry_trampoline->instruction_start() && | 410 return (pc >= interpreter_entry_trampoline->instruction_start() && |
| 411 pc < interpreter_entry_trampoline->instruction_end()) || | 411 pc < interpreter_entry_trampoline->instruction_end()) || |
| 412 (pc >= interpreter_bytecode_dispatch->instruction_start() && | 412 (pc >= interpreter_bytecode_dispatch->instruction_start() && |
| 413 pc < interpreter_bytecode_dispatch->instruction_end()); | 413 pc < interpreter_bytecode_dispatch->instruction_end()); |
| 414 } | 414 } |
| 415 | 415 |
| 416 StackFrame::Type StackFrame::ComputeType(const StackFrameIteratorBase* iterator, | 416 StackFrame::Type StackFrame::ComputeType(const StackFrameIteratorBase* iterator, |
| 417 State* state) { | 417 State* state) { |
| 418 DCHECK(state->fp != NULL); | 418 DCHECK(state->fp != NULL); |
| 419 | 419 |
| 420 #if defined(USE_SIMULATOR) |
| 421 MSAN_MEMORY_IS_INITIALIZED( |
| 422 state->fp + CommonFrameConstants::kContextOrFrameTypeOffset, |
| 423 kPointerSize); |
| 424 #endif |
| 420 Object* marker = Memory::Object_at( | 425 Object* marker = Memory::Object_at( |
| 421 state->fp + CommonFrameConstants::kContextOrFrameTypeOffset); | 426 state->fp + CommonFrameConstants::kContextOrFrameTypeOffset); |
| 422 if (!iterator->can_access_heap_objects_) { | 427 if (!iterator->can_access_heap_objects_) { |
| 423 // TODO(titzer): "can_access_heap_objects" is kind of bogus. It really | 428 // TODO(titzer): "can_access_heap_objects" is kind of bogus. It really |
| 424 // means that we are being called from the profiler, which can interrupt | 429 // means that we are being called from the profiler, which can interrupt |
| 425 // the VM with a signal at any arbitrary instruction, with essentially | 430 // the VM with a signal at any arbitrary instruction, with essentially |
| 426 // anything on the stack. So basically none of these checks are 100% | 431 // anything on the stack. So basically none of these checks are 100% |
| 427 // reliable. | 432 // reliable. |
| 428 #if defined(USE_SIMULATOR) | 433 #if defined(USE_SIMULATOR) |
| 429 MSAN_MEMORY_IS_INITIALIZED( | 434 MSAN_MEMORY_IS_INITIALIZED( |
| 430 state->fp + StandardFrameConstants::kContextOffset, kPointerSize); | 435 state->fp + StandardFrameConstants::kFunctionOffset, kPointerSize); |
| 431 MSAN_MEMORY_IS_INITIALIZED( | |
| 432 state->fp + StandardFrameConstants::kMarkerOffset, kPointerSize); | |
| 433 #endif | 436 #endif |
| 434 Object* maybe_function = | 437 Object* maybe_function = |
| 435 Memory::Object_at(state->fp + StandardFrameConstants::kFunctionOffset); | 438 Memory::Object_at(state->fp + StandardFrameConstants::kFunctionOffset); |
| 436 if (!marker->IsSmi()) { | 439 if (!marker->IsSmi()) { |
| 437 if (maybe_function->IsSmi()) { | 440 if (maybe_function->IsSmi()) { |
| 438 return NONE; | 441 return NONE; |
| 439 } else if (FLAG_ignition && IsInterpreterFramePc(iterator->isolate(), | 442 } else if (FLAG_ignition && IsInterpreterFramePc(iterator->isolate(), |
| 440 *(state->pc_address))) { | 443 *(state->pc_address))) { |
| 441 return INTERPRETED; | 444 return INTERPRETED; |
| 442 } else { | 445 } else { |
| (...skipping 1263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1706 for (StackFrameIterator it(isolate); !it.done(); it.Advance()) { | 1709 for (StackFrameIterator it(isolate); !it.done(); it.Advance()) { |
| 1707 StackFrame* frame = AllocateFrameCopy(it.frame(), zone); | 1710 StackFrame* frame = AllocateFrameCopy(it.frame(), zone); |
| 1708 list.Add(frame, zone); | 1711 list.Add(frame, zone); |
| 1709 } | 1712 } |
| 1710 return list.ToVector(); | 1713 return list.ToVector(); |
| 1711 } | 1714 } |
| 1712 | 1715 |
| 1713 | 1716 |
| 1714 } // namespace internal | 1717 } // namespace internal |
| 1715 } // namespace v8 | 1718 } // namespace v8 |
| OLD | NEW |