Flutter Engine
The Flutter Engine
Classes | Public Types | Public Member Functions | List of all members
dart::RegisterSource< RegisterType > Class Template Reference

#include <deopt_instructions.h>

Public Types

enum  Kind { kStackSlot = 0 , kRegister = 1 }
 

Public Member Functions

 RegisterSource (intptr_t source_index)
 
 RegisterSource (Kind kind, intptr_t index)
 
template<typename T >
T Value (DeoptContext *context) const
 
intptr_t StackSlot (DeoptContext *context) const
 
intptr_t source_index () const
 
const char * ToCString () const
 

Detailed Description

template<typename RegisterType>
class dart::RegisterSource< RegisterType >

Definition at line 397 of file deopt_instructions.h.

Member Enumeration Documentation

◆ Kind

template<typename RegisterType >
enum dart::RegisterSource::Kind
Enumerator
kStackSlot 
kRegister 

Definition at line 399 of file deopt_instructions.h.

399 {
400 // Spilled register source represented as its spill slot.
401 kStackSlot = 0,
402 // Register source represented as its register index.
403 kRegister = 1
404 };

Constructor & Destructor Documentation

◆ RegisterSource() [1/2]

template<typename RegisterType >
dart::RegisterSource< RegisterType >::RegisterSource ( intptr_t  source_index)
inlineexplicit

Definition at line 406 of file deopt_instructions.h.

407 : source_index_(source_index) {}
intptr_t source_index() const

◆ RegisterSource() [2/2]

template<typename RegisterType >
dart::RegisterSource< RegisterType >::RegisterSource ( Kind  kind,
intptr_t  index 
)
inline

Definition at line 409 of file deopt_instructions.h.

410 : source_index_(KindField::encode(kind) |
static void encode(uint8_t output[16], const uint32_t input[4])
Definition: SkMD5.cpp:240

Member Function Documentation

◆ source_index()

template<typename RegisterType >
intptr_t dart::RegisterSource< RegisterType >::source_index ( ) const
inline

Definition at line 429 of file deopt_instructions.h.

429{ return source_index_; }

◆ StackSlot()

template<typename RegisterType >
intptr_t dart::RegisterSource< RegisterType >::StackSlot ( DeoptContext context) const
inline

Definition at line 424 of file deopt_instructions.h.

424 {
425 ASSERT(!is_register());
426 return context->GetStackSlot(raw_index());
427 }
#define ASSERT(E)

◆ ToCString()

template<typename RegisterType >
const char * dart::RegisterSource< RegisterType >::ToCString ( ) const
inline

Definition at line 431 of file deopt_instructions.h.

431 {
432 if (is_register()) {
433 return Name(reg());
434 } else {
435 return Thread::Current()->zone()->PrintToString("s%" Pd "", raw_index());
436 }
437 }
Zone * zone() const
Definition: thread_state.h:37
static Thread * Current()
Definition: thread.h:362
char * PrintToString(const char *format,...) PRINTF_ATTRIBUTE(2
Definition: zone.cc:313
#define Pd
Definition: globals.h:408

◆ Value()

template<typename RegisterType >
template<typename T >
T dart::RegisterSource< RegisterType >::Value ( DeoptContext context) const
inline

Definition at line 414 of file deopt_instructions.h.

414 {
415 if (is_register()) {
416 return static_cast<T>(
418 } else {
419 return *reinterpret_cast<T*>(
420 context->GetSourceFrameAddressAt(raw_index()));
421 }
422 }
SK_API bool Read(SkStreamSeekable *src, SkDocumentPage *dstArray, int dstArrayCount, const SkDeserialProcs *=nullptr)
#define T
Definition: precompiler.cc:65

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