Line data Source code
1 : /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
2 : * vim: set ts=8 sts=4 et sw=4 tw=99:
3 : * This Source Code Form is subject to the terms of the Mozilla Public
4 : * License, v. 2.0. If a copy of the MPL was not distributed with this
5 : * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 :
7 : #ifndef jit_JSONSpewer_h
8 : #define jit_JSONSpewer_h
9 :
10 : #ifdef JS_JITSPEW
11 :
12 : #include <stdio.h>
13 :
14 : #include "js/TypeDecls.h"
15 : #include "vm/JSONPrinter.h"
16 :
17 : namespace js {
18 : namespace jit {
19 :
20 : class BacktrackingAllocator;
21 : class MDefinition;
22 : class MIRGraph;
23 : class MResumePoint;
24 : class LNode;
25 :
26 169 : class JSONSpewer : JSONPrinter
27 : {
28 : public:
29 179 : explicit JSONSpewer(GenericPrinter& out)
30 179 : : JSONPrinter(out)
31 179 : { }
32 :
33 : void beginFunction(JSScript* script);
34 : void beginPass(const char * pass);
35 : void spewMDef(MDefinition* def);
36 : void spewMResumePoint(MResumePoint* rp);
37 : void spewMIR(MIRGraph* mir);
38 : void spewLIns(LNode* ins);
39 : void spewLIR(MIRGraph* mir);
40 : void spewRanges(BacktrackingAllocator* regalloc);
41 : void endPass();
42 : void endFunction();
43 : };
44 :
45 : } // namespace jit
46 : } // namespace js
47 :
48 : #endif /* JS_JITSPEW */
49 :
50 : #endif /* jit_JSONSpewer_h */
|