зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1316230 - Update LIR type names for debugging output. r=bbouvier
This commit is contained in:
Родитель
f114828dcf
Коммит
f09afd3bf5
|
@ -348,25 +348,28 @@ LAllocation::aliases(const LAllocation& other) const
|
|||
return *this == other;
|
||||
}
|
||||
|
||||
static const char * const TypeChars[] =
|
||||
static const char*
|
||||
typeName(LDefinition::Type type)
|
||||
{
|
||||
"g", // GENERAL
|
||||
"i", // INT32
|
||||
"i64", // INT64
|
||||
"o", // OBJECT
|
||||
"s", // SLOTS
|
||||
"f", // FLOAT32
|
||||
"d", // DOUBLE
|
||||
"simd128int", // SIMD128INT
|
||||
"simd128float", // SIMD128FLOAT
|
||||
"sincos", // SINCOS
|
||||
switch (type) {
|
||||
case LDefinition::GENERAL: return "g";
|
||||
case LDefinition::INT32: return "i";
|
||||
case LDefinition::OBJECT: return "o";
|
||||
case LDefinition::SLOTS: return "s";
|
||||
case LDefinition::FLOAT32: return "f";
|
||||
case LDefinition::DOUBLE: return "d";
|
||||
case LDefinition::SIMD128INT: return "simd128int";
|
||||
case LDefinition::SIMD128FLOAT: return "simd128float";
|
||||
case LDefinition::SINCOS: return "sincos";
|
||||
#ifdef JS_NUNBOX32
|
||||
"t", // TYPE
|
||||
"p" // PAYLOAD
|
||||
#elif JS_PUNBOX64
|
||||
"x" // BOX
|
||||
case LDefinition::TYPE: return "t";
|
||||
case LDefinition::PAYLOAD: return "p";
|
||||
#else
|
||||
case LDefinition::BOX: return "x";
|
||||
#endif
|
||||
};
|
||||
}
|
||||
MOZ_CRASH("Invalid type");
|
||||
}
|
||||
|
||||
UniqueChars
|
||||
LDefinition::toString() const
|
||||
|
@ -377,7 +380,7 @@ LDefinition::toString() const
|
|||
if (isBogusTemp()) {
|
||||
buf = JS_smprintf("bogus");
|
||||
} else {
|
||||
buf = JS_smprintf("v%u<%s>", virtualRegister(), TypeChars[type()]);
|
||||
buf = JS_smprintf("v%u<%s>", virtualRegister(), typeName(type()));
|
||||
if (buf) {
|
||||
if (policy() == LDefinition::FIXED)
|
||||
buf = JS_sprintf_append(buf, ":%s", output()->toString().get());
|
||||
|
@ -609,7 +612,7 @@ LMoveGroup::printOperands(GenericPrinter& out)
|
|||
const LMove& move = getMove(i);
|
||||
out.printf(" [%s -> %s", move.from().toString().get(), move.to().toString().get());
|
||||
#ifdef DEBUG
|
||||
out.printf(", %s", TypeChars[move.type()]);
|
||||
out.printf(", %s", typeName(move.type()));
|
||||
#endif
|
||||
out.printf("]");
|
||||
if (i != numMoves() - 1)
|
||||
|
|
Загрузка…
Ссылка в новой задаче