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

Side by Side Diff: Source/platform/heap/ThreadState.h

Issue 271703002: Simplify and speed up address-to-page cache for conservative stack scanning. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Merge up Created 6 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « Source/platform/heap/HeapTest.cpp ('k') | Source/platform/heap/ThreadState.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 449 matching lines...) Expand 10 before | Expand all | Expand 10 after
460 // 460 //
461 // The heap is split into multiple heap parts based on object 461 // The heap is split into multiple heap parts based on object
462 // types. To get the index for a given type, use 462 // types. To get the index for a given type, use
463 // HeapTrait<Type>::index. 463 // HeapTrait<Type>::index.
464 BaseHeap* heap(int index) const { return m_heaps[index]; } 464 BaseHeap* heap(int index) const { return m_heaps[index]; }
465 465
466 // Infrastructure to determine if an address is within one of the 466 // Infrastructure to determine if an address is within one of the
467 // address ranges for the Blink heap. If the address is in the Blink 467 // address ranges for the Blink heap. If the address is in the Blink
468 // heap the containing heap page is returned. 468 // heap the containing heap page is returned.
469 HeapContainsCache* heapContainsCache() { return m_heapContainsCache.get(); } 469 HeapContainsCache* heapContainsCache() { return m_heapContainsCache.get(); }
470 BaseHeapPage* contains(Address); 470 BaseHeapPage* contains(Address address) { return heapPageFromAddress(address ); }
471 BaseHeapPage* contains(void* pointer) { return contains(reinterpret_cast<Add ress>(pointer)); } 471 BaseHeapPage* contains(void* pointer) { return contains(reinterpret_cast<Add ress>(pointer)); }
472 BaseHeapPage* contains(const void* pointer) { return contains(const_cast<voi d*>(pointer)); } 472 BaseHeapPage* contains(const void* pointer) { return contains(const_cast<voi d*>(pointer)); }
473 473
474 // List of persistent roots allocated on the given thread. 474 // List of persistent roots allocated on the given thread.
475 PersistentNode* roots() const { return m_persistents.get(); } 475 PersistentNode* roots() const { return m_persistents.get(); }
476 476
477 // List of global persistent roots not owned by any particular thread. 477 // List of global persistent roots not owned by any particular thread.
478 // globalRootsMutex must be acquired before any modifications. 478 // globalRootsMutex must be acquired before any modifications.
479 static PersistentNode* globalRoots(); 479 static PersistentNode* globalRoots();
480 static Mutex& globalRootsMutex(); 480 static Mutex& globalRootsMutex();
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
596 }; 596 };
597 597
598 template<> class ThreadStateFor<AnyThread> { 598 template<> class ThreadStateFor<AnyThread> {
599 public: 599 public:
600 static ThreadState* state() { return ThreadState::current(); } 600 static ThreadState* state() { return ThreadState::current(); }
601 }; 601 };
602 602
603 } 603 }
604 604
605 #endif // ThreadState_h 605 #endif // ThreadState_h
OLDNEW
« no previous file with comments | « Source/platform/heap/HeapTest.cpp ('k') | Source/platform/heap/ThreadState.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698