CIRCT
20.0.0git
|
A composite Object, which has a type and fields. More...
#include <Evaluator.h>
Public Member Functions | |
ObjectValue (om::ClassOp cls, ObjectFields fields, Location loc) | |
ObjectValue (om::ClassOp cls, Location loc) | |
om::ClassOp | getClassOp () const |
const auto & | getFields () const |
void | setFields (llvm::SmallDenseMap< StringAttr, EvaluatorValuePtr > newFields) |
om::ClassType | getObjectType () const |
Return the type of the value, which is a ClassType. More... | |
Type | getType () const |
FailureOr< EvaluatorValuePtr > | getField (StringAttr field) |
Get a field of the Object by name. More... | |
FailureOr< EvaluatorValuePtr > | getField (StringRef field) |
ArrayAttr | getFieldNames () |
Get all the field names of the Object. More... | |
LogicalResult | finalizeImpl () |
Public Member Functions inherited from circt::om::evaluator::EvaluatorValue | |
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) |
Static Public Member Functions | |
static bool | classof (const EvaluatorValue *e) |
Implement LLVM RTTI. More... | |
Private Attributes | |
om::ClassOp | cls |
llvm::SmallDenseMap< StringAttr, EvaluatorValuePtr > | fields |
Additional Inherited Members | |
Public Types inherited from circt::om::evaluator::EvaluatorValue | |
enum class | Kind { Attr , Object , List , Tuple , Map , Reference , BasePath , Path } |
A composite Object, which has a type and fields.
Definition at line 257 of file Evaluator.h.
|
inline |
Definition at line 258 of file Evaluator.h.
References circt::om::evaluator::EvaluatorValue::markFullyEvaluated().
|
inline |
Definition at line 265 of file Evaluator.h.
|
inlinestatic |
Implement LLVM RTTI.
Definition at line 286 of file Evaluator.h.
References circt::om::evaluator::EvaluatorValue::getKind(), and circt::om::evaluator::EvaluatorValue::Object.
LogicalResult circt::om::evaluator::ObjectValue::finalizeImpl | ( | ) |
Definition at line 759 of file Evaluator.cpp.
References circt::om::evaluator::finalizeEvaluatorValue().
|
inline |
Definition at line 268 of file Evaluator.h.
References cls.
FailureOr< EvaluatorValuePtr > circt::om::evaluator::ObjectValue::getField | ( | StringAttr | field | ) |
Get a field of the Object by name.
Definition at line 738 of file Evaluator.cpp.
Referenced by getField().
|
inline |
Definition at line 292 of file Evaluator.h.
References circt::calyx::direction::get(), circt::om::evaluator::EvaluatorValue::getContext(), and getField().
ArrayAttr circt::om::Object::getFieldNames | ( | ) |
Get all the field names of the Object.
Get an ArrayAttr with the names of the fields in the Object.
Sort the fields so there is always a stable order.
Definition at line 747 of file Evaluator.cpp.
References circt::calyx::direction::get().
|
inline |
Definition at line 269 of file Evaluator.h.
References fields.
|
inline |
Return the type of the value, which is a ClassType.
Definition at line 277 of file Evaluator.h.
References cls, and circt::calyx::direction::get().
Referenced by getType().
|
inline |
Definition at line 283 of file Evaluator.h.
References getObjectType().
|
inline |
Definition at line 271 of file Evaluator.h.
References fields, and circt::om::evaluator::EvaluatorValue::markFullyEvaluated().
|
private |
Definition at line 303 of file Evaluator.h.
Referenced by getClassOp(), and getObjectType().
|
private |
Definition at line 304 of file Evaluator.h.
Referenced by esiaccel.types.StructType::bit_width(), esiaccel.types.StructType::deserialize(), getFields(), esiaccel.types.StructType::is_valid(), esiaccel.types.StructType::serialize(), and setFields().