Store num args instead of offset in prologue and func entry SrcKeys
[hiphop-php.git] / hphp / tools / tc-print / tc-print-logger.h
blob47b36469eef61ef08252de7aea9cd6c4b8f3ef71
1 /*
2 +----------------------------------------------------------------------+
3 | HipHop for PHP |
4 +----------------------------------------------------------------------+
5 | Copyright (c) 2010-present Facebook, Inc. (http://www.facebook.com) |
6 +----------------------------------------------------------------------+
7 | This source file is subject to version 3.01 of the PHP license, |
8 | that is bundled with this package in the file LICENSE, and is |
9 | available through the world-wide-web at the following url: |
10 | http://www.php.net/license/3_01.txt |
11 | If you did not receive a copy of the PHP license and are unable to |
12 | obtain it through the world-wide-web, please send a note to |
13 | license@php.net so we can mail you a copy immediately. |
14 +----------------------------------------------------------------------+
17 #ifndef incl_HPHP_TCPRINT_LOGGER_H_
18 #define incl_HPHP_TCPRINT_LOGGER_H_
19 #include <iostream>
21 namespace HPHP {
23 struct TCPrintLogger {
24 virtual ~TCPrintLogger() {};
25 // Standard printing (usually to std::cout).
26 virtual void printGeneric(const char* format, ...) = 0;
27 // Printing of the collected bytecode at the start of translations.
28 virtual void printBytecode(std::string byteInfo) = 0;
29 // Printing of line information (and assoc bytecode).
30 virtual void printLine(std::string lineInfo) = 0;
31 // Printing of generated assembly.
32 virtual void printAsm(const char* format, ...) = 0;
33 // If relevant, pushing formatted output to database.
34 virtual bool flushTranslation(std::string, bool transOpt) = 0;
37 } // namespace HPHP
39 #endif