public StaticVariableInfo(TerminalName name, Static representation)
     : base(name, representation)
 {
 }
Exemplo n.º 2
0
 /// <summary>
 /// These label addresses aren't guaranteed correct until the final pass of the compiler
 /// </summary>
 public int GetLabelAddressBestEffort(TerminalName targetName)
 {
     var result=labelNameToAddress[targetName];
       if(result==null) {
     labelsHaveChanged=true;
     return 0;
       }
       return (int)result;
 }
Exemplo n.º 3
0
 /// <summary>
 /// Mark the point in the generated code which is this label's target
 /// </summary>
 public void MarkLabel(TerminalName name)
 {
     var currentAddress=emitter.CurrentAddress;
       var previousAddress=labelNameToAddress[name];
       if(previousAddress!=null && (int)previousAddress!=currentAddress) {
     labelsHaveChanged=true;
       }
       labelNameToAddress[name]=currentAddress;
       Debug.Print(name+":");
 }
 public bool TryGetRepresentation(TerminalName refName, out Representation result)
 {
     result=(Representation)VariableNameToRepresentation[refName];
       return result!=null;
 }
 public bool IsLiveLocalVariableName(TerminalName name)
 {
     return liveLocalVariableNames.ContainsKey(name);
 }
 public Representation AllocateRepresentation(TerminalName variableName)
 {
     return (Representation)AllocateRegisterIfPossible(null) ?? AllocateStackTemporary();
 }
Exemplo n.º 7
0
 protected VariableInfo(TerminalName name, Representation representation)
 {
     this.Name=name;
       this.Representation=representation;
 }
Exemplo n.º 8
0
 public LocalVariableInfo(TerminalName name, Representation representation)
     : base(name, representation)
 {
 }