rpicsim 0.4.0 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,20 +0,0 @@
1
- require_relative 'mplab_instruction'
2
-
3
- module RPicSim::Mplab
4
- class MplabDisassembler
5
- # @param disasm [com.microchip.mplab.mdbcore.disasm.DisAsm]
6
- def initialize(disasm)
7
- @disasm = disasm
8
- end
9
-
10
- def disassemble(address)
11
- begin
12
- instr = @disasm.Disassemble(address, nil, nil)
13
- rescue Java::ComMicrochipMplabMdbcoreDisasm::InvalidInstructionException
14
- # The instruction is invalid.
15
- return :invalid
16
- end
17
- MplabInstruction.new instr
18
- end
19
- end
20
- end
@@ -1,20 +0,0 @@
1
- module RPicSim
2
- module Search
3
- # Performs a depth first search.
4
- # No measures are taken to avoid processing the same node multiple
5
- # times, so this is only suitable for acyclic graphs.
6
- # Every time a node is processed, it will be yielded as the first
7
- # and only argument to the block.
8
- #
9
- # This is used by {CallStackInfo#code_paths} to search the instruction
10
- # graph backwards in order to find code_paths for a given instruction.
11
- def self.depth_first_search_simple(root_nodes)
12
- unprocessed_nodes = root_nodes.reverse
13
- until unprocessed_nodes.empty?
14
- node = unprocessed_nodes.pop
15
- nodes = yield node
16
- unprocessed_nodes.concat(nodes.reverse)
17
- end
18
- end
19
- end
20
- end