blob: ac53f775b13bc8bb95e9c4804a4aa03cd7400657 [file] [log] [blame]
Steve Blocka7e24c12009-10-30 11:49:00 +00001// Copyright 2006-2008 the V8 project authors. All rights reserved.
Ben Murdochb8a8cc12014-11-26 15:28:44 +00002// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
Steve Blocka7e24c12009-10-30 11:49:00 +00004
5#ifndef V8_DISASSEMBLER_H_
6#define V8_DISASSEMBLER_H_
7
Ben Murdochb8a8cc12014-11-26 15:28:44 +00008#include "src/allocation.h"
Ben Murdoch257744e2011-11-30 15:57:28 +00009
Steve Blocka7e24c12009-10-30 11:49:00 +000010namespace v8 {
11namespace internal {
12
13class Disassembler : public AllStatic {
14 public:
Steve Blocka7e24c12009-10-30 11:49:00 +000015 // Decode instructions in the the interval [begin, end) and print the
Emily Bernierd0a1eb72015-03-24 16:35:39 -040016 // code into os. Returns the number of bytes disassembled or 1 if no
Steve Blocka7e24c12009-10-30 11:49:00 +000017 // instruction could be decoded.
Emily Bernierd0a1eb72015-03-24 16:35:39 -040018 // the code object is used for name resolution and may be null.
19 static int Decode(Isolate* isolate, std::ostream* os, byte* begin, byte* end,
20 Code* code = NULL);
Steve Blocka7e24c12009-10-30 11:49:00 +000021};
22
Ben Murdoch4a90d5f2016-03-22 12:00:34 +000023} // namespace internal
24} // namespace v8
Steve Blocka7e24c12009-10-30 11:49:00 +000025
26#endif // V8_DISASSEMBLER_H_