| Index: src/frames.cc
|
| diff --git a/src/frames.cc b/src/frames.cc
|
| index f52b3ce4e47a1bf0fd099723fb36d0f0ac604128..d59fc1b7475764bae4888c286dcd661459a4428a 100644
|
| --- a/src/frames.cc
|
| +++ b/src/frames.cc
|
| @@ -321,9 +321,6 @@ bool SafeStackFrameIterator::IsValidExitFrame(Address fp) const {
|
| if (!IsValidStackAddress(sp)) return false;
|
| StackFrame::State state;
|
| ExitFrame::FillState(fp, sp, &state);
|
| - if (!IsValidStackAddress(reinterpret_cast<Address>(state.pc_address))) {
|
| - return false;
|
| - }
|
| return *state.pc_address != NULL;
|
| }
|
|
|
| @@ -385,9 +382,8 @@ static bool GcSafeCodeContains(HeapObject* object, Address addr);
|
| #endif
|
|
|
|
|
| -void StackFrame::IteratePc(ObjectVisitor* v,
|
| - Address* pc_address,
|
| - Code* holder) {
|
| +void StackFrame::IteratePc(ObjectVisitor* v, Address* pc_address,
|
| + Address* constant_pool_address, Code* holder) {
|
| Address pc = *pc_address;
|
| DCHECK(GcSafeCodeContains(holder, pc));
|
| unsigned pc_offset = static_cast<unsigned>(pc - holder->instruction_start());
|
| @@ -397,6 +393,9 @@ void StackFrame::IteratePc(ObjectVisitor* v,
|
| holder = reinterpret_cast<Code*>(code);
|
| pc = holder->instruction_start() + pc_offset;
|
| *pc_address = pc;
|
| + if (FLAG_enable_embedded_constant_pool && constant_pool_address) {
|
| + *constant_pool_address = holder->constant_pool();
|
| + }
|
| }
|
| }
|
|
|
| @@ -506,7 +505,7 @@ void ExitFrame::ComputeCallerState(State* state) const {
|
| state->fp = Memory::Address_at(fp() + ExitFrameConstants::kCallerFPOffset);
|
| state->pc_address = ResolveReturnAddressLocation(
|
| reinterpret_cast<Address*>(fp() + ExitFrameConstants::kCallerPCOffset));
|
| - if (FLAG_enable_ool_constant_pool) {
|
| + if (FLAG_enable_embedded_constant_pool) {
|
| state->constant_pool_address = reinterpret_cast<Address*>(
|
| fp() + ExitFrameConstants::kConstantPoolOffset);
|
| }
|
| @@ -521,11 +520,8 @@ void ExitFrame::SetCallerFp(Address caller_fp) {
|
| void ExitFrame::Iterate(ObjectVisitor* v) const {
|
| // The arguments are traversed as part of the expression stack of
|
| // the calling frame.
|
| - IteratePc(v, pc_address(), LookupCode());
|
| + IteratePc(v, pc_address(), constant_pool_address(), LookupCode());
|
| v->VisitPointer(&code_slot());
|
| - if (FLAG_enable_ool_constant_pool) {
|
| - v->VisitPointer(&constant_pool_slot());
|
| - }
|
| }
|
|
|
|
|
| @@ -553,8 +549,11 @@ void ExitFrame::FillState(Address fp, Address sp, State* state) {
|
| state->fp = fp;
|
| state->pc_address = ResolveReturnAddressLocation(
|
| reinterpret_cast<Address*>(sp - 1 * kPCOnStackSize));
|
| - state->constant_pool_address =
|
| - reinterpret_cast<Address*>(fp + ExitFrameConstants::kConstantPoolOffset);
|
| + // The constant pool recorded in the exit frame is not associated
|
| + // with the pc in this state (the return address into a C entry
|
| + // stub). ComputeCallerState will retrieve the constant pool
|
| + // together with the associated caller pc.
|
| + state->constant_pool_address = NULL;
|
| }
|
|
|
|
|
| @@ -663,7 +662,7 @@ void StandardFrame::IterateCompiledFrame(ObjectVisitor* v) const {
|
| }
|
|
|
| // Visit the return address in the callee and incoming arguments.
|
| - IteratePc(v, pc_address(), code);
|
| + IteratePc(v, pc_address(), constant_pool_address(), code);
|
|
|
| // Visit the context in stub frame and JavaScript frame.
|
| // Visit the function in JavaScript frame.
|
| @@ -1285,7 +1284,7 @@ void ArgumentsAdaptorFrame::Print(StringStream* accumulator,
|
|
|
|
|
| void EntryFrame::Iterate(ObjectVisitor* v) const {
|
| - IteratePc(v, pc_address(), LookupCode());
|
| + IteratePc(v, pc_address(), constant_pool_address(), LookupCode());
|
| }
|
|
|
|
|
| @@ -1299,7 +1298,7 @@ void StandardFrame::IterateExpressions(ObjectVisitor* v) const {
|
|
|
| void JavaScriptFrame::Iterate(ObjectVisitor* v) const {
|
| IterateExpressions(v);
|
| - IteratePc(v, pc_address(), LookupCode());
|
| + IteratePc(v, pc_address(), constant_pool_address(), LookupCode());
|
| }
|
|
|
|
|
| @@ -1307,7 +1306,7 @@ void InternalFrame::Iterate(ObjectVisitor* v) const {
|
| // Internal frames only have object pointers on the expression stack
|
| // as they never have any arguments.
|
| IterateExpressions(v);
|
| - IteratePc(v, pc_address(), LookupCode());
|
| + IteratePc(v, pc_address(), constant_pool_address(), LookupCode());
|
| }
|
|
|
|
|
| @@ -1320,7 +1319,7 @@ void StubFailureTrampolineFrame::Iterate(ObjectVisitor* v) const {
|
| const int offset = StandardFrameConstants::kLastObjectOffset;
|
| limit = &Memory::Object_at(fp() + offset) + 1;
|
| v->VisitPointers(base, limit);
|
| - IteratePc(v, pc_address(), LookupCode());
|
| + IteratePc(v, pc_address(), constant_pool_address(), LookupCode());
|
| }
|
|
|
|
|
|
|