| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 526 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 537 void ExitFrame::SetCallerFp(Address caller_fp) { | 537 void ExitFrame::SetCallerFp(Address caller_fp) { |
| 538 Memory::Address_at(fp() + ExitFrameConstants::kCallerFPOffset) = caller_fp; | 538 Memory::Address_at(fp() + ExitFrameConstants::kCallerFPOffset) = caller_fp; |
| 539 } | 539 } |
| 540 | 540 |
| 541 | 541 |
| 542 void ExitFrame::Iterate(ObjectVisitor* v) const { | 542 void ExitFrame::Iterate(ObjectVisitor* v) const { |
| 543 // The arguments are traversed as part of the expression stack of | 543 // The arguments are traversed as part of the expression stack of |
| 544 // the calling frame. | 544 // the calling frame. |
| 545 IteratePc(v, pc_address(), LookupCode()); | 545 IteratePc(v, pc_address(), LookupCode()); |
| 546 v->VisitPointer(&code_slot()); | 546 v->VisitPointer(&code_slot()); |
| 547 if (FLAG_enable_ool_constant_pool) { |
| 548 v->VisitPointer(&constant_pool_slot()); |
| 549 } |
| 547 } | 550 } |
| 548 | 551 |
| 549 | 552 |
| 550 Address ExitFrame::GetCallerStackPointer() const { | 553 Address ExitFrame::GetCallerStackPointer() const { |
| 551 return fp() + ExitFrameConstants::kCallerSPDisplacement; | 554 return fp() + ExitFrameConstants::kCallerSPDisplacement; |
| 552 } | 555 } |
| 553 | 556 |
| 554 | 557 |
| 555 StackFrame::Type ExitFrame::GetStateForFramePointer(Address fp, State* state) { | 558 StackFrame::Type ExitFrame::GetStateForFramePointer(Address fp, State* state) { |
| 556 if (fp == 0) return NONE; | 559 if (fp == 0) return NONE; |
| (...skipping 779 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1336 // Make sure that the entry frame does not contain more than one | 1339 // Make sure that the entry frame does not contain more than one |
| 1337 // stack handler. | 1340 // stack handler. |
| 1338 it.Advance(); | 1341 it.Advance(); |
| 1339 ASSERT(it.done()); | 1342 ASSERT(it.done()); |
| 1340 #endif | 1343 #endif |
| 1341 IteratePc(v, pc_address(), LookupCode()); | 1344 IteratePc(v, pc_address(), LookupCode()); |
| 1342 } | 1345 } |
| 1343 | 1346 |
| 1344 | 1347 |
| 1345 void StandardFrame::IterateExpressions(ObjectVisitor* v) const { | 1348 void StandardFrame::IterateExpressions(ObjectVisitor* v) const { |
| 1346 const int offset = StandardFrameConstants::kContextOffset; | 1349 const int offset = StandardFrameConstants::kLastObjectOffset; |
| 1347 Object** base = &Memory::Object_at(sp()); | 1350 Object** base = &Memory::Object_at(sp()); |
| 1348 Object** limit = &Memory::Object_at(fp() + offset) + 1; | 1351 Object** limit = &Memory::Object_at(fp() + offset) + 1; |
| 1349 for (StackHandlerIterator it(this, top_handler()); !it.done(); it.Advance()) { | 1352 for (StackHandlerIterator it(this, top_handler()); !it.done(); it.Advance()) { |
| 1350 StackHandler* handler = it.handler(); | 1353 StackHandler* handler = it.handler(); |
| 1351 // Traverse pointers down to - but not including - the next | 1354 // Traverse pointers down to - but not including - the next |
| 1352 // handler in the handler chain. Update the base to skip the | 1355 // handler in the handler chain. Update the base to skip the |
| 1353 // handler and allow the handler to traverse its own pointers. | 1356 // handler and allow the handler to traverse its own pointers. |
| 1354 const Address address = handler->address(); | 1357 const Address address = handler->address(); |
| 1355 v->VisitPointers(base, reinterpret_cast<Object**>(address)); | 1358 v->VisitPointers(base, reinterpret_cast<Object**>(address)); |
| 1356 base = reinterpret_cast<Object**>(address + StackHandlerConstants::kSize); | 1359 base = reinterpret_cast<Object**>(address + StackHandlerConstants::kSize); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 1374 IteratePc(v, pc_address(), LookupCode()); | 1377 IteratePc(v, pc_address(), LookupCode()); |
| 1375 } | 1378 } |
| 1376 | 1379 |
| 1377 | 1380 |
| 1378 void StubFailureTrampolineFrame::Iterate(ObjectVisitor* v) const { | 1381 void StubFailureTrampolineFrame::Iterate(ObjectVisitor* v) const { |
| 1379 Object** base = &Memory::Object_at(sp()); | 1382 Object** base = &Memory::Object_at(sp()); |
| 1380 Object** limit = &Memory::Object_at(fp() + | 1383 Object** limit = &Memory::Object_at(fp() + |
| 1381 kFirstRegisterParameterFrameOffset); | 1384 kFirstRegisterParameterFrameOffset); |
| 1382 v->VisitPointers(base, limit); | 1385 v->VisitPointers(base, limit); |
| 1383 base = &Memory::Object_at(fp() + StandardFrameConstants::kMarkerOffset); | 1386 base = &Memory::Object_at(fp() + StandardFrameConstants::kMarkerOffset); |
| 1384 const int offset = StandardFrameConstants::kContextOffset; | 1387 const int offset = StandardFrameConstants::kLastObjectOffset; |
| 1385 limit = &Memory::Object_at(fp() + offset) + 1; | 1388 limit = &Memory::Object_at(fp() + offset) + 1; |
| 1386 v->VisitPointers(base, limit); | 1389 v->VisitPointers(base, limit); |
| 1387 IteratePc(v, pc_address(), LookupCode()); | 1390 IteratePc(v, pc_address(), LookupCode()); |
| 1388 } | 1391 } |
| 1389 | 1392 |
| 1390 | 1393 |
| 1391 Address StubFailureTrampolineFrame::GetCallerStackPointer() const { | 1394 Address StubFailureTrampolineFrame::GetCallerStackPointer() const { |
| 1392 return fp() + StandardFrameConstants::kCallerSPOffset; | 1395 return fp() + StandardFrameConstants::kCallerSPOffset; |
| 1393 } | 1396 } |
| 1394 | 1397 |
| (...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1638 ZoneList<StackFrame*> list(10, zone); | 1641 ZoneList<StackFrame*> list(10, zone); |
| 1639 for (StackFrameIterator it(isolate); !it.done(); it.Advance()) { | 1642 for (StackFrameIterator it(isolate); !it.done(); it.Advance()) { |
| 1640 StackFrame* frame = AllocateFrameCopy(it.frame(), zone); | 1643 StackFrame* frame = AllocateFrameCopy(it.frame(), zone); |
| 1641 list.Add(frame, zone); | 1644 list.Add(frame, zone); |
| 1642 } | 1645 } |
| 1643 return list.ToVector(); | 1646 return list.ToVector(); |
| 1644 } | 1647 } |
| 1645 | 1648 |
| 1646 | 1649 |
| 1647 } } // namespace v8::internal | 1650 } } // namespace v8::internal |
| OLD | NEW |