public void VisitBorrowUnaryOp(BorrowUnaryOpNode node) { IAddressableNode?addressableRhs = node.RHS as IAddressableNode; if (addressableRhs == null || !addressableRhs.IsAddressable()) { _errors.AddError("Cannot borrow non-lvalue type", node); } }
public void VisitBorrowUnaryOp(BorrowUnaryOpNode node) { IAddressableNode addressableRhs = (IAddressableNode)node.RHS; AddressOfVisitor addressOfVisitor = new AddressOfVisitor(_functionStackLayout, _semanticModule, _structLayoutManager); addressableRhs.AcceptAddressableVisitor(addressOfVisitor); int startAddr = _builder.AddInstruction(OpCode.ADDRESSOF, addressOfVisitor.AbsoluteStackAddress); _builder.AddDebugSymbol(startAddr, node); }
public void VisitBorrowUnaryOp(BorrowUnaryOpNode node) { node.RHS.AcceptExpressionVisitor(this); if (!(Type is IValueType valueType)) { _errors.AddError("Cannot borrow non-value type", node); SetAndCacheType(node, Type); return; } SetAndCacheType(node, _typeManager.GetType(valueType, PointerMode.Borrowed)); }
public void VisitBorrowUnaryOp(BorrowUnaryOpNode node) { VisitPreOrder(node); node.RHS.AcceptExpressionVisitor(this); VisitPostOrder(node); }
public void VisitBorrowUnaryOp(BorrowUnaryOpNode node) { }