コード例 #1
0
        private DisassemblyLineViewModel GetLineByAddress(int address)
        {
            DisassemblyLineViewModel result;

            if (addressToLineMap.TryGetValue(address, out result))
            {
                return(result);
            }

            return(null);
        }
コード例 #2
0
ファイル: ZObjectTable.cs プロジェクト: taradinoc/ZDebug
        internal ZPropertyTable GetPropertyTable(ushort address)
        {
            ZPropertyTable propertyTable;

            if (!propertyTables.TryGetValue(address, out propertyTable))
            {
                propertyTable = new ZPropertyTable(this, address);
                propertyTables.Add(address, propertyTable);
            }

            return(propertyTable);
        }
コード例 #3
0
ファイル: CompiledZMachine.cs プロジェクト: taradinoc/ZDebug
        internal ZCompilerResult Compile(ZRoutine routine)
        {
            ZCompilerResult result;

            if (!compilationResults.TryGetValue(routine.Address, out result))
            {
                result = ZCompiler.Compile(routine, machine: this);

                compilationResults.Add(routine.Address, result);

                if (profiler != null)
                {
                    profiler.RoutineCompiled(result.Statistics);
                }
            }

            return(result);
        }
コード例 #4
0
ファイル: CompiledZMachine.cs プロジェクト: taradinoc/ZDebug
        internal ZRoutineCall GetRoutineCall(int address)
        {
            ZRoutineCall routineCall;

            if (!addressToRoutineCallMap.TryGetValue(address, out routineCall))
            {
                cacheMiss++;
                var routine = GetRoutineByAddress(address);
                routineCall = new ZRoutineCall(routine, machine: this);
                addressToRoutineCallMap.Add(address, routineCall);
            }

            if (this.precompile && !compiling)
            {
                compiling = true;
                routineCall.Compile();
                compiling = false;
            }

            return(routineCall);
        }
コード例 #5
0
 internal bool TryGet(int address, out Instruction instruction)
 {
     return(map.TryGetValue(address, out instruction));
 }
コード例 #6
0
ファイル: ZRoutineTable.cs プロジェクト: taradinoc/ZDebug
 public bool TryGetByAddress(int address, out ZRoutine routine)
 {
     return(routines.TryGetValue(address, out routine));
 }