Example #1
0
void CallLinkStatus::dump(PrintStream& out) const
{
    if (!isSet()) {
        out.print("Not Set");
        return;
    }
    
    CommaPrinter comma;
    
    if (m_isProved)
        out.print(comma, "Statically Proved");
    
    if (m_couldTakeSlowPath)
        out.print(comma, "Could Take Slow Path");
    
    if (m_callTarget)
        out.print(comma, "Known target: ", m_callTarget);
    
    if (m_executable)
        out.print(comma, "Executable/CallHash: ", RawPointer(m_executable), "/", m_executable->hashFor(CodeForCall));
    
    if (m_structure)
        out.print(comma, "Structure: ", RawPointer(m_structure));
}
Example #2
0
void FloatSize::dump(PrintStream& out) const
{
    out.printf("(%f x %f)", width(), height());
}
Example #3
0
void dumpSpeculation(PrintStream& out, SpeculatedType value)
{
    if (value == SpecNone) {
        out.print("None");
        return;
    }
    
    StringPrintStream myOut;
    
    bool isTop = true;
    
    if ((value & SpecCell) == SpecCell)
        myOut.print("Cell");
    else {
        if ((value & SpecObject) == SpecObject)
            myOut.print("Object");
        else {
            if (value & SpecCellOther)
                myOut.print("Othercell");
            else
                isTop = false;
    
            if (value & SpecObjectOther)
                myOut.print("Otherobj");
            else
                isTop = false;
    
            if (value & SpecFinalObject)
                myOut.print("Final");
            else
                isTop = false;

            if (value & SpecArray)
                myOut.print("Array");
            else
                isTop = false;
    
            if (value & SpecInt8Array)
                myOut.print("Int8array");
            else
                isTop = false;
    
            if (value & SpecInt16Array)
                myOut.print("Int16array");
            else
                isTop = false;
    
            if (value & SpecInt32Array)
                myOut.print("Int32array");
            else
                isTop = false;
    
            if (value & SpecUint8Array)
                myOut.print("Uint8array");
            else
                isTop = false;

            if (value & SpecUint8ClampedArray)
                myOut.print("Uint8clampedarray");
            else
                isTop = false;
    
            if (value & SpecUint16Array)
                myOut.print("Uint16array");
            else
                isTop = false;
    
            if (value & SpecUint32Array)
                myOut.print("Uint32array");
            else
                isTop = false;
    
            if (value & SpecFloat32Array)
                myOut.print("Float32array");
            else
                isTop = false;
    
            if (value & SpecFloat64Array)
                myOut.print("Float64array");
            else
                isTop = false;
    
            if (value & SpecFunction)
                myOut.print("Function");
            else
                isTop = false;
    
            if (value & SpecArguments)
                myOut.print("Arguments");
            else
                isTop = false;
    
            if (value & SpecStringObject)
                myOut.print("Stringobject");
            else
                isTop = false;
        }

        if ((value & SpecString) == SpecString)
            myOut.print("String");
        else {
            if (value & SpecStringIdent)
                myOut.print("Stringident");
            else
                isTop = false;
            
            if (value & SpecStringVar)
                myOut.print("Stringvar");
            else
                isTop = false;
        }
    }
    
    if (value & SpecInt32)
        myOut.print("Int32");
    else
        isTop = false;
    
    if (value & SpecInt52)
        myOut.print("Int52");
        
    if ((value & SpecDouble) == SpecDouble)
        myOut.print("Double");
    else {
        if (value & SpecInt52AsDouble)
            myOut.print("Int52asdouble");
        else
            isTop = false;
        
        if (value & SpecNonIntAsDouble)
            myOut.print("Nonintasdouble");
        else
            isTop = false;
        
        if (value & SpecDoubleNaN)
            myOut.print("Doublenan");
        else
            isTop = false;
    }
    
    if (value & SpecBoolean)
        myOut.print("Bool");
    else
        isTop = false;
    
    if (value & SpecOther)
        myOut.print("Other");
    else
        isTop = false;
    
    if (isTop)
        out.print("Top");
    else
        out.print(myOut.toCString());
    
    if (value & SpecEmpty)
        out.print("Empty");
}
Example #4
0
void JSValue::dumpForBacktrace(PrintStream& out) const
{
    if (!*this)
        out.print("<JSValue()>");
    else if (isInt32())
        out.printf("%d", asInt32());
    else if (isDouble())
        out.printf("%lf", asDouble());
    else if (isCell()) {
        if (asCell()->inherits(JSString::info())) {
            JSString* string = jsCast<JSString*>(asCell());
            const StringImpl* impl = string->tryGetValueImpl();
            if (impl)
                out.print("\"", impl, "\"");
            else
                out.print("(unresolved string)");
        } else if (asCell()->inherits(Structure::info())) {
            out.print("Structure[ ", asCell()->structure()->classInfo()->className);
#if USE(JSVALUE64)
            out.print(" ID: ", asCell()->structureID());
#endif
            out.print("]: ", RawPointer(asCell()));
        } else {
            out.print("Cell[", asCell()->structure()->classInfo()->className);
#if USE(JSVALUE64)
            out.print(" ID: ", asCell()->structureID());
#endif
            out.print("]: ", RawPointer(asCell()));
        }
    } else if (isTrue())
        out.print("True");
    else if (isFalse())
        out.print("False");
    else if (isNull())
        out.print("Null");
    else if (isUndefined())
        out.print("Undefined");
    else
        out.print("INVALID");
}
Example #5
0
void Disassembler::dumpHeader(PrintStream& out, LinkBuffer& linkBuffer)
{
    out.print("Generated DFG JIT code for ", CodeBlockWithJITType(m_graph.m_codeBlock, JITCode::DFGJIT), ", instruction count = ", m_graph.m_codeBlock->instructionCount(), ":\n");
    out.print("    Optimized with execution counter = ", m_graph.m_profiledBlock->jitExecuteCounter(), "\n");
    out.print("    Code at [", RawPointer(linkBuffer.debugAddress()), ", ", RawPointer(static_cast<char*>(linkBuffer.debugAddress()) + linkBuffer.size()), "):\n");
}
Example #6
0
void Bytecodes::dump(PrintStream& out) const
{
    out.print("#", m_hash, "(", m_id, ")");
}
Example #7
0
void CheckSpecial::deepDumpImpl(PrintStream& out) const
{
    out.print("B3::CheckValue lowered to ", m_checkKind, " with ", m_numCheckArgs, " args.");
}
Example #8
0
void OSREntryData::dumpInContext(PrintStream& out, DumpContext* context) const
{
    out.print("bc#", m_bytecodeIndex, ", machine code offset = ", m_machineCodeOffset);
    out.print(", stack rules = [");
    
    auto printOperand = [&] (VirtualRegister reg) {
        out.print(inContext(m_expectedValues.operand(reg), context), " (");
        VirtualRegister toReg;
        bool overwritten = false;
        for (OSREntryReshuffling reshuffling : m_reshufflings) {
            if (reg == VirtualRegister(reshuffling.fromOffset)) {
                toReg = VirtualRegister(reshuffling.toOffset);
                break;
            }
            if (reg == VirtualRegister(reshuffling.toOffset))
                overwritten = true;
        }
        if (!overwritten && !toReg.isValid())
            toReg = reg;
        if (toReg.isValid()) {
            if (toReg.isLocal() && !m_machineStackUsed.get(toReg.toLocal()))
                out.print("ignored");
            else
                out.print("maps to ", toReg);
        } else
            out.print("overwritten");
        if (reg.isLocal() && m_localsForcedDouble.get(reg.toLocal()))
            out.print(", forced double");
        if (reg.isLocal() && m_localsForcedAnyInt.get(reg.toLocal()))
            out.print(", forced machine int");
        out.print(")");
    };
    
    CommaPrinter comma;
    for (size_t argumentIndex = m_expectedValues.numberOfArguments(); argumentIndex--;) {
        out.print(comma, "arg", argumentIndex, ":");
        printOperand(virtualRegisterForArgument(argumentIndex));
    }
    for (size_t localIndex = 0; localIndex < m_expectedValues.numberOfLocals(); ++localIndex) {
        out.print(comma, "loc", localIndex, ":");
        printOperand(virtualRegisterForLocal(localIndex));
    }
    
    out.print("], machine stack used = ", m_machineStackUsed);
}
Example #9
0
void printInternal(PrintStream& out, UseKind useKind)
{
    switch (useKind) {
    case UntypedUse:
        out.print("Untyped");
        return;
    case Int32Use:
        out.print("Int32");
        return;
    case KnownInt32Use:
        out.print("KnownInt32");
        return;
    case Int52RepUse:
        out.print("Int52Rep");
        return;
    case AnyIntUse:
        out.print("AnyInt");
        return;
    case NumberUse:
        out.print("Number");
        return;
    case RealNumberUse:
        out.print("RealNumber");
        return;
    case DoubleRepUse:
        out.print("DoubleRep");
        return;
    case DoubleRepRealUse:
        out.print("DoubleRepReal");
        return;
    case DoubleRepAnyIntUse:
        out.print("DoubleRepAnyInt");
        return;
    case BooleanUse:
        out.print("Boolean");
        return;
    case KnownBooleanUse:
        out.print("KnownBoolean");
        return;
    case CellUse:
        out.print("Cell");
        return;
    case KnownCellUse:
        out.print("KnownCell");
        return;
    case CellOrOtherUse:
        out.print("CellOrOther");
        return;
    case ObjectUse:
        out.print("Object");
        return;
    case ArrayUse:
        out.print("Array");
        return;
    case FunctionUse:
        out.print("Function");
        return;
    case FinalObjectUse:
        out.print("FinalObject");
        return;
    case RegExpObjectUse:
        out.print("RegExpObject");
        return;
    case ProxyObjectUse:
        out.print("ProxyObject");
        return;
    case DerivedArrayUse:
        out.print("DerivedArray");
        return;
    case MapObjectUse:
        out.print("MapObjectUse");
        return;
    case SetObjectUse:
        out.print("SetObjectUse");
        return;
    case ObjectOrOtherUse:
        out.print("ObjectOrOther");
        return;
    case StringIdentUse:
        out.print("StringIdent");
        return;
    case StringUse:
        out.print("String");
        return;
    case StringOrOtherUse:
        out.print("StringOrOther");
        return;
    case KnownStringUse:
        out.print("KnownString");
        return;
    case KnownPrimitiveUse:
        out.print("KnownPrimitive");
        return;
    case SymbolUse:
        out.print("Symbol");
        return;
    case StringObjectUse:
        out.print("StringObject");
        return;
    case StringOrStringObjectUse:
        out.print("StringOrStringObject");
        return;
    case NotStringVarUse:
        out.print("NotStringVar");
        return;
    case NotCellUse:
        out.print("NotCell");
        return;
    case OtherUse:
        out.print("Other");
        return;
    case MiscUse:
        out.print("Misc");
        return;
    case LastUseKind:
        RELEASE_ASSERT_NOT_REACHED();
        return;
    }
    RELEASE_ASSERT_NOT_REACHED();
}
Example #10
0
void ArgumentRegValue::dumpMeta(CommaPrinter& comma, PrintStream& out) const
{
    out.print(comma, m_reg);
}
void ShadowChicken::Frame::dump(PrintStream& out) const
{
    out.print(
        "{callee = ", RawPointer(callee), ", frame = ", RawPointer(frame), ", isTailDeleted = ",
        isTailDeleted, "}");
}
Example #12
0
void printInternal(PrintStream& out, JSC::JITCode::JITType type)
{
    out.print(JSC::JITCode::typeName(type));
}
Example #13
0
void FloatRect::dump(PrintStream& out) const
{
    out.print(location(), " ", size());
}
void AvailabilityMap::dump(PrintStream& out) const
{
    out.print("{locals = ", m_locals, "; heap = ", mapDump(m_heap), "}");
}
Example #15
0
void ControlValue::dumpMeta(CommaPrinter& comma, PrintStream& out) const
{
    for (FrequentedBlock successor : m_successors)
        out.print(comma, successor);
}
Example #16
0
void StackmapValue::dumpChildren(CommaPrinter& comma, PrintStream& out) const
{
    for (ConstrainedValue value : constrainedChildren())
        out.print(comma, value);
}
Example #17
0
void StackmapValue::dumpMeta(CommaPrinter& comma, PrintStream& out) const
{
    out.print(
        comma, "generator = ", RawPointer(m_generator.get()), ", earlyClobbered = ", m_earlyClobbered,
        ", lateClobbered = ", m_lateClobbered, ", usedRegisters = ", m_usedRegisters);
}
void AllocatorAttributes::dump(PrintStream& out) const
{
    out.print("{", destruction, ", ", cellKind, "}");
}
Example #19
0
void CheckSpecial::dumpImpl(PrintStream& out) const
{
    out.print(m_checkKind, "(", m_numCheckArgs, ",", m_stackmapRole, ")");
}
Example #20
0
void printInternal(PrintStream& out, MacroAssembler::DoubleCondition cond)
{
    switch (cond) {
    case MacroAssembler::DoubleEqual:
        out.print("DoubleEqual");
        return;
    case MacroAssembler::DoubleNotEqual:
        out.print("DoubleNotEqual");
        return;
    case MacroAssembler::DoubleGreaterThan:
        out.print("DoubleGreaterThan");
        return;
    case MacroAssembler::DoubleGreaterThanOrEqual:
        out.print("DoubleGreaterThanOrEqual");
        return;
    case MacroAssembler::DoubleLessThan:
        out.print("DoubleLessThan");
        return;
    case MacroAssembler::DoubleLessThanOrEqual:
        out.print("DoubleLessThanOrEqual");
        return;
    case MacroAssembler::DoubleEqualOrUnordered:
        out.print("DoubleEqualOrUnordered");
        return;
    case MacroAssembler::DoubleNotEqualOrUnordered:
        out.print("DoubleNotEqualOrUnordered");
        return;
    case MacroAssembler::DoubleGreaterThanOrUnordered:
        out.print("DoubleGreaterThanOrUnordered");
        return;
    case MacroAssembler::DoubleGreaterThanOrEqualOrUnordered:
        out.print("DoubleGreaterThanOrEqualOrUnordered");
        return;
    case MacroAssembler::DoubleLessThanOrUnordered:
        out.print("DoubleLessThanOrUnordered");
        return;
    case MacroAssembler::DoubleLessThanOrEqualOrUnordered:
        out.print("DoubleLessThanOrEqualOrUnordered");
        return;
    }

    RELEASE_ASSERT_NOT_REACHED();
}
Example #21
0
void CheckSpecial::Key::dump(PrintStream& out) const
{
    out.print(m_kind, "(", m_numArgs, ",", m_stackmapRole, ")");
}
Example #22
0
void StackMaps::Record::dump(PrintStream& out) const
{
    out.print(
        "(#", patchpointID, ", offset = ", instructionOffset, ", flags = ", flags,
        ", [", listDump(locations), "])");
}
Example #23
0
void Disassembler::dump(PrintStream& out, LinkBuffer& linkBuffer)
{
    Vector<DumpedOp> ops = createDumpList(linkBuffer);
    for (unsigned i = 0; i < ops.size(); ++i)
        out.print(ops[i].text);
}
Example #24
0
void StackMaps::dump(PrintStream& out) const
{
    out.print("Version:", version, ", StackSizes[", listDump(stackSizes), "], Constants:[", listDump(constants), "], Records:[", listDump(records), "]");
}
Example #25
0
void JSValue::dumpInContextAssumingStructure(
    PrintStream& out, DumpContext* context, Structure* structure) const
{
    if (!*this)
        out.print("<JSValue()>");
    else if (isInt32())
        out.printf("Int32: %d", asInt32());
    else if (isDouble()) {
#if USE(JSVALUE64)
        out.printf("Double: %lld, %lf", (long long)reinterpretDoubleToInt64(asDouble()), asDouble());
#else
        union {
            double asDouble;
            uint32_t asTwoInt32s[2];
        } u;
        u.asDouble = asDouble();
        out.printf("Double: %08x:%08x, %lf", u.asTwoInt32s[1], u.asTwoInt32s[0], asDouble());
#endif
    } else if (isCell()) {
        if (structure->classInfo()->isSubClassOf(JSString::info())) {
            JSString* string = jsCast<JSString*>(asCell());
            out.print("String");
            if (string->isRope())
                out.print(" (rope)");
            const StringImpl* impl = string->tryGetValueImpl();
            if (impl) {
                if (impl->isAtomic())
                    out.print(" (atomic)");
                if (impl->isAtomic())
                    out.print(" (identifier)");
                if (impl->isSymbol())
                    out.print(" (symbol)");
            } else
                out.print(" (unresolved)");
            out.print(": ", impl);
        } else if (structure->classInfo()->isSubClassOf(Symbol::info()))
            out.print("Symbol: ", RawPointer(asCell()));
        else if (structure->classInfo()->isSubClassOf(Structure::info()))
            out.print("Structure: ", inContext(*jsCast<Structure*>(asCell()), context));
        else if (structure->classInfo()->isSubClassOf(JSObject::info())) {
            out.print("Object: ", RawPointer(asCell()));
            out.print(" with butterfly ", RawPointer(asObject(asCell())->butterfly()));
            out.print(" (", inContext(*structure, context), ")");
        } else {
            out.print("Cell: ", RawPointer(asCell()));
            out.print(" (", inContext(*structure, context), ")");
        }
#if USE(JSVALUE64)
        out.print(", ID: ", asCell()->structureID());
#endif
    } else if (isTrue())
        out.print("True");
    else if (isFalse())
        out.print("False");
    else if (isNull())
        out.print("Null");
    else if (isUndefined())
        out.print("Undefined");
    else
        out.print("INVALID");
}
Example #26
0
void StackMaps::Constant::dump(PrintStream& out) const
{
    out.printf("0x%016llx", integer);
}
Example #27
0
void dumpSpeculationAbbreviated(PrintStream& out, SpeculatedType value)
{
    out.print(speculationToAbbreviatedString(value));
}
Example #28
0
void StackMaps::StackSize::dump(PrintStream& out) const
{
    out.print("(off:", functionOffset, ", size:", size, ")");
}
Example #29
0
void ConstFloatValue::dumpMeta(CommaPrinter& comma, PrintStream& out) const
{
    out.print(comma);
    out.printf("%le", m_value);
}
Example #30
0
void StackMaps::Location::dump(PrintStream& out) const
{
    out.print("(", kind, ", reg", dwarfRegNum, ", off:", offset, ", size:", size, ")");
}