Flutter Engine
The Flutter Engine
Public Types | Static Public Member Functions | List of all members
dart::InvocationMirror Class Reference

#include <invocation_mirror.h>

Inheritance diagram for dart::InvocationMirror:
dart::AllStatic

Public Types

enum  Kind {
  kMethod = 0 , kGetter = 1 , kSetter = 2 , kField = 3 ,
  kLocalVar = 4 , kKindShift = 0 , kKindBits = 3 , kKindMask = (1 << kKindBits) - 1
}
 
enum  Level {
  kDynamic = 0 , kSuper = 1 , kStatic = 2 , kConstructor = 3 ,
  kTopLevel = 4 , kLevelShift = kKindBits , kLevelBits = 3 , kLevelMask = (1 << kLevelBits) - 1
}
 

Static Public Member Functions

static int EncodeType (Level level, Kind kind)
 
static void DecodeType (int type, Level *level, Kind *kind)
 

Detailed Description

Definition at line 12 of file invocation_mirror.h.

Member Enumeration Documentation

◆ Kind

Enumerator
kMethod 
kGetter 
kSetter 
kField 
kLocalVar 
kKindShift 
kKindBits 
kKindMask 

Definition at line 17 of file invocation_mirror.h.

17 {
18 // Constants describing the invocation type.
19 // kField cannot be generated by regular invocation mirrors.
20 kMethod = 0,
21 kGetter = 1,
22 kSetter = 2,
23 kField = 3,
24 kLocalVar = 4,
25 kKindShift = 0,
26 kKindBits = 3,
27 kKindMask = (1 << kKindBits) - 1
28 };

◆ Level

Enumerator
kDynamic 
kSuper 
kStatic 
kConstructor 
kTopLevel 
kLevelShift 
kLevelBits 
kLevelMask 

Definition at line 30 of file invocation_mirror.h.

30 {
31 // These values, except kDynamic and kSuper, are only used when throwing
32 // NoSuchMethodError for compile-time resolution failures.
33 kDynamic = 0,
34 kSuper = 1,
35 kStatic = 2,
36 kConstructor = 3,
37 kTopLevel = 4,
39 kLevelBits = 3,
40 kLevelMask = (1 << kLevelBits) - 1
41 };

Member Function Documentation

◆ DecodeType()

static void dart::InvocationMirror::DecodeType ( int  type,
Level level,
Kind kind 
)
inlinestatic

Definition at line 47 of file invocation_mirror.h.

47 {
48 *level = static_cast<Level>(type >> kLevelShift);
49 *kind = static_cast<Kind>(type & kKindMask);
50 }
GLenum type

◆ EncodeType()

static int dart::InvocationMirror::EncodeType ( Level  level,
Kind  kind 
)
inlinestatic

Definition at line 43 of file invocation_mirror.h.

43 {
44 return (level << kLevelShift) | kind;
45 }

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