// Copyright 2020 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_COMMON_EXTERNAL_POINTER_INL_H_#define V8_COMMON_EXTERNAL_POINTER_INL_H_#include "include/v8-internal.h"#include "src/common/external-pointer.h"#include "src/execution/isolate.h"namespacev8{namespaceinternal{V8_INLINEExternalPointer_tEncodeExternalPointer(Isolate*isolate,Addressexternal_pointer){STATIC_ASSERT(kExternalPointerSize==kSystemPointerSize);if(!V8_HEAP_SANDBOX_BOOL)returnexternal_pointer;returnexternal_pointer^kExternalPointerSalt;}V8_INLINEAddressDecodeExternalPointer(constIsolate*isolate,ExternalPointer_tencoded_pointer){STATIC_ASSERT(kExternalPointerSize==kSystemPointerSize);if(!V8_HEAP_SANDBOX_BOOL)returnencoded_pointer;returnencoded_pointer^kExternalPointerSalt;}}// namespace internal}// namespace v8#endif // V8_COMMON_EXTERNAL_POINTER_INL_H_