METODO Y APARATO PARA COMPILAR CODIGOS

A compiler framework comprises a generic compiler back end which may be used by a plurality of front ends to generate object code for a target computer system. Each front end scans and parses a source module containing source code for a programming language, and generates an intermediate language re...

Ausführliche Beschreibung

Gespeichert in:
Bibliographische Detailangaben
1. Verfasser: ROBERT NEIL FAIMAN, JR
Format: Patent
Sprache:spa
Schlagworte:
Online-Zugang:Volltext bestellen
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
Beschreibung
Zusammenfassung:A compiler framework comprises a generic compiler back end which may be used by a plurality of front ends to generate object code for a target computer system. Each front end scans and parses a source module containing source code for a programming language, and generates an intermediate language representation that describes the source code. The intermediate language representation is input to the generic compiler back end which performs optimization and code generation for a plurality of target computer systems. "Constant folding" optimization is performed by the generic compiler back end, and comprises finding occurrences of expressions that can be reduced to a constant and calculated at compile time rather than at runtime. One mechanism for performing constant folding, also referred to as K-folding, uses a KFOLD routine that is built by the compiler framework. The KFOLD routine is constructed using a special front end that produces an intermediate language representation of the KFOLD routine which may be used by the generic back end to produce a corresponding object file for one of a plurality of target computer systems. The special front end produces the intermediate language representation for the KFOLD routine using as input the intermediate language comprising intermediate language operators.