| Index: src/heap/spaces.h
|
| diff --git a/src/heap/spaces.h b/src/heap/spaces.h
|
| index 964c9d2c5fb164d0d1d5e46eec480c1b12332bc5..372f5cddf134f3e8662e7a1a21d067883b52ee2e 100644
|
| --- a/src/heap/spaces.h
|
| +++ b/src/heap/spaces.h
|
| @@ -17,6 +17,7 @@
|
| #include "src/base/platform/mutex.h"
|
| #include "src/flags.h"
|
| #include "src/globals.h"
|
| +#include "src/heap/heap.h"
|
| #include "src/heap/marking.h"
|
| #include "src/list.h"
|
| #include "src/objects.h"
|
| @@ -1868,50 +1869,6 @@ class FreeList {
|
| DISALLOW_IMPLICIT_CONSTRUCTORS(FreeList);
|
| };
|
|
|
| -
|
| -class AllocationResult {
|
| - public:
|
| - // Implicit constructor from Object*.
|
| - AllocationResult(Object* object) // NOLINT
|
| - : object_(object) {
|
| - // AllocationResults can't return Smis, which are used to represent
|
| - // failure and the space to retry in.
|
| - CHECK(!object->IsSmi());
|
| - }
|
| -
|
| - AllocationResult() : object_(Smi::FromInt(NEW_SPACE)) {}
|
| -
|
| - static inline AllocationResult Retry(AllocationSpace space = NEW_SPACE) {
|
| - return AllocationResult(space);
|
| - }
|
| -
|
| - inline bool IsRetry() { return object_->IsSmi(); }
|
| -
|
| - template <typename T>
|
| - bool To(T** obj) {
|
| - if (IsRetry()) return false;
|
| - *obj = T::cast(object_);
|
| - return true;
|
| - }
|
| -
|
| - Object* ToObjectChecked() {
|
| - CHECK(!IsRetry());
|
| - return object_;
|
| - }
|
| -
|
| - inline AllocationSpace RetrySpace();
|
| -
|
| - private:
|
| - explicit AllocationResult(AllocationSpace space)
|
| - : object_(Smi::FromInt(static_cast<int>(space))) {}
|
| -
|
| - Object* object_;
|
| -};
|
| -
|
| -
|
| -STATIC_ASSERT(sizeof(AllocationResult) == kPointerSize);
|
| -
|
| -
|
| // LocalAllocationBuffer represents a linear allocation area that is created
|
| // from a given {AllocationResult} and can be used to allocate memory without
|
| // synchronization.
|
|
|