remove link exception class

This commit is contained in:
Torsten Ruger
2018-05-08 20:22:04 +03:00
parent cf06642768
commit 7ca7e92dda
6 changed files with 5 additions and 44 deletions

View File

@ -12,7 +12,6 @@ module Risc
end
# Go through and assemble all instructions.
# Assembly may cause LinkException, which is caught by caller
def assemble( instruction )
@index = 1
while(instruction)
@ -27,19 +26,4 @@ module Risc
end
end
# A LinkException is raised when the arm code can't fit a constant into _one_
# instruction. This is kind of unavoidable with arm.
#
# Off course the problem could be fixed without the exception, but the exception
# means all subsequent Instructions, including labels/jump targets move.
# Thus changing jump instructions to those labels.
# So the whole method has to be reassembled and (at least) the instructions beyond
# repositioned. Ie a non-local problem, and so the Exception.
#
# Note: In the future i hope to have a more flexible system, possibly with position
# listeners and change events. Because positions chaning is normal, not exceptional.
#
class LinkException < Exception
end
end