Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Member Functions | List of all members
dart::NativeEntryInstr Class Reference

#include <il.h>

Inheritance diagram for dart::NativeEntryInstr:
dart::FunctionEntryInstr dart::BlockEntryWithInitialDefs dart::BlockEntryInstr dart::TemplateInstruction< 0, NoThrow >

Public Member Functions

 NativeEntryInstr (const compiler::ffi::CallbackMarshaller &marshaller, GraphEntryInstr *graph_entry, intptr_t block_id, intptr_t try_index, intptr_t deopt_id)
 
DECLARE_INSTRUCTION_SERIALIZABLE_FIELDS(NativeEntryInstr, FunctionEntryInstr, FIELD_LIST) private void SaveArgument (FlowGraphCompiler *compiler, const compiler::ffi::NativeLocation &loc) const
 
- Public Member Functions inherited from dart::FunctionEntryInstr
 FunctionEntryInstr (GraphEntryInstr *graph_entry, intptr_t block_id, intptr_t try_index, intptr_t deopt_id)
 
virtual intptr_t PredecessorCount () const
 
virtual BlockEntryInstrPredecessorAt (intptr_t index) const
 
GraphEntryInstrgraph_entry () const
 
- Public Member Functions inherited from dart::BlockEntryWithInitialDefs
 BlockEntryWithInitialDefs (intptr_t block_id, intptr_t try_index, intptr_t deopt_id, intptr_t stack_depth)
 
GrowableArray< Definition * > * initial_definitions ()
 
const GrowableArray< Definition * > * initial_definitions () const
 
virtual BlockEntryWithInitialDefsAsBlockEntryWithInitialDefs ()
 
virtual const BlockEntryWithInitialDefsAsBlockEntryWithInitialDefs () const
 
- Public Member Functions inherited from dart::BlockEntryInstr
intptr_t preorder_number () const
 
void set_preorder_number (intptr_t number)
 
intptr_t postorder_number () const
 
void set_postorder_number (intptr_t number)
 
intptr_t block_id () const
 
void set_start_pos (intptr_t pos)
 
intptr_t start_pos () const
 
void set_end_pos (intptr_t pos)
 
intptr_t end_pos () const
 
BlockEntryInstrdominator () const
 
BlockEntryInstrImmediateDominator () const
 
const GrowableArray< BlockEntryInstr * > & dominated_blocks ()
 
void AddDominatedBlock (BlockEntryInstr *block)
 
void ClearDominatedBlocks ()
 
bool Dominates (BlockEntryInstr *other) const
 
Instructionlast_instruction () const
 
void set_last_instruction (Instruction *instr)
 
ParallelMoveInstrparallel_move () const
 
bool HasParallelMove () const
 
bool HasNonRedundantParallelMove () const
 
ParallelMoveInstrGetParallelMove ()
 
bool DiscoverBlock (BlockEntryInstr *predecessor, GrowableArray< BlockEntryInstr * > *preorder, GrowableArray< intptr_t > *parent)
 
virtual bool CanBecomeDeoptimizationTarget () const
 
virtual bool ComputeCanDeoptimize () const
 
virtual bool HasUnknownSideEffects () const
 
intptr_t try_index () const
 
void set_try_index (intptr_t index)
 
bool InsideTryBlock () const
 
LoopInfoloop_info () const
 
void set_loop_info (LoopInfo *loop_info)
 
bool IsLoopHeader () const
 
intptr_t NestingDepth () const
 
virtual BlockEntryInstrGetBlock ()
 
virtual TokenPosition token_pos () const
 
void ReplaceAsPredecessorWith (BlockEntryInstr *new_block)
 
void set_block_id (intptr_t block_id)
 
intptr_t stack_depth () const
 
void set_stack_depth (intptr_t s)
 
void ClearAllInstructions ()
 
InstructionsIterable instructions ()
 
- Public Member Functions inherited from dart::TemplateInstruction< 0, NoThrow >
 TemplateInstruction (intptr_t deopt_id=DeoptId::kNone)
 
 TemplateInstruction (const InstructionSource &source, intptr_t deopt_id=DeoptId::kNone)
 
virtual intptr_t InputCount () const
 
virtual ValueInputAt (intptr_t i) const
 
virtual bool MayThrow () const
 

Additional Inherited Members

- Public Types inherited from dart::TemplateInstruction< 0, NoThrow >
using BaseClass = typename NoCSE< Instruction, PureInstruction >::Base
 
- Protected Member Functions inherited from dart::BlockEntryWithInitialDefs
void PrintInitialDefinitionsTo (BaseTextBuffer *f) const
 
- Protected Member Functions inherited from dart::BlockEntryInstr
 BlockEntryInstr (intptr_t block_id, intptr_t try_index, intptr_t deopt_id, intptr_t stack_depth)
 
bool FindOsrEntryAndRelink (GraphEntryInstr *graph_entry, Instruction *parent, BitVector *block_marks)
 
- Protected Attributes inherited from dart::TemplateInstruction< 0, NoThrow >
EmbeddedArray< Value *, Ninputs_
 

Detailed Description

Definition at line 2218 of file il.h.

Constructor & Destructor Documentation

◆ NativeEntryInstr()

dart::NativeEntryInstr::NativeEntryInstr ( const compiler::ffi::CallbackMarshaller marshaller,
GraphEntryInstr graph_entry,
intptr_t  block_id,
intptr_t  try_index,
intptr_t  deopt_id 
)
inline

Definition at line 2220 of file il.h.

2226 marshaller_(marshaller) {}
intptr_t try_index() const
Definition il.h:1724
intptr_t block_id() const
Definition il.h:1655
GraphEntryInstr * graph_entry() const
Definition il.h:2197
FunctionEntryInstr(GraphEntryInstr *graph_entry, intptr_t block_id, intptr_t try_index, intptr_t deopt_id)
Definition il.h:2177

Member Function Documentation

◆ SaveArgument()

void dart::NativeEntryInstr::SaveArgument ( FlowGraphCompiler compiler,
const compiler::ffi::NativeLocation loc 
) const

Definition at line 4423 of file il.cc.

4425 {
4426 if (nloc.IsStack()) return;
4427
4428 if (nloc.IsRegisters()) {
4429 const auto& reg_loc = nloc.WidenTo4Bytes(compiler->zone()).AsRegisters();
4430 const intptr_t num_regs = reg_loc.num_regs();
4431 // Save higher-order component first, so bytes are in little-endian layout
4432 // overall.
4433 for (intptr_t i = num_regs - 1; i >= 0; i--) {
4434 __ PushRegister(reg_loc.reg_at(i));
4435 }
4436 } else if (nloc.IsFpuRegisters()) {
4437 // TODO(dartbug.com/40469): Reduce code size.
4438 __ AddImmediate(SPREG, -8);
4439 NoTemporaryAllocator temp_alloc;
4440 const auto& dst = compiler::ffi::NativeStackLocation(
4441 nloc.payload_type(), nloc.payload_type(), SPREG, 0);
4442 compiler->EmitNativeMove(dst, nloc, &temp_alloc);
4443 } else if (nloc.IsPointerToMemory()) {
4444 const auto& pointer_loc = nloc.AsPointerToMemory().pointer_location();
4445 if (pointer_loc.IsRegisters()) {
4446 const auto& regs_loc = pointer_loc.AsRegisters();
4447 ASSERT(regs_loc.num_regs() == 1);
4448 __ PushRegister(regs_loc.reg_at(0));
4449 } else {
4450 ASSERT(pointer_loc.IsStack());
4451 // It's already on the stack, so we don't have to save it.
4452 }
4453 } else if (nloc.IsMultiple()) {
4454 const auto& multiple = nloc.AsMultiple();
4455 const intptr_t num = multiple.locations().length();
4456 // Save the argument registers, in reverse order.
4457 for (intptr_t i = num; i-- > 0;) {
4458 SaveArgument(compiler, *multiple.locations().At(i));
4459 }
4460 } else {
4461 ASSERT(nloc.IsBoth());
4462 const auto& both = nloc.AsBoth();
4463 SaveArgument(compiler, both.location(0));
4464 }
4465}
#define __
DECLARE_INSTRUCTION_SERIALIZABLE_FIELDS(NativeEntryInstr, FunctionEntryInstr, FIELD_LIST) private void SaveArgument(FlowGraphCompiler *compiler, const compiler::ffi::NativeLocation &loc) const
Definition il.cc:4423
#define ASSERT(E)
const Register SPREG
dst
Definition cp.py:12

The documentation for this class was generated from the following files: