public int GetParameterBytes(int block) { StackMemory mem; try { mem = Memory[block]; } catch { mem = new StackMemory(); Memory.Add(block, mem); } return(Memory[block].ParameterBytes); }
public void AllocMemory(Identifier localVariable) { StackMemory mem; try { mem = Memory[localVariable.BlockId]; //Memory.TryGetValue(block, out mem); } catch (KeyNotFoundException) { mem = new StackMemory(); Memory.Add(localVariable.BlockId, mem); } mem.Alloc(localVariable); }
public void AllocMemory(int block, FormalArgument argument) { StackMemory mem; try { mem = Memory[block]; //Memory.TryGetValue(block, out mem); } catch (KeyNotFoundException) { mem = new StackMemory(); Memory.Add(block, mem); } mem.Alloc(argument.VariableType, argument.Identifier); }