diff options
Diffstat (limited to 'deps/v8/src/interpreter/bytecode-source-info.cc')
-rw-r--r-- | deps/v8/src/interpreter/bytecode-source-info.cc | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/deps/v8/src/interpreter/bytecode-source-info.cc b/deps/v8/src/interpreter/bytecode-source-info.cc new file mode 100644 index 0000000000..ed05b3e2e7 --- /dev/null +++ b/deps/v8/src/interpreter/bytecode-source-info.cc @@ -0,0 +1,24 @@ +// Copyright 2017 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/interpreter/bytecode-source-info.h" + +#include <iomanip> +#include "src/source-position-table.h" + +namespace v8 { +namespace internal { +namespace interpreter { + +std::ostream& operator<<(std::ostream& os, const BytecodeSourceInfo& info) { + if (info.is_valid()) { + char description = info.is_statement() ? 'S' : 'E'; + os << info.source_position() << ' ' << description << '>'; + } + return os; +} + +} // namespace interpreter +} // namespace internal +} // namespace v8 |