80e0a759fd
Removing includes which are not needed and also not indirectly pulled in. BUG=v8:7490, v8:7310 Change-Id: I219ba92c3281c3c245cc6c5574c85c2d51a217a9 Reviewed-on: https://chromium-review.googlesource.com/934722 Reviewed-by: Clemens Hammacher <clemensh@chromium.org> Commit-Queue: Marja Hölttä <marja@chromium.org> Cr-Commit-Position: refs/heads/master@{#51550}
51 lines
1.3 KiB
C++
51 lines
1.3 KiB
C++
// Copyright 2016 the V8 project authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
#ifndef V8_FIELD_TYPE_H_
|
|
#define V8_FIELD_TYPE_H_
|
|
|
|
#include "src/objects.h"
|
|
#include "src/objects/map.h"
|
|
|
|
namespace v8 {
|
|
namespace internal {
|
|
|
|
template <typename T>
|
|
class Handle;
|
|
|
|
class FieldType : public Object {
|
|
public:
|
|
static FieldType* None();
|
|
static FieldType* Any();
|
|
static Handle<FieldType> None(Isolate* isolate);
|
|
static Handle<FieldType> Any(Isolate* isolate);
|
|
static FieldType* Class(i::Map* map);
|
|
static Handle<FieldType> Class(i::Handle<i::Map> map, Isolate* isolate);
|
|
static FieldType* cast(Object* object);
|
|
|
|
bool NowContains(Object* value) {
|
|
if (this == Any()) return true;
|
|
if (this == None()) return false;
|
|
if (!value->IsHeapObject()) return false;
|
|
return HeapObject::cast(value)->map() == Map::cast(this);
|
|
}
|
|
|
|
bool NowContains(Handle<Object> value) { return NowContains(*value); }
|
|
|
|
bool IsClass();
|
|
Handle<i::Map> AsClass();
|
|
bool IsNone() { return this == None(); }
|
|
bool IsAny() { return this == Any(); }
|
|
bool NowStable();
|
|
bool NowIs(FieldType* other);
|
|
bool NowIs(Handle<FieldType> other);
|
|
|
|
void PrintTo(std::ostream& os);
|
|
};
|
|
|
|
} // namespace internal
|
|
} // namespace v8
|
|
|
|
#endif // V8_FIELD_TYPE_H_
|