class ArenaBitVector; class ArtField; class ArtMethod; class CodeGenerator; class DexCompilationUnit; class HBasicBlockBuilder; class Instruction; class InstructionOperands; class OptimizingCompilerStats; class ScopedObjectAccess; class SsaBuilder;
namespace mirror { classClass; class MethodType;
} // namespace mirror
ScopedArenaVector<HInstruction*>* GetLocalsFor(HBasicBlock* block); // Out of line version of GetLocalsFor(), which has a fast path that is // beneficial to get inlined by callers.
ScopedArenaVector<HInstruction*>* GetLocalsForWithAllocation(
HBasicBlock* block, ScopedArenaVector<HInstruction*>* locals, const size_t vregs);
HInstruction* ValueOfLocalAt(HBasicBlock* block, size_t local);
// Builds an instance field access node and returns whether the instruction is supported. bool BuildInstanceFieldAccess(const Instruction& instruction,
uint32_t dex_pc, bool is_put);
// Builds an invocation node and returns whether the instruction is supported. bool BuildInvoke(const Instruction& instruction,
uint32_t dex_pc,
uint32_t method_idx, const InstructionOperands& operands);
// Builds an invocation node for invoke-polymorphic and returns whether the // instruction is supported. bool BuildInvokePolymorphic(uint32_t dex_pc,
uint32_t method_idx,
dex::ProtoIndex proto_idx, const InstructionOperands& operands);
// Builds an invocation node for invoke-custom and returns whether the // instruction is supported. bool BuildInvokeCustom(uint32_t dex_pc,
uint32_t call_site_idx, const InstructionOperands& operands);
// Builds a new array node.
HNewArray* BuildNewArray(uint32_t dex_pc, dex::TypeIndex type_index, HInstruction* length);
// Builds a new array node and the instructions that fill it. bool BuildFilledNewArray(uint32_t dex_pc,
dex::TypeIndex type_index, const InstructionOperands& operands);
// Fills the given object with data as specified in the fill-array-data // instruction. Currently only used for non-reference and non-floating point // arrays. template <typename T> void BuildFillArrayData(HInstruction* object, const T* data,
uint32_t element_count,
DataType::Type anticipated_type,
uint32_t dex_pc);
// Fills the given object with data as specified in the fill-array-data // instruction. The data must be for long and double arrays. void BuildFillWideArrayData(HInstruction* object, const int64_t* data,
uint32_t element_count,
uint32_t dex_pc);
// Builds a `HInstanceOf`, or a `HCheckCast` instruction. void BuildTypeCheck(bool is_instance_of,
HInstruction* object,
dex::TypeIndex type_index,
uint32_t dex_pc); void BuildTypeCheck(const Instruction& instruction,
uint8_t destination,
uint8_t reference,
dex::TypeIndex type_index,
uint32_t dex_pc);
// Builds an instruction sequence for a switch statement. void BuildSwitch(const Instruction& instruction, uint32_t dex_pc);
// Builds a `HLoadString` loading the given `string_index`. void BuildLoadString(dex::StringIndex string_index, uint32_t dex_pc);
// Builds a `HLoadClass` loading the given `type_index`.
HLoadClass* BuildLoadClass(dex::TypeIndex type_index, uint32_t dex_pc);
enumclass ReceiverArg {
kNone, // No receiver, static method.
kNullCheckedArg, // Normal instance invoke, null check and pass the argument.
kNullCheckedOnly, // Null check but do not use the arg, used for intrinsic replacements.
kPlainArg, // Do not null check but pass the argument, used for unresolved methods.
kIgnored, // No receiver despite allocated vreg, used for String.<init>.
}; bool SetupInvokeArguments(HInstruction* invoke, const InstructionOperands& operands, constchar* shorty,
ReceiverArg receiver_arg);
// Try to build a replacement for an intrinsic invoke. Returns true on success, // false on failure. Failure can be either lack of replacement HIR classes, or // input register mismatch. bool BuildSimpleIntrinsic(ArtMethod* method,
uint32_t dex_pc, const InstructionOperands& operands, constchar* shorty);
// Build a HNewInstance instruction.
HNewInstance* BuildNewInstance(dex::TypeIndex type_index, uint32_t dex_pc);
// Build a HConstructorFence for HNewInstance and HNewArray instructions. This ensures the // happens-before ordering for default-initialization of the object referred to by new_instance. void BuildConstructorFenceForAllocation(HInstruction* allocation);
// Return whether the compiler can assume `cls` is initialized. bool IsInitialized(ObjPtr<mirror::Class> cls) const
REQUIRES_SHARED(Locks::mutator_lock_);
// Try to resolve a field using the class linker. Return null if it could not // be found.
ArtField* ResolveField(uint16_t field_idx, bool is_static, bool is_put);
// The dex file where the method being compiled is, and the bytecode data. const DexFile* const dex_file_; const CodeItemDebugInfoAccessor code_item_accessor_; // null for intrinsic graph.
// The return type of the method being compiled. const DataType::Type return_type_;
// The compilation unit of the current method being compiled. Note that // it can be an inlined method. const DexCompilationUnit* const dex_compilation_unit_;
// The compilation unit of the outermost method being compiled. That is the // method being compiled (and not inlined), and potentially inlining other // methods. const DexCompilationUnit* const outer_compilation_unit_;
ScopedArenaAllocator* const local_allocator_;
ScopedArenaVector<ScopedArenaVector<HInstruction*>> locals_for_;
HBasicBlock* current_block_;
ScopedArenaVector<HInstruction*>* current_locals_;
HInstruction* latest_result_; // Current "this" parameter. // Valid only after InitializeParameters() finishes. // * Null for static methods. // * Non-null for instance methods.
HParameterValue* current_this_parameter_;
ScopedArenaVector<HBasicBlock*> loop_headers_;
// Cached resolved types for the current compilation unit's DexFile. // Handle<>s reference entries in the `graph_->GetHandleCache()`.
ScopedArenaSafeMap<dex::TypeIndex, Handle<mirror::Class>> class_cache_;
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.