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

Method GetOrCreateVarAddr

IDEHelper/Compiler/BfModule.cpp:9554–9569  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9552}
9553
9554BfTypedValue BfModule::GetOrCreateVarAddr(BfExpression* expr)
9555{
9556 BfExprEvaluator exprEvaluator(this);
9557 exprEvaluator.Evaluate(expr);
9558 if (!exprEvaluator.mResult)
9559 {
9560 Fail("Invalid expression type", expr);
9561 return BfTypedValue();
9562 }
9563 if (!exprEvaluator.mResult.IsAddr())
9564 {
9565 Fail("Cannot assign to value", expr);
9566 return BfTypedValue();
9567 }
9568 return exprEvaluator.mResult;
9569}
9570
9571// Clear memory, set classVData, call init. Actual ctor is called elsewhere.
9572void BfModule::InitTypeInst(BfTypedValue typedValue, BfScopeData* scopeData, bool zeroMemory, BfIRValue sizeValue, BfAllocFlags allocFlags)

Callers

nothing calls this directly

Calls 4

FailFunction · 0.85
BfTypedValueClass · 0.85
IsAddrMethod · 0.80
EvaluateMethod · 0.45

Tested by

no test coverage detected