flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
Tomasz Grysztar
It might be possible in theory, but it wouldn't go well with fasm's implementation. It would have incomplete track of some of the values and it would no longer be able to guarantee the correctness of generated solution.
|
|||
![]() |
|
l_inc
Tomasz Grysztar
Could you provide an example of what exactly would be tracked incompletely? Because I see no crucial difference between the subject and e.g. rb -1. |
|||
![]() |
|
Tomasz Grysztar
l_inc wrote: Because I see no crucial difference between the subject and e.g. rb -1. However, I think I found out a possible way to get this working correctly. I'm trying to make a formal proof - if I succeed in proving its correctness, I will implement such improvement. |
|||
![]() |
|
Tomasz Grysztar
BTW, "out of scope" has always been recoverable, for example this resolved without error:
Code: if ~ defined y dd a end if a = 1 a = 3 label y |
|||
![]() |
|
l_inc
Tomasz Grysztar
Quote: Tracking of label values is what the fasm's resolving algorithm relies on, and this is that crucial difference. Label values are not constant between the passes. Thus forward referencing a label or numeric constant, that changes it's value after it has already been used, seems to be equivalent to forward referencing a numeric constant, that later becomes a numeric variable. So the final decision about the error can be made the same way after the numeric variability has been stabilized. And label redefinition seems to be equivalent to a numeric constant becoming a numeric variable. Quote: You were deceived by the fact that currently after fasm sees numerical constant redefined once, it never allows it to be forward referenced Well, I never talked about the "out of scope" error as such. I talked about the numeric variable forward referencing. However in this case it's more reasonable to talk about unrecoverable state than about an unrecoverable error. P.S. Quote: I'm trying to make a formal proof Cool. ![]() |
|||
![]() |
|
Tomasz Grysztar
Well, it not go well, as I was afraid it would. After I ensured correctness, fasm started to go into infinite loops ("code cannot be generated") instead of signalizing simple errors.
|
|||
![]() |
|
l_inc
Tomasz Grysztar
A negative result is also a result. Thank you for the attempt. P.S. I'd probably try it by myself, but this requires deep understanding of fasm sources which lays beyond my abilities. |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.
Website powered by rwasa.