Commit a8fba0f6 authored by mstarzinger's avatar mstarzinger Committed by Commit bot

Realize IWYU pattern for handles.h header.

R=bmeurer@chromium.org

Review URL: https://codereview.chromium.org/1290453002

Cr-Commit-Position: refs/heads/master@{#30110}
parent 02495d54
......@@ -14,6 +14,9 @@
namespace v8 {
namespace internal {
// Forward declarations.
class ExecutableAccessorInfo;
// The list of accessor descriptors. This is a second-order macro
// taking a macro to be applied to all accessor descriptor names.
#define ACCESSOR_INFO_LIST(V) \
......
......@@ -6,10 +6,15 @@
#define V8_API_NATIVES_H_
#include "src/handles.h"
#include "src/property-details.h"
namespace v8 {
namespace internal {
// Forward declarations.
class ObjectTemplateInfo;
class TemplateInfo;
class ApiNatives {
public:
static const int kInitialFunctionCacheSize = 256;
......
......@@ -9,6 +9,7 @@
#include "src/compiler/machine-type.h"
#include "src/handles.h"
#include "src/objects.h"
namespace v8 {
namespace internal {
......
......@@ -5,11 +5,17 @@
#ifndef V8_EXECUTION_H_
#define V8_EXECUTION_H_
#include "src/allocation.h"
#include "src/base/atomicops.h"
#include "src/handles.h"
#include "src/utils.h"
namespace v8 {
namespace internal {
// Forward declarations.
class JSRegExp;
class Execution final : public AllStatic {
public:
// Call a function, the caller supplies a receiver and an array
......
......@@ -31,6 +31,7 @@ class TimeDelta;
namespace internal {
class Isolate;
class JSArrayBuffer;
class FutexWaitListNode {
public:
......
......@@ -5,7 +5,10 @@
#ifndef V8_HANDLES_H_
#define V8_HANDLES_H_
#include "src/objects.h"
#include "include/v8.h"
#include "src/base/macros.h"
#include "src/checks.h"
#include "src/globals.h"
namespace v8 {
namespace internal {
......@@ -13,6 +16,8 @@ namespace internal {
// Forward declarations.
class DeferredHandles;
class HandleScopeImplementer;
class Isolate;
class Object;
// ----------------------------------------------------------------------------
......@@ -25,9 +30,9 @@ class HandleBase {
// Check if this handle refers to the exact same object as the other handle.
V8_INLINE bool is_identical_to(const HandleBase that) const {
// Dereferencing deferred handles to check object equality is safe.
SLOW_DCHECK((this->location_ == NULL ||
SLOW_DCHECK((this->location_ == nullptr ||
this->IsDereferenceAllowed(NO_DEFERRED_CHECK)) &&
(that.location_ == NULL ||
(that.location_ == nullptr ||
that.IsDereferenceAllowed(NO_DEFERRED_CHECK)));
if (this->location_ == that.location_) return true;
if (this->location_ == NULL || that.location_ == NULL) return false;
......@@ -45,7 +50,7 @@ class HandleBase {
// Returns the address to where the raw pointer is stored.
V8_INLINE Object** location() const {
SLOW_DCHECK(location_ == NULL ||
SLOW_DCHECK(location_ == nullptr ||
IsDereferenceAllowed(INCLUDE_DEFERRED_CHECK));
return location_;
}
......
......@@ -19,6 +19,9 @@ class SimpleDateFormat;
namespace v8 {
namespace internal {
// Forward declarations.
class ObjectTemplateInfo;
class I18N {
public:
// Creates an ObjectTemplate with one internal field.
......
......@@ -10,33 +10,15 @@
#ifndef V8_MESSAGES_H_
#define V8_MESSAGES_H_
// Forward declaration of MessageLocation.
namespace v8 {
namespace internal {
class MessageLocation;
} } // namespace v8::internal
class V8Message {
public:
V8Message(char* type,
v8::internal::Handle<v8::internal::JSArray> args,
const v8::internal::MessageLocation* loc) :
type_(type), args_(args), loc_(loc) { }
char* type() const { return type_; }
v8::internal::Handle<v8::internal::JSArray> args() const { return args_; }
const v8::internal::MessageLocation* loc() const { return loc_; }
private:
char* type_;
v8::internal::Handle<v8::internal::JSArray> const args_;
const v8::internal::MessageLocation* loc_;
};
#include "src/base/smart-pointers.h"
#include "src/list.h"
namespace v8 {
namespace internal {
struct Language;
// Forward declarations.
class JSMessageObject;
class LookupIterator;
class SourceInfo;
class MessageLocation {
......
......@@ -5,11 +5,17 @@
#ifndef V8_STRING_STREAM_H_
#define V8_STRING_STREAM_H_
#include "src/allocation.h"
#include "src/base/smart-pointers.h"
#include "src/handles.h"
#include "src/vector.h"
namespace v8 {
namespace internal {
// Forward declarations.
class ByteArray;
class StringAllocator {
public:
virtual ~StringAllocator() { }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment