public override bool EqualTo(Representation other)
 {
     var otherSw=other as StackWordRelativeToZero;
       return otherSw!=null && this.offset==otherSw.offset;
 }
Esempio n. 2
0
 public abstract bool EqualTo(Representation other);
 public abstract bool EqualTo(Representation other);
Esempio n. 4
0
 protected VariableInfo(TerminalName name, Representation representation)
 {
     this.Name=name;
       this.Representation=representation;
 }
 public bool TryGetRepresentation(TerminalName refName, out Representation result)
 {
     result=(Representation)VariableNameToRepresentation[refName];
       return result!=null;
 }
Esempio n. 6
0
 public override bool EqualTo(Representation obj)
 {
     var other=obj as Static;
       return other!=null && this.StorageLabel.Name.Equals(other.StorageLabel.Name);
 }
Esempio n. 7
0
        public override bool EqualTo(Representation other)
        {
            var otherReg = other as Register;

            return(otherReg != null && this.Index == otherReg.Index);
        }
Esempio n. 8
0
        public override bool EqualTo(Representation obj)
        {
            var other = obj as Static;

            return(other != null && this.StorageLabel.Name.Equals(other.StorageLabel.Name));
        }
Esempio n. 9
0
 public LocalVariableInfo(TerminalName name, Representation representation)
     : base(name, representation)
 {
 }
Esempio n. 10
0
 public void BindLocalVariableToRepresentation(IReference variable, string name, Representation representation=null)
 {
     var terminalName=CreateTerminalName(name);
       if(representation!=null) {
     pinnedVariables[terminalName]=representation;
       }
       if(representation==null && !BuilderHints.TryGetRepresentation(terminalName, out representation)) {
     if(CodeGenerator.Instance.GeneratorHints.IsFirstPass) {
       simpleAllocatorIndexForPass0-=4;
       representation=new StackWordRelativeToEndOfVariables(simpleAllocatorIndexForPass0);
     }
     //else, representation is null
       }
       localVariableToInfo.Add(variable, new LocalVariableInfo(terminalName, representation));
 }
Esempio n. 11
0
        public override bool EqualTo(Representation other)
        {
            var otherSw = other as StackWordRelativeToZero;

            return(otherSw != null && this.offset == otherSw.offset);
        }
Esempio n. 12
0
 public override bool EqualTo(Representation other)
 {
     var otherReg=other as Register;
       return otherReg!=null && this.Index==otherReg.Index;
 }