CIRCT  19.0.0git
Public Types | Public Member Functions | Private Attributes | List of all members
circt::om::evaluator::EvaluatorValue Struct Reference

Base class for evaluator runtime values. More...

#include <Evaluator.h>

Inheritance diagram for circt::om::evaluator::EvaluatorValue:
Inheritance graph
[legend]
Collaboration diagram for circt::om::evaluator::EvaluatorValue:
Collaboration graph
[legend]

Public Types

enum class  Kind {
  Attr , Object , List , Tuple ,
  Map , Reference , BasePath , Path
}
 

Public Member Functions

 EvaluatorValue (MLIRContext *ctx, Kind kind, Location loc)
 
Kind getKind () const
 
MLIRContext * getContext () const
 
bool isFullyEvaluated () const
 
void markFullyEvaluated ()
 
MLIRContext * getContext ()
 Return the associated MLIR context. More...
 
Type getType () const
 
LogicalResult finalize ()
 
Location getLoc () const
 
void setLoc (Location l)
 
void setLocIfUnknown (Location l)
 

Private Attributes

const Kind kind
 
MLIRContext * ctx
 
Location loc
 
bool fullyEvaluated = false
 
bool finalized = false
 

Detailed Description

Base class for evaluator runtime values.

Enables the shared_from_this functionality so Evaluator Value pointers can be passed through the CAPI and unwrapped back into C++ smart pointers with the appropriate reference count.

Definition at line 48 of file Evaluator.h.

Member Enumeration Documentation

◆ Kind

Enumerator
Attr 
Object 
List 
Tuple 
Map 
Reference 
BasePath 
Path 

Definition at line 50 of file Evaluator.h.

Constructor & Destructor Documentation

◆ EvaluatorValue()

circt::om::evaluator::EvaluatorValue::EvaluatorValue ( MLIRContext *  ctx,
Kind  kind,
Location  loc 
)
inline

Definition at line 51 of file Evaluator.h.

Member Function Documentation

◆ finalize()

LogicalResult circt::om::evaluator::EvaluatorValue::finalize ( )

Definition at line 43 of file Evaluator.cpp.

References assert().

◆ getContext() [1/2]

MLIRContext* circt::om::evaluator::EvaluatorValue::getContext ( )
inline

Return the associated MLIR context.

Definition at line 64 of file Evaluator.h.

References ctx.

◆ getContext() [2/2]

MLIRContext* circt::om::evaluator::EvaluatorValue::getContext ( ) const
inline

Definition at line 54 of file Evaluator.h.

References ctx.

Referenced by circt::om::evaluator::ObjectValue::getField().

◆ getKind()

Kind circt::om::evaluator::EvaluatorValue::getKind ( ) const
inline

◆ getLoc()

Location circt::om::evaluator::EvaluatorValue::getLoc ( ) const
inline

Definition at line 73 of file Evaluator.h.

References loc.

◆ getType()

Type circt::om::evaluator::EvaluatorValue::getType ( ) const

Definition at line 57 of file Evaluator.cpp.

References circt::calyx::direction::get().

◆ isFullyEvaluated()

bool circt::om::evaluator::EvaluatorValue::isFullyEvaluated ( ) const
inline

Definition at line 57 of file Evaluator.h.

References fullyEvaluated.

◆ markFullyEvaluated()

void circt::om::evaluator::EvaluatorValue::markFullyEvaluated ( )
inline

◆ setLoc()

void circt::om::evaluator::EvaluatorValue::setLoc ( Location  l)
inline

Definition at line 75 of file Evaluator.h.

References loc.

◆ setLocIfUnknown()

void circt::om::evaluator::EvaluatorValue::setLocIfUnknown ( Location  l)
inline

Definition at line 77 of file Evaluator.h.

References loc.

Member Data Documentation

◆ ctx

MLIRContext* circt::om::evaluator::EvaluatorValue::ctx
private

Definition at line 84 of file Evaluator.h.

Referenced by getContext().

◆ finalized

bool circt::om::evaluator::EvaluatorValue::finalized = false
private

Definition at line 87 of file Evaluator.h.

◆ fullyEvaluated

bool circt::om::evaluator::EvaluatorValue::fullyEvaluated = false
private

Definition at line 86 of file Evaluator.h.

Referenced by isFullyEvaluated(), and markFullyEvaluated().

◆ kind

const Kind circt::om::evaluator::EvaluatorValue::kind
private

Definition at line 83 of file Evaluator.h.

Referenced by getKind().

◆ loc

Location circt::om::evaluator::EvaluatorValue::loc
private

Definition at line 85 of file Evaluator.h.

Referenced by getLoc(), setLoc(), and setLocIfUnknown().


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