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

Unified Diff: src/heap/heap.h

Issue 2381493004: [heap] Set progress bar flag for FixedArray upon allocation (Closed)
Patch Set: Addressed comment Created 4 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/heap/heap.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/heap.h
diff --git a/src/heap/heap.h b/src/heap/heap.h
index e65d2b45b6b759a45673ded569216572879f0fbc..cce467ff4f24deebbd53f8ef7f3652b3d8f44447 100644
--- a/src/heap/heap.h
+++ b/src/heap/heap.h
@@ -437,6 +437,10 @@ class PromotionQueue {
class AllocationResult {
public:
+ static inline AllocationResult Retry(AllocationSpace space = NEW_SPACE) {
+ return AllocationResult(space);
+ }
+
// Implicit constructor from Object*.
AllocationResult(Object* object) // NOLINT
: object_(object) {
@@ -447,11 +451,9 @@ class AllocationResult {
AllocationResult() : object_(Smi::FromInt(NEW_SPACE)) {}
- static inline AllocationResult Retry(AllocationSpace space = NEW_SPACE) {
- return AllocationResult(space);
- }
-
inline bool IsRetry() { return object_->IsSmi(); }
+ inline HeapObject* ToObjectChecked();
+ inline AllocationSpace RetrySpace();
template <typename T>
bool To(T** obj) {
@@ -460,13 +462,6 @@ class AllocationResult {
return true;
}
- Object* ToObjectChecked() {
- CHECK(!IsRetry());
- return object_;
- }
-
- inline AllocationSpace RetrySpace();
-
private:
explicit AllocationResult(AllocationSpace space)
: object_(Smi::FromInt(static_cast<int>(space))) {}
« no previous file with comments | « no previous file | src/heap/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698