Source code
Revision control
Copy as Markdown
Other Tools
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
* vim: set ts=8 sts=2 et sw=2 tw=80:
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
#ifdef JS_CACHEIR_SPEW
# include "jit/CacheIRSpewer.h"
# include "mozilla/Sprintf.h"
# include <algorithm>
# include <stdarg.h>
# include "jsapi.h"
# include "jsmath.h"
# include "js/ColumnNumber.h" // JS::LimitedColumnNumberOneOrigin
# include "js/ScalarType.h" // js::Scalar::Type
# include "util/GetPidProvider.h"
# include "util/Text.h"
# include "vm/JSFunction.h"
# include "vm/JSObject.h"
# include "vm/JSScript.h"
# include "vm/JSObject-inl.h"
# include "vm/Realm-inl.h"
using namespace js;
using namespace js::jit;
// Text spewer for CacheIR ops that can be used with JitSpew.
// Output looks like this:
//
// GuardToInt32 inputId 0, resultId 2
// GuardToInt32 inputId 1, resultId 3
// CompareInt32Result op JSOp::Lt, lhsId 2, rhsId 3
// ReturnFromIC
class MOZ_RAII CacheIROpsJitSpewer {
GenericPrinter& out_;
// String prepended to each line. Can be used for indentation.
const char* prefix_;