v8/src/disassembler.h
Sigurd Schneider 1a7d847cfa [cctest] Add V8_EXPORT_PRIVATE to arm/arm64 ports
Change-Id: I2855af444db5dad910d99acc8179aef75e56d000
Bug: v8:9020
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1559734
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60703}
2019-04-09 12:00:39 +00:00

33 lines
1.1 KiB
C++

// Copyright 2006-2008 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_DISASSEMBLER_H_
#define V8_DISASSEMBLER_H_
#include "src/allocation.h"
#include "src/code-reference.h"
namespace v8 {
namespace internal {
class Disassembler : public AllStatic {
public:
// Decode instructions in the the interval [begin, end) and print the
// code into os. Returns the number of bytes disassembled or 1 if no
// instruction could be decoded.
// Does not abort on unimplemented opcodes, but prints them as 'Unimplemented
// Instruction'.
// the code object is used for name resolution and may be null.
// TODO(titzer): accept a {WasmCodeManager*} if {isolate} is null
V8_EXPORT_PRIVATE static int Decode(Isolate* isolate, std::ostream* os,
byte* begin, byte* end,
CodeReference code = {},
Address current_pc = kNullAddress);
};
} // namespace internal
} // namespace v8
#endif // V8_DISASSEMBLER_H_