js/src/jit/C1Spewer.h

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     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/. */
     7 #ifndef jit_C1Spewer_h
     8 #define jit_C1Spewer_h
    10 #ifdef DEBUG
    12 #include "NamespaceImports.h"
    14 #include "js/RootingAPI.h"
    16 namespace js {
    17 namespace jit {
    19 class MDefinition;
    20 class MInstruction;
    21 class MBasicBlock;
    22 class MIRGraph;
    23 class LinearScanAllocator;
    24 class LInstruction;
    26 class C1Spewer
    27 {
    28     MIRGraph *graph;
    29     HandleScript script;
    30     FILE *spewout_;
    32   public:
    33     C1Spewer()
    34       : graph(nullptr), script(NullPtr()), spewout_(nullptr)
    35     { }
    37     bool init(const char *path);
    38     void beginFunction(MIRGraph *graph, HandleScript script);
    39     void spewPass(const char *pass);
    40     void spewIntervals(const char *pass, LinearScanAllocator *regalloc);
    41     void endFunction();
    42     void finish();
    44   private:
    45     void spewPass(FILE *fp, MBasicBlock *block);
    46     void spewIntervals(FILE *fp, LinearScanAllocator *regalloc, LInstruction *ins, size_t &nextId);
    47     void spewIntervals(FILE *fp, MBasicBlock *block, LinearScanAllocator *regalloc, size_t &nextId);
    48 };
    50 } // namespace jit
    51 } // namespace js
    53 #endif /* DEBUG */
    55 #endif /* jit_C1Spewer_h */

mercurial