mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1147403 part 6 - Remove GetJitContext from serializing functions. r=h4writer
This commit is contained in:
parent
dda73b218b
commit
9e776b5f01
@ -65,16 +65,28 @@ JSONSpewer::beginListProperty(const char* name)
|
||||
first_ = true;
|
||||
}
|
||||
|
||||
void
|
||||
JSONSpewer::beginStringProperty(const char* name)
|
||||
{
|
||||
property(name);
|
||||
out_.printf("\"");
|
||||
}
|
||||
|
||||
void
|
||||
JSONSpewer::endStringProperty()
|
||||
{
|
||||
out_.printf("\"");
|
||||
}
|
||||
|
||||
void
|
||||
JSONSpewer::stringProperty(const char* name, const char* format, ...)
|
||||
{
|
||||
va_list ap;
|
||||
va_start(ap, format);
|
||||
|
||||
property(name);
|
||||
out_.printf("\"");
|
||||
beginStringProperty(name);
|
||||
out_.vprintf(format, ap);
|
||||
out_.printf("\"");
|
||||
endStringProperty();
|
||||
|
||||
va_end(ap);
|
||||
}
|
||||
@ -221,10 +233,10 @@ JSONSpewer::spewMDef(MDefinition* def)
|
||||
isTruncated = static_cast<MBinaryArithInstruction*>(def)->isTruncated();
|
||||
|
||||
if (def->type() != MIRType_None && def->range()) {
|
||||
Sprinter sp(GetJitContext()->cx);
|
||||
sp.init();
|
||||
def->range()->dump(sp);
|
||||
stringProperty("type", "%s : %s%s", sp.string(), StringFromMIRType(def->type()), (isTruncated ? " (t)" : ""));
|
||||
beginStringProperty("type");
|
||||
def->range()->dump(out_);
|
||||
out_.printf(" : %s%s", StringFromMIRType(def->type()), (isTruncated ? " (t)" : ""));
|
||||
endStringProperty();
|
||||
} else {
|
||||
stringProperty("type", "%s%s", StringFromMIRType(def->type()), (isTruncated ? " (t)" : ""));
|
||||
}
|
||||
|
@ -36,6 +36,8 @@ class JSONSpewer
|
||||
void beginListProperty(const char* name);
|
||||
void stringValue(const char* format, ...);
|
||||
void stringProperty(const char* name, const char* format, ...);
|
||||
void beginStringProperty(const char* name);
|
||||
void endStringProperty();
|
||||
void integerValue(int value);
|
||||
void integerProperty(const char* name, int value);
|
||||
void endObject();
|
||||
|
@ -1083,10 +1083,8 @@ void
|
||||
MAssertRange::printOpcode(GenericPrinter& out) const
|
||||
{
|
||||
MDefinition::printOpcode(out);
|
||||
Sprinter sp(GetJitContext()->cx);
|
||||
sp.init();
|
||||
assertedRange()->dump(sp);
|
||||
out.printf(" %s", sp.string());
|
||||
out.put(" ");
|
||||
assertedRange()->dump(out);
|
||||
}
|
||||
|
||||
const char*
|
||||
|
Loading…
Reference in New Issue
Block a user