public void VisitAccess(AccessNode node) { // Don't insert unreachable code if (!_builder.InsertBlock.IsValid) { return; } node.Lhs.AcceptExpressionVisitor(this); if (!_visitedValue.IsValid) { throw new InvalidOperationException("access did not produce a usable base pointer"); } Value lhs = _visitedValue; StructType structType = (StructType)_genContext.SemanticModule.ExpressionResultTypes[node.Lhs]; StructLayout layout = _genContext.StructLayoutManager.GetLayout(structType); if (!layout.MemberOffsets.TryGetValue(node.Rhs, out int index)) { throw new InvalidOperationException(); } _visitedValue = _builder.BuildExtractValue(lhs, (uint)index); }
public void VisitAccess(AccessNode node) { if (!node.IsAddressable()) { return; } IAddressableNode addressableLhs = (IAddressableNode)node.Lhs; addressableLhs.AcceptAddressableVisitor(this); _path.Add(node.Rhs); }
public void VisitAccess(AccessNode node) { IAddressableNode addressableLhs = (IAddressableNode)node.Lhs; addressableLhs.AcceptAddressableVisitor(this); StructType structType = (StructType)_module.ExpressionResultTypes[node.Lhs]; StructLayout layout = _structLayoutManager.GetLayout(structType); if (!layout.MemberOffsets.TryGetValue(node.Rhs, out int offset)) { throw new InvalidOperationException(); } AbsoluteStackAddress += offset; }
public void VisitAccess(AccessNode node) { IAddressableNode addressableNode = (IAddressableNode)node.Lhs; addressableNode.AcceptAddressableVisitor(this); StructType structType = (StructType)_genContext.SemanticModule.ExpressionResultTypes[node.Lhs]; StructLayout layout = _genContext.StructLayoutManager.GetLayout(structType); if (!layout.MemberOffsets.TryGetValue(node.Rhs, out int index)) { throw new InvalidOperationException(); } AssignmentWritePointer = _builder.BuildStructGEP(AssignmentWritePointer, (uint)index); }
public AccessNode GetAccessNode(long id) { AccessNode accessNode = null; using (var transaction = DbTransaction()) { var repository = transaction.Repository <AccessNode>(); try { accessNode = repository.Find(u => u.ID == id); } catch (Exception exc) { Facade.Log.CreateErrorLog(ModuleName, "GetAccessNode", "", exc, ""); } } return(accessNode); }
public void VisitAccess(AccessNode node) { node.Lhs.AcceptExpressionVisitor(this); StructType structType = (StructType)_module.ExpressionResultTypes[node.Lhs]; StructLayout layout = _structLayoutManager.GetLayout(structType); if (!layout.MemberOffsets.TryGetValue(node.Rhs, out int offset)) { throw new InvalidOperationException(); } int structSize = _typeSizeManager.GetSize(structType); int fieldSize = _typeSizeManager.GetSize(((TypeSpecifierNode)node.Rhs.Type).Type); int trim = structSize - offset - fieldSize; _functionBuilder.AddInstruction(OpCode.POP, 0, trim); _functionBuilder.AddInstruction(OpCode.ACCESS, offset, offset + fieldSize); }
public void UpdateAccessNode(AccessNode accessNode) { Update(accessNode); }
public void DeleteAccessNode(AccessNode accessNode) { Delete(accessNode); }
public void SaveAccessNode(AccessNode accessNode) { Add(accessNode); }
public void VisitAccess(AccessNode node) { VisitDefaultExpression(node); }
public void VisitAccess(AccessNode node) { node.Lhs = _processor.ProcessReplacement(node.Lhs); node.Rhs = _processor.ProcessReplacement(node.Rhs); }
public AssignmentNode(AccessNode left, ExpressionNode body) : base(body) { Left = left; Left.Parent = this; }
public void Visit(AccessNode node) { ValidateUsage(node); }
public void VisitAccess(AccessNode node) { node.Lhs.AcceptExpressionVisitor(this); }
public void VisitAccess(AccessNode node) { Print($"Access (Rhs.Name = {node.Rhs.Name})"); VisitSubnode(node.Lhs); }
public void VisitAccess(AccessNode node) { VisitPreOrder(node); node.Lhs.AcceptExpressionVisitor(this); VisitPostOrder(node); }
public void VisitAccess(AccessNode node) { AccessVisitor?.Visit(node); }
public void VisitAccess(AccessNode node) { node.Rhs.Type.AcceptSpecifierVisitor(this); SetAndCacheType(node, Type); }
public SymConst Visit(AccessNode node) { throw EvalException(); }