发明名称 Context-sensitive compiler directives
摘要 Methods, systems and computer program products are provided for creating and compiling source program code using one or more compiler directives a programming environment. The compiler directives may provide information on how to compile the source program code. The compiler directives may apply to the source program code under a given condition. The compiler directive may appear at the second or lower level of the source program code. The present invention may also provide a compiler that can determine the given condition of the source program code and apply the compiler directives based upon the determination of the given condition.
申请公布号 US8762974(B1) 申请公布日期 2014.06.24
申请号 US200511173414 申请日期 2005.06.30
申请人 The MathWorks, Inc. 发明人 Smith Frederick Mattsson;Bottema Alexander Jean-Claude;Ren Yao
分类号 G06F9/45 主分类号 G06F9/45
代理机构 Nelson Mullins Riley & Scarborough LLP 代理人 Nelson Mullins Riley & Scarborough LLP
主权项 1. In a computational device providing a programming environment, a method comprising: providing a compiler directive; creating a program using the compiler directive, the creating comprising: embedding the compiler directive in the program, where the compiler directive: is embedded in the program prior to a compile-time analysis,appears in the program in combination with a condition associated with a function or a unit of the program, andis applied to the program during compilation of the program when the condition is satisfied; performing the compile-time analysis of the program; predicting a run-time behavior of the program based on the compile-time analysis; evaluating the condition based on the predicted run-time behavior of the program; determining whether to apply the compiler directive to the program, the determining comprising: determining that the condition is satisfied,applying the compiler directive to the program, the applying based upon the determining that the condition is satisfied, andproviding, via the compiler directive, a command, the command specifying how to compile the program based on the predicted run-time behavior of the program, where: the command is provided subsequent to the compile-time analysis; and generating, using the program, a compiled program based on the runtime analysis.
地址 Natick MA US