std::string ToString() const { switch (source_) { case RegisterSource::kString: { constchar* str = reference_.dex_file->GetStringData(dex::StringIndex(reference_.index)); if (type_ == VeriClass::class_) { // Class names at the Java level are of the form x.y.z, but the list encodes // them of the form Lx/y/z;. Inner classes have '$' for both Java level class // names in strings, and hidden API lists. return HiddenApi::ToInternalName(str);
} else { return str;
}
} case RegisterSource::kClass: return reference_.dex_file->GetTypeDescriptor(dex::TypeIndex(reference_.index)); case RegisterSource::kParameter: return std::string("Parameter of ") + reference_.dex_file->PrettyMethod(reference_.index); default: return"<unknown>";
}
}
private: // Find all branches in the code. void FindBranches();
// Analyze all non-deead instructions in the code. void AnalyzeCode();
// Set the instruction at the given pc as a branch target. void SetAsBranchTarget(uint32_t dex_pc);
// Whether the instruction at the given pc is a branch target. bool IsBranchTarget(uint32_t dex_pc);
// Merge the register values at the given pc with `current_registers`. // Return whether the register values have changed, and the instruction needs // to be visited again. bool MergeRegisterValues(uint32_t dex_pc);
bool IsConcrete() const { // We capture RegisterSource::kString for the class, for example in Class.forName. return (cls.IsClass() || cls.IsString()) && name.IsString();
}
};
// Collects all reflection uses. class FlowAnalysisCollector : public VeriFlowAnalysis { public:
FlowAnalysisCollector(VeridexResolver* resolver, const ClassAccessor::Method& method)
: VeriFlowAnalysis(resolver, method) {}
private: // List of reflection uses found, concrete and abstract.
std::vector<ReflectAccessInfo> uses_; // The abstract uses we are trying to subsititute. const std::map<MethodReference, std::vector<ReflectAccessInfo>>& accesses_;
};
} // namespace art
#endif// ART_TOOLS_VERIDEX_FLOW_ANALYSIS_H_
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.11 Sekunden
(vorverarbeitet am 2026-06-29)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.