Example #1
0
        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);
        }
Example #2
0
        public void VisitAssignment(AssignmentNode node)
        {
            AddressOfVisitor addressOfVisitor
                = new AddressOfVisitor(_layout, _module, _structLayoutManager);

            node.Lhs.AcceptAddressableVisitor(addressOfVisitor);

            node.Rhs.AcceptExpressionVisitor(this);

            int size = GetExpressionResultSize(node.Rhs);
            int addr = _functionBuilder.AddInstruction(OpCode.WRITE, addressOfVisitor.AbsoluteStackAddress, size);

            _functionBuilder.AddDebugSymbol(addr, node);
        }