Flutter Engine
The Flutter Engine
Public Member Functions | Public Attributes | List of all members
dart::kernel::ActiveClass Class Reference

#include <kernel_translation_helper.h>

Public Member Functions

 ActiveClass ()
 
bool HasMember ()
 
bool MemberIsProcedure ()
 
bool MemberIsFactoryProcedure ()
 
intptr_t MemberTypeParameterCount (Zone *zone)
 
intptr_t ClassNumTypeArguments ()
 
const char * ToCString ()
 
ScriptPtr ActiveScript ()
 

Public Attributes

const Classklass
 
const Functionmember
 
const FunctionTypeenclosing
 
const TypeArgumentslocal_type_parameters
 

Detailed Description

Definition at line 1401 of file kernel_translation_helper.h.

Constructor & Destructor Documentation

◆ ActiveClass()

dart::kernel::ActiveClass::ActiveClass ( )
inline

Definition at line 1403 of file kernel_translation_helper.h.

1404 : klass(nullptr),
1405 member(nullptr),
1406 enclosing(nullptr),
1407 local_type_parameters(nullptr) {}
const TypeArguments * local_type_parameters

Member Function Documentation

◆ ActiveScript()

ScriptPtr dart::kernel::ActiveClass::ActiveScript ( )
inline

Definition at line 1438 of file kernel_translation_helper.h.

1438 {
1439 if (member != nullptr && !member->IsNull()) {
1440 return member->script();
1441 }
1442 if (klass != nullptr && !klass->IsNull()) {
1443 return klass->script();
1444 }
1445 return Script::null();
1446 }
ScriptPtr script() const
Definition: object.h:1272
ScriptPtr script() const
Definition: object.cc:10881
static ObjectPtr null()
Definition: object.h:433
bool IsNull() const
Definition: object.h:363

◆ ClassNumTypeArguments()

intptr_t dart::kernel::ActiveClass::ClassNumTypeArguments ( )
inline

Definition at line 1429 of file kernel_translation_helper.h.

1429 {
1430 ASSERT(klass != nullptr);
1431 return klass->NumTypeArguments();
1432 }
intptr_t NumTypeArguments() const
Definition: object.cc:3640
#define ASSERT(E)

◆ HasMember()

bool dart::kernel::ActiveClass::HasMember ( )
inline

Definition at line 1409 of file kernel_translation_helper.h.

1409{ return member != nullptr; }

◆ MemberIsFactoryProcedure()

bool dart::kernel::ActiveClass::MemberIsFactoryProcedure ( )
inline

Definition at line 1422 of file kernel_translation_helper.h.

1422 {
1423 ASSERT(member != nullptr);
1424 return member->IsFactory();
1425 }
bool IsFactory() const
Definition: object.h:3367

◆ MemberIsProcedure()

bool dart::kernel::ActiveClass::MemberIsProcedure ( )
inline

Definition at line 1411 of file kernel_translation_helper.h.

1411 {
1412 ASSERT(member != nullptr);
1413 UntaggedFunction::Kind function_kind = member->kind();
1414 return function_kind == UntaggedFunction::kRegularFunction ||
1415 function_kind == UntaggedFunction::kGetterFunction ||
1416 function_kind == UntaggedFunction::kSetterFunction ||
1417 function_kind == UntaggedFunction::kMethodExtractor ||
1418 function_kind == UntaggedFunction::kDynamicInvocationForwarder ||
1419 member->IsFactory();
1420 }
UntaggedFunction::Kind kind() const
Definition: object.h:3349

◆ MemberTypeParameterCount()

intptr_t dart::kernel::ActiveClass::MemberTypeParameterCount ( Zone zone)

Definition at line 3205 of file kernel_translation_helper.cc.

3205 {
3206 ASSERT(member != nullptr);
3207 if (member->IsFactory()) {
3208 return klass->NumTypeParameters();
3209 } else if (member->IsMethodExtractor()) {
3210 Function& extracted =
3212 return extracted.NumTypeParameters();
3213 } else {
3214 return member->NumTypeParameters();
3215 }
3216}
intptr_t NumTypeParameters(Thread *thread) const
Definition: object.cc:3555
intptr_t NumTypeParameters() const
Definition: object.cc:8847
bool IsMethodExtractor() const
Definition: object.h:3284
FunctionPtr extracted_method_closure() const
Definition: object.cc:8120
static Object & Handle()
Definition: object.h:407

◆ ToCString()

const char * dart::kernel::ActiveClass::ToCString ( )
inline

Definition at line 1434 of file kernel_translation_helper.h.

1434 {
1435 return member != nullptr ? member->ToCString() : klass->ToCString();
1436 }
virtual const char * ToCString() const
Definition: object.h:366

Member Data Documentation

◆ enclosing

const FunctionType* dart::kernel::ActiveClass::enclosing

Definition at line 1455 of file kernel_translation_helper.h.

◆ klass

const Class* dart::kernel::ActiveClass::klass

Definition at line 1449 of file kernel_translation_helper.h.

◆ local_type_parameters

const TypeArguments* dart::kernel::ActiveClass::local_type_parameters

Definition at line 1457 of file kernel_translation_helper.h.

◆ member

const Function* dart::kernel::ActiveClass::member

Definition at line 1451 of file kernel_translation_helper.h.


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