MCPcopy Create free account
hub / github.com/beefytech/Beef / LoadOrAggregateValue

Method LoadOrAggregateValue

IDEHelper/Compiler/BfModule.cpp:13603–13620  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13601}
13602
13603BfTypedValue BfModule::LoadOrAggregateValue(BfTypedValue typedValue)
13604{
13605 if (typedValue.IsSplat())
13606 return AggregateSplat(typedValue);
13607 if (typedValue.IsAddr())
13608 return LoadValue(typedValue);
13609
13610 if ((typedValue.mType != NULL) && (typedValue.mType->IsParamsType()) && (!typedValue.IsParams()))
13611 {
13612 return GetDefaultTypedValue(ResolveTypeDef(mCompiler->mTupleTypeDef));
13613 }
13614 else if ((typedValue.IsParams()) && (typedValue.mType->IsGenericParam()))
13615 {
13616 return BfTypedValue(mBfIRBuilder->GetFakeVal(), typedValue.mType);
13617 }
13618
13619 return typedValue;
13620}
13621
13622BfTypedValue BfModule::AggregateSplat(BfTypedValue typedValue, BfIRValue* valueArrPtr)
13623{

Callers 10

LoadLocalMethod · 0.80
LookupIdentifierMethod · 0.80
ResolveArgValuesMethod · 0.80
CreateCallMethod · 0.80
VisitMethod · 0.80
HandleMethod · 0.80
InitializedSizedArrayMethod · 0.80

Calls 7

BfTypedValueClass · 0.85
IsSplatMethod · 0.80
IsAddrMethod · 0.80
IsParamsMethod · 0.80
GetFakeValMethod · 0.80
IsParamsTypeMethod · 0.45
IsGenericParamMethod · 0.45

Tested by

no test coverage detected