Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(242)

Side by Side Diff: src/frames.cc

Issue 1632913003: [heap] Move to page lookups for SemiSpace, NewSpace, and Heap containment methods (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: DCHECK in serializer Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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)) {
ulan 2016/02/09 13:36:50 We check the large space again below, so here we c
Hannes Payer (out of office) 2016/02/09 14:40:22 +1
Michael Lippautz 2016/02/09 14:50:28 Done.
Michael Lippautz 2016/02/09 14:50:28 Done.
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698