Add top-level productions to language reference.

This commit is contained in:
Jakob Stoklund Olesen
2016-04-28 12:57:40 -07:00
parent 8067a17977
commit 716b427cb1

View File

@@ -1,6 +1,6 @@
**************************************** ***************************
Cretonne Intermediate Language Reference Cretonne Language Reference
**************************************** ***************************
.. default-domain:: cton .. default-domain:: cton
.. highlight:: cton .. highlight:: cton
@@ -45,6 +45,15 @@ After the preample follows the :term:`function body` which consists of
block`. Every EBB ends with a :term:`terminator instruction`, so execution can block`. Every EBB ends with a :term:`terminator instruction`, so execution can
never fall through to the next EBB without an explicit branch. never fall through to the next EBB without an explicit branch.
A ``.cton`` file consists of a sequence of independent function definitions:
.. productionlist::
function-list : { function }
function : function-spec "{" preample function-body "}"
function-spec : "function" function-name signature
preamble : { preamble-decl }
function-body : { extended-basic-block }
Static single assignment form Static single assignment form
----------------------------- -----------------------------