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))) {} |