Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Friends | List of all members
dart::DeoptInstr Class Referenceabstract

#include <deopt_instructions.h>

Inheritance diagram for dart::DeoptInstr:
dart::ZoneAllocated dart::DeoptCallerFpInstr dart::DeoptCallerPcInstr dart::DeoptCallerPpInstr dart::DeoptConstantInstr dart::DeoptFpuInstr< K, slot_kind, Type, PtrType > dart::DeoptIntegerInstrBase dart::DeoptMaterializeObjectInstr dart::DeoptMaterializedObjectRefInstr dart::DeoptPcMarkerInstr dart::DeoptPpInstr dart::DeoptRetAddressInstr dart::DeoptWordInstr

Public Types

enum  Kind {
  kRetAddress , kConstant , kWord , kFloat ,
  kDouble , kFloat32x4 , kFloat64x2 , kInt32x4 ,
  kMintPair , kMint , kInt32 , kUint32 ,
  kPcMarker , kPp , kCallerFp , kCallerPp ,
  kCallerPc , kMaterializedObjectRef , kMaterializeObject
}
 

Public Member Functions

 DeoptInstr ()
 
virtual ~DeoptInstr ()
 
virtual const char * ToCString () const
 
virtual void Execute (DeoptContext *deopt_context, intptr_t *dest_addr)=0
 
virtual CatchEntryMove ToCatchEntryMove (DeoptContext *deopt_context, intptr_t dest_slot)
 
virtual DeoptInstr::Kind kind () const =0
 
bool Equals (const DeoptInstr &other) const
 
- Public Member Functions inherited from dart::ZoneAllocated
 ZoneAllocated ()
 
void * operator new (size_t size)
 
void * operator new (size_t size, Zone *zone)
 
void operator delete (void *pointer)
 

Static Public Member Functions

static DeoptInstrCreate (intptr_t kind_as_int, intptr_t source_index)
 
static uword GetRetAddress (DeoptInstr *instr, const ObjectPool &object_pool, Code *code)
 
static intptr_t GetFieldCount (DeoptInstr *instr)
 

Protected Member Functions

virtual intptr_t source_index () const =0
 
virtual const char * ArgumentsToCString () const
 

Friends

class DeoptInfoBuilder
 

Detailed Description

Definition at line 277 of file deopt_instructions.h.

Member Enumeration Documentation

◆ Kind

Enumerator
kRetAddress 
kConstant 
kWord 
kFloat 
kDouble 
kFloat32x4 
kFloat64x2 
kInt32x4 
kMintPair 
kMint 
kInt32 
kUint32 
kPcMarker 
kPp 
kCallerFp 
kCallerPp 
kCallerPc 
kMaterializedObjectRef 
kMaterializeObject 

Definition at line 279 of file deopt_instructions.h.

279 {
281 kConstant,
282 kWord,
283 kFloat,
284 kDouble,
287 kInt32x4,
288 // Mints are split into low and high words on 32-bit architectures. Each
289 // word can be in a register or stack slot. Note Mint pairs are only
290 // used on 32-bit architectures.
291 kMintPair,
292 // Mints are held in one word on 64-bit architectures.
293 kMint,
294 kInt32,
295 kUint32,
296 kPcMarker,
297 kPp,
298 kCallerFp,
299 kCallerPp,
300 kCallerPc,
303 };

Constructor & Destructor Documentation

◆ DeoptInstr()

dart::DeoptInstr::DeoptInstr ( )
inline

Definition at line 307 of file deopt_instructions.h.

307{}

◆ ~DeoptInstr()

virtual dart::DeoptInstr::~DeoptInstr ( )
inlinevirtual

Definition at line 308 of file deopt_instructions.h.

308{}

Member Function Documentation

◆ ArgumentsToCString()

virtual const char * dart::DeoptInstr::ArgumentsToCString ( ) const
inlineprotectedvirtual

◆ Create()

DeoptInstr * dart::DeoptInstr::Create ( intptr_t  kind_as_int,
intptr_t  source_index 
)
static

Definition at line 903 of file deopt_instructions.cc.

903 {
904 Kind kind = static_cast<Kind>(kind_as_int);
905 switch (kind) {
906 case kWord:
907 return new DeoptWordInstr(source_index);
908 case kFloat:
909 return new DeoptFloatInstr(source_index);
910 case kDouble:
911 return new DeoptDoubleInstr(source_index);
912 case kMint:
913 return new DeoptMintInstr(source_index);
914 case kMintPair:
915 return new DeoptMintPairInstr(source_index);
916 case kInt32:
917 return new DeoptInt32Instr(source_index);
918 case kUint32:
919 return new DeoptUint32Instr(source_index);
920 case kFloat32x4:
922 case kFloat64x2:
924 case kInt32x4:
926 case kRetAddress:
927 return new DeoptRetAddressInstr(source_index);
928 case kConstant:
929 return new DeoptConstantInstr(source_index);
930 case kPcMarker:
931 return new DeoptPcMarkerInstr(source_index);
932 case kPp:
933 return new DeoptPpInstr(source_index);
934 case kCallerFp:
935 return new DeoptCallerFpInstr();
936 case kCallerPp:
937 return new DeoptCallerPpInstr();
938 case kCallerPc:
939 return new DeoptCallerPcInstr();
941 return new DeoptMaterializedObjectRefInstr(source_index);
943 return new DeoptMaterializeObjectInstr(source_index);
944 }
945 UNREACHABLE();
946 return nullptr;
947}
#define UNREACHABLE()
Definition assert.h:248
virtual DeoptInstr::Kind kind() const =0
virtual intptr_t source_index() const =0
DeoptFpuInstr< DeoptInstr::kInt32x4, CatchEntryMove::SourceKind::kInt32x4Slot, simd128_value_t, Int32x4Ptr > DeoptInt32x4Instr
DeoptFpuInstr< DeoptInstr::kFloat64x2, CatchEntryMove::SourceKind::kFloat64x2Slot, simd128_value_t, Float64x2Ptr > DeoptFloat64x2Instr
DeoptIntInstr< DeoptInstr::kUint32, CatchEntryMove::SourceKind::kUint32Slot, uint32_t > DeoptUint32Instr
DeoptIntInstr< DeoptInstr::kInt32, CatchEntryMove::SourceKind::kInt32Slot, int32_t > DeoptInt32Instr
DeoptFpuInstr< DeoptInstr::kFloat32x4, CatchEntryMove::SourceKind::kFloat32x4Slot, simd128_value_t, Float32x4Ptr > DeoptFloat32x4Instr
DeoptFpuInstr< DeoptInstr::kDouble, CatchEntryMove::SourceKind::kDoubleSlot, double, DoublePtr > DeoptDoubleInstr
DeoptIntInstr< DeoptInstr::kMint, CatchEntryMove::SourceKind::kInt64Slot, int64_t > DeoptMintInstr
DeoptFpuInstr< DeoptInstr::kFloat, CatchEntryMove::SourceKind::kFloatSlot, float, DoublePtr > DeoptFloatInstr

◆ Equals()

bool dart::DeoptInstr::Equals ( const DeoptInstr other) const
inline

Definition at line 330 of file deopt_instructions.h.

330 {
331 return (kind() == other.kind()) && (source_index() == other.source_index());
332 }

◆ Execute()

virtual void dart::DeoptInstr::Execute ( DeoptContext deopt_context,
intptr_t *  dest_addr 
)
pure virtual

◆ GetFieldCount()

static intptr_t dart::DeoptInstr::GetFieldCount ( DeoptInstr instr)
inlinestatic

Definition at line 342 of file deopt_instructions.h.

342 {
343 ASSERT(instr->kind() == DeoptInstr::kMaterializeObject);
344 return instr->source_index();
345 }
#define ASSERT(E)

◆ GetRetAddress()

uword dart::DeoptInstr::GetRetAddress ( DeoptInstr instr,
const ObjectPool object_pool,
Code code 
)
static

Definition at line 877 of file deopt_instructions.cc.

879 {
880 ASSERT(instr->kind() == kRetAddress);
881 DeoptRetAddressInstr* ret_address_instr =
882 static_cast<DeoptRetAddressInstr*>(instr);
883 ASSERT(!object_table.IsNull());
884 Thread* thread = Thread::Current();
885 Zone* zone = thread->zone();
886 Function& function = Function::Handle(zone);
887 function ^= object_table.ObjectAt(ret_address_instr->object_table_index());
888 ASSERT(!function.ForceOptimize());
889 ASSERT(code != nullptr);
890 const Error& error =
892 if (!error.IsNull()) {
894 }
895 *code = function.unoptimized_code();
896 ASSERT(!code->IsNull());
897 uword res = code->GetPcForDeoptId(ret_address_instr->deopt_id(),
898 UntaggedPcDescriptors::kDeopt);
899 ASSERT(res != 0);
900 return res;
901}
static ErrorPtr EnsureUnoptimizedCode(Thread *thread, const Function &function)
Definition compiler.cc:855
static DART_NORETURN void PropagateError(const Error &error)
static Object & Handle()
Definition object.h:407
static Thread * Current()
Definition thread.h:361
const uint8_t uint32_t uint32_t GError ** error
Dart_NativeFunction function
Definition fuchsia.cc:51
uintptr_t uword
Definition globals.h:501

◆ kind()

virtual DeoptInstr::Kind dart::DeoptInstr::kind ( ) const
pure virtual

◆ source_index()

virtual intptr_t dart::DeoptInstr::source_index ( ) const
protectedpure virtual

◆ ToCatchEntryMove()

virtual CatchEntryMove dart::DeoptInstr::ToCatchEntryMove ( DeoptContext deopt_context,
intptr_t  dest_slot 
)
inlinevirtual

◆ ToCString()

virtual const char * dart::DeoptInstr::ToCString ( ) const
inlinevirtual

Definition at line 310 of file deopt_instructions.h.

310 {
311 const char* args = ArgumentsToCString();
312 if (args != nullptr) {
314 "%s(%s)", KindToCString(kind()), args);
315 } else {
316 return KindToCString(kind());
317 }
318 }
virtual const char * ArgumentsToCString() const
Zone * zone() const
char * PrintToString(const char *format,...) PRINTF_ATTRIBUTE(2
Definition zone.cc:313
G_BEGIN_DECLS G_MODULE_EXPORT FlValue * args

Friends And Related Symbol Documentation

◆ DeoptInfoBuilder

friend class DeoptInfoBuilder
friend

Definition at line 348 of file deopt_instructions.h.


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