Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Classes | Namespaces | Macros | Functions
locations_helpers.h File Reference
#include "vm/compiler/backend/locations.h"

Go to the source code of this file.

Classes

struct  dart::SameAsFirstInput
 
struct  dart::NoLocation
 
struct  dart::Fixed< R, reg >
 
class  dart::Temp< R >
 
struct  dart::LocationTrait< Register >
 
struct  dart::LocationTrait< FpuRegister >
 
struct  dart::LocationTrait< Fixed< R, reg > >
 
struct  dart::LocationTrait< Temp< RegisterType > >
 
struct  dart::LocationTrait< SameAsFirstInput >
 
struct  dart::LocationTrait< NoLocation >
 
struct  dart::Cons< T, U >
 
struct  dart::SignatureTrait< Nil >
 
struct  dart::SignatureTrait< Cons< T0, Tx > >
 

Namespaces

namespace  dart
 

Macros

#define DEFINE_BACKEND(Name, Args)
 
#define PP_UNPACK(...)   __VA_ARGS__
 
#define PP_APPLY(a, b)   a b
 
#define TYPE_LIST_0()   Nil
 
#define TYPE_LIST_1(T0)   Cons<T0, TYPE_LIST_0()>
 
#define TYPE_LIST_2(T0, T1)   Cons<T0, TYPE_LIST_1(T1)>
 
#define TYPE_LIST_3(T0, T1, T2)   Cons<T0, TYPE_LIST_2(T1, T2)>
 
#define TYPE_LIST_4(T0, T1, T2, T3)   Cons<T0, TYPE_LIST_3(T1, T2, T3)>
 
#define TYPE_LIST_5(T0, T1, T2, T3, T4)   Cons<T0, TYPE_LIST_4(T1, T2, T3, T4)>
 
#define SIGNATURE_TRAIT(Arity, Args)    SignatureTrait<PP_APPLY(TYPE_LIST_##Arity, Args)>
 
#define DEFINE_MAKE_LOCATION_SUMMARY_SPECIALIZATION(Arity, Types)
 

Functions

template<typename Instr , typename Out >
LocationSummarydart::MakeLocationSummaryFromEmitter (Zone *zone, const Instr *instr, void(*Emit)(FlowGraphCompiler *, Instr *, Out))
 
template<typename Instr , typename Out , typename T0 >
 dart::DEFINE_MAKE_LOCATION_SUMMARY_SPECIALIZATION (1,(T0))
 
template<typename Instr , typename Out , typename T0 , typename T1 >
 dart::DEFINE_MAKE_LOCATION_SUMMARY_SPECIALIZATION (2,(T0, T1))
 
template<typename Instr , typename Out , typename T0 , typename T1 , typename T2 >
 dart::DEFINE_MAKE_LOCATION_SUMMARY_SPECIALIZATION (3,(T0, T1, T2))
 
template<typename Instr , typename Out , typename T0 , typename T1 , typename T2 , typename T3 >
 dart::DEFINE_MAKE_LOCATION_SUMMARY_SPECIALIZATION (4,(T0, T1, T2, T3))
 
template<typename Instr , typename Out , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 >
 dart::DEFINE_MAKE_LOCATION_SUMMARY_SPECIALIZATION (5,(T0, T1, T2, T3, T4))
 
template<typename Instr , typename Out >
void dart::InvokeEmitter (FlowGraphCompiler *compiler, Instr *instr, void(*Emit)(FlowGraphCompiler *, Instr *, Out))
 
template<typename Instr , typename Out , typename T0 >
void dart::InvokeEmitter (FlowGraphCompiler *compiler, Instr *instr, void(*Emit)(FlowGraphCompiler *, Instr *, Out, T0))
 
template<typename Instr , typename Out , typename T0 , typename T1 >
void dart::InvokeEmitter (FlowGraphCompiler *compiler, Instr *instr, void(*Emit)(FlowGraphCompiler *, Instr *, Out, T0, T1))
 
template<typename Instr , typename Out , typename T0 , typename T1 , typename T2 >
void dart::InvokeEmitter (FlowGraphCompiler *compiler, Instr *instr, void(*Emit)(FlowGraphCompiler *, Instr *, Out, T0, T1, T2))
 
template<typename Instr , typename Out , typename T0 , typename T1 , typename T2 , typename T3 >
void dart::InvokeEmitter (FlowGraphCompiler *compiler, Instr *instr, void(*Emit)(FlowGraphCompiler *, Instr *, Out, T0, T1, T2, T3))
 
template<typename Instr , typename Out , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 >
void dart::InvokeEmitter (FlowGraphCompiler *compiler, Instr *instr, void(*Emit)(FlowGraphCompiler *, Instr *, Out, T0, T1, T2, T3, T4))
 

Macro Definition Documentation

◆ DEFINE_BACKEND

#define DEFINE_BACKEND (   Name,
  Args 
)
Value:
static void EmitterFor##Name(FlowGraphCompiler* compiler, \
Name##Instr* instr, PP_APPLY(PP_UNPACK, Args)); \
LocationSummary* Name##Instr::MakeLocationSummary(Zone* zone, bool opt) \
const { \
return MakeLocationSummaryFromEmitter(zone, this, &EmitterFor##Name); \
} \
void Name##Instr::EmitNativeCode(FlowGraphCompiler* compiler) { \
InvokeEmitter(compiler, this, &EmitterFor##Name); \
} \
static void EmitterFor##Name(FlowGraphCompiler* compiler, \
Name##Instr* instr, PP_APPLY(PP_UNPACK, Args))
#define PP_UNPACK(...)
#define PP_APPLY(a, b)
ImplicitString Name
Definition DMSrcSink.h:38

Definition at line 57 of file locations_helpers.h.

61 { \
62 return MakeLocationSummaryFromEmitter(zone, this, &EmitterFor##Name); \
63 } \
64 void Name##Instr::EmitNativeCode(FlowGraphCompiler* compiler) { \
65 InvokeEmitter(compiler, this, &EmitterFor##Name); \
66 } \
67 static void EmitterFor##Name(FlowGraphCompiler* compiler, \
68 Name##Instr* instr, PP_APPLY(PP_UNPACK, Args))
LocationSummary * MakeLocationSummaryFromEmitter(Zone *zone, const Instr *instr, void(*Emit)(FlowGraphCompiler *, Instr *, Out))

◆ DEFINE_MAKE_LOCATION_SUMMARY_SPECIALIZATION

#define DEFINE_MAKE_LOCATION_SUMMARY_SPECIALIZATION (   Arity,
  Types 
)
Value:
LocationSummary* MakeLocationSummaryFromEmitter( \
Zone* zone, const Instr* instr, \
void (*Emit)(FlowGraphCompiler*, Instr*, Out, \
PP_APPLY(PP_UNPACK, Types))) { \
typedef SIGNATURE_TRAIT(Arity, Types) S; \
ASSERT(instr->InputCount() == S::kInputCount); \
LocationSummary* summary = new (zone) LocationSummary( \
zone, S::kInputCount, S::kTempCount, LocationSummary::kNoCall); \
S::template SetConstraints<S::kInputCount, 0>(summary); \
summary->set_out(0, LocationTrait<Out>::ToConstraint()); \
return summary; \
}
#define SIGNATURE_TRAIT(Arity, Args)

Definition at line 297 of file locations_helpers.h.

301 { \
302 typedef SIGNATURE_TRAIT(Arity, Types) S; \
303 ASSERT(instr->InputCount() == S::kInputCount); \
304 LocationSummary* summary = new (zone) LocationSummary( \
305 zone, S::kInputCount, S::kTempCount, LocationSummary::kNoCall); \
306 S::template SetConstraints<S::kInputCount, 0>(summary); \
307 summary->set_out(0, LocationTrait<Out>::ToConstraint()); \
308 return summary; \
309 }

◆ PP_APPLY

#define PP_APPLY (   a,
  b 
)    a b

Definition at line 71 of file locations_helpers.h.

◆ PP_UNPACK

#define PP_UNPACK (   ...)    __VA_ARGS__

Definition at line 70 of file locations_helpers.h.

◆ SIGNATURE_TRAIT

#define SIGNATURE_TRAIT (   Arity,
  Args 
)     SignatureTrait<PP_APPLY(TYPE_LIST_##Arity, Args)>

Definition at line 250 of file locations_helpers.h.

◆ TYPE_LIST_0

#define TYPE_LIST_0 ( )    Nil

Definition at line 239 of file locations_helpers.h.

◆ TYPE_LIST_1

#define TYPE_LIST_1 (   T0)    Cons<T0, TYPE_LIST_0()>

Definition at line 240 of file locations_helpers.h.

◆ TYPE_LIST_2

#define TYPE_LIST_2 (   T0,
  T1 
)    Cons<T0, TYPE_LIST_1(T1)>

Definition at line 241 of file locations_helpers.h.

◆ TYPE_LIST_3

#define TYPE_LIST_3 (   T0,
  T1,
  T2 
)    Cons<T0, TYPE_LIST_2(T1, T2)>

Definition at line 242 of file locations_helpers.h.

◆ TYPE_LIST_4

#define TYPE_LIST_4 (   T0,
  T1,
  T2,
  T3 
)    Cons<T0, TYPE_LIST_3(T1, T2, T3)>

Definition at line 243 of file locations_helpers.h.

◆ TYPE_LIST_5

#define TYPE_LIST_5 (   T0,
  T1,
  T2,
  T3,
  T4 
)    Cons<T0, TYPE_LIST_4(T1, T2, T3, T4)>

Definition at line 244 of file locations_helpers.h.