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 1499 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1510 Code* code = reinterpret_cast<Code*>(object); | 1510 Code* code = reinterpret_cast<Code*>(object); |
1511 DCHECK(code != NULL && GcSafeCodeContains(code, inner_pointer)); | 1511 DCHECK(code != NULL && GcSafeCodeContains(code, inner_pointer)); |
1512 return code; | 1512 return code; |
1513 } | 1513 } |
1514 | 1514 |
1515 | 1515 |
1516 Code* InnerPointerToCodeCache::GcSafeFindCodeForInnerPointer( | 1516 Code* InnerPointerToCodeCache::GcSafeFindCodeForInnerPointer( |
1517 Address inner_pointer) { | 1517 Address inner_pointer) { |
1518 Heap* heap = isolate_->heap(); | 1518 Heap* heap = isolate_->heap(); |
1519 if (!heap->code_space()->Contains(inner_pointer) && | 1519 if (!heap->code_space()->Contains(inner_pointer) && |
1520 !heap->lo_space()->Contains(inner_pointer)) { | 1520 !heap->lo_space()->ContainsSlow(inner_pointer)) { |
1521 return nullptr; | 1521 return nullptr; |
1522 } | 1522 } |
1523 | 1523 |
1524 // Check if the inner pointer points into a large object chunk. | 1524 // Check if the inner pointer points into a large object chunk. |
1525 LargePage* large_page = heap->lo_space()->FindPage(inner_pointer); | 1525 LargePage* large_page = heap->lo_space()->FindPage(inner_pointer); |
1526 if (large_page != NULL) { | 1526 if (large_page != NULL) { |
1527 return GcSafeCastToCode(large_page->GetObject(), inner_pointer); | 1527 return GcSafeCastToCode(large_page->GetObject(), inner_pointer); |
1528 } | 1528 } |
1529 | 1529 |
1530 // Iterate through the page until we reach the end or find an object starting | 1530 // Iterate through the page until we reach the end or find an object starting |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1638 for (StackFrameIterator it(isolate); !it.done(); it.Advance()) { | 1638 for (StackFrameIterator it(isolate); !it.done(); it.Advance()) { |
1639 StackFrame* frame = AllocateFrameCopy(it.frame(), zone); | 1639 StackFrame* frame = AllocateFrameCopy(it.frame(), zone); |
1640 list.Add(frame, zone); | 1640 list.Add(frame, zone); |
1641 } | 1641 } |
1642 return list.ToVector(); | 1642 return list.ToVector(); |
1643 } | 1643 } |
1644 | 1644 |
1645 | 1645 |
1646 } // namespace internal | 1646 } // namespace internal |
1647 } // namespace v8 | 1647 } // namespace v8 |
OLD | NEW |