компилятор генерирует промежуточный код который затем переводится в ассемблер по разному для разных архитектур и операционок.
Я ищу информацию, направления, ссылки о структуре этого промежуточного кода и какой программой он затем переводится в ассемблер
Спасибо
промежуточный код
Модератор: Модераторы
- Иван Шихалев
- энтузиаст
- Сообщения: 1138
- Зарегистрирован: 15.05.2006 11:26:13
- Откуда: Екатеринбург
- Контактная информация:
- noch
- постоялец
- Сообщения: 145
- Зарегистрирован: 07.06.2005 09:45:49
- Откуда: Armenia
- Контактная информация:
Вот что написано в статье презентующей freepascal 2
Free Pascal 2 does three passes, constant evalution, collection of information and highlevel optimization, and code generation.<span style='color:red'> The code generator has been split in a front-end and back-end</span>. Tree, constant pass, information collection and highlevel code generation are built into an object oriented class structure. The CPU-dependent back-end is also implemented as class that needs to be overridden for each CPU. A CPU-dependent parameter manager helps the code generator to pass parameters to procedures without knowing anything about the CPU and calling convention that is being used.
The advantage of this architecture is that few CPU-dependent code has to be written to port the compiler, one can suffice by implementing the code generator back-end, the parameter manager and supplying the right information to the other parts of the compiler.
from <a href='http://www.osnews.com/story.php?news_id=10607&page=2' target='_blank'>http://www.osnews.com/story.php?news_id=10607&page=2</a>
Вот меня и интересует какая структура у когда генерируемого frontend для backend
Free Pascal 2 does three passes, constant evalution, collection of information and highlevel optimization, and code generation.<span style='color:red'> The code generator has been split in a front-end and back-end</span>. Tree, constant pass, information collection and highlevel code generation are built into an object oriented class structure. The CPU-dependent back-end is also implemented as class that needs to be overridden for each CPU. A CPU-dependent parameter manager helps the code generator to pass parameters to procedures without knowing anything about the CPU and calling convention that is being used.
The advantage of this architecture is that few CPU-dependent code has to be written to port the compiler, one can suffice by implementing the code generator back-end, the parameter manager and supplying the right information to the other parts of the compiler.
from <a href='http://www.osnews.com/story.php?news_id=10607&page=2' target='_blank'>http://www.osnews.com/story.php?news_id=10607&page=2</a>
Вот меня и интересует какая структура у когда генерируемого frontend для backend
- Сергей Смирнов
- энтузиаст
- Сообщения: 595
- Зарегистрирован: 28.04.2005 13:23:25
- Откуда: Москва
- Контактная информация:
- Иван Шихалев
- энтузиаст
- Сообщения: 1138
- Зарегистрирован: 15.05.2006 11:26:13
- Откуда: Екатеринбург
- Контактная информация:
-
Oleg N. Cher
- незнакомец
- Сообщения: 3
- Зарегистрирован: 16.09.2007 23:40:36
2noch: Советую ознакомиться с технологией Juice, там использовано промежуточное представление программ в виде так называемых плоских бинарников (slim binaries), более компактное, чем машинный код многих процессоров. Начать можно с диссертации Михаэля Франца "Динамическая кодогенерация – ключ к переносимому программному обеспечению" http://www.uni-vologda.ac.ru/oberon/infoart/otherfly.htm.
