Ejemplo n.º 1
0
 internal DebugInfo Merge(DebugInfo syms)
 {
     Scopes.AddRange(syms.Scopes);
     Lines.AddRange(syms.Lines);
     Vars.AddRange(syms.Vars);
     Functions.AddRange(syms.Functions);
     return(this);
 }
Ejemplo n.º 2
0
        public GReturnStmt(string text)
        {
            this.Text = text;
            StmtType  = GimpleStmtType.GRETURN;
            Pattern   = myPattern;
            var match = Regex.Match(text, myPattern);

            Retval = match.Groups["retval"].Value;
            Vars.AddRange(new[] { Retval }.Where(x => IsValidIdentifier(x)));
        }
Ejemplo n.º 3
0
        public GCondStmt(string text)
        {
            this.Text = text;
            StmtType  = GimpleStmtType.GCOND;
            Pattern   = myPattern;
            var match = Regex.Match(text, myPattern);

            Op1 = match.Groups["op1"].Value;
            Op2 = match.Groups["op2"].Value;
            Op  = match.Groups["op"].Value;

            //if ( Op == "==" || Op == "!=" )
            //{
            //	if ( Op1.CompareTo ( Op2 ) > 0 )
            //	{
            //		var temp = Op1;
            //		Op1 = Op2;
            //		Op2 = temp;
            //	}
            //}

            Vars.AddRange(new[] { Op1, Op2 }.Where(x => IsValidIdentifier(x)));
        }