diff options
Diffstat (limited to 'deps/v8/src/objects/tagged-impl.cc')
-rw-r--r-- | deps/v8/src/objects/tagged-impl.cc | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/deps/v8/src/objects/tagged-impl.cc b/deps/v8/src/objects/tagged-impl.cc new file mode 100644 index 0000000000..f50cec1e67 --- /dev/null +++ b/deps/v8/src/objects/tagged-impl.cc @@ -0,0 +1,39 @@ +// Copyright 2019 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. + +#include "src/objects/tagged-impl.h" + +#include <sstream> + +#include "src/objects/objects.h" +#include "src/strings/string-stream.h" +#include "src/utils/ostreams.h" + +namespace v8 { +namespace internal { + +template <HeapObjectReferenceType kRefType, typename StorageType> +void TaggedImpl<kRefType, StorageType>::ShortPrint(FILE* out) { + OFStream os(out); + os << Brief(*this); +} + +template <HeapObjectReferenceType kRefType, typename StorageType> +void TaggedImpl<kRefType, StorageType>::ShortPrint(StringStream* accumulator) { + std::ostringstream os; + os << Brief(*this); + accumulator->Add(os.str().c_str()); +} + +template <HeapObjectReferenceType kRefType, typename StorageType> +void TaggedImpl<kRefType, StorageType>::ShortPrint(std::ostream& os) { + os << Brief(*this); +} + +// Explicit instantiation declarations. +template class TaggedImpl<HeapObjectReferenceType::STRONG, Address>; +template class TaggedImpl<HeapObjectReferenceType::WEAK, Address>; + +} // namespace internal +} // namespace v8 |