diff options
Diffstat (limited to 'deps/v8/src/handles.cc')
-rw-r--r-- | deps/v8/src/handles.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/deps/v8/src/handles.cc b/deps/v8/src/handles.cc index 4afbdb5bf4..57f8c8bc58 100644 --- a/deps/v8/src/handles.cc +++ b/deps/v8/src/handles.cc @@ -12,6 +12,16 @@ namespace v8 { namespace internal { +// Handles should be trivially copyable so that they can be efficiently passed +// by value. If they are not trivially copyable, they cannot be passed in +// registers. +static_assert(IS_TRIVIALLY_COPYABLE(HandleBase), + "HandleBase should be trivially copyable"); +static_assert(IS_TRIVIALLY_COPYABLE(Handle<Object>), + "Handle<Object> should be trivially copyable"); +static_assert(IS_TRIVIALLY_COPYABLE(MaybeHandle<Object>), + "MaybeHandle<Object> should be trivially copyable"); + #ifdef DEBUG bool HandleBase::IsDereferenceAllowed(DereferenceCheckMode mode) const { DCHECK_NOT_NULL(location_); |