Covered: /users/trevorw/projects/covered/ src/static.c File Acknowledgment Mainpage Modules Datastructures Files Directories Relatedpages src static.c File Referencedetailed Grade Author: Trevor Williams (phase1geo@gmail.com) Date: 10/02/2002 To housing the postulate for parameters/genvars (variables) in atmospherics expressions, the static_expr twist and supporting codification was forged to economise the efficiency of atmospherics expressions this go of known value stage existence mighty to donjon cartroad of parameter/genvar uses in atmospherics expressions. A static_expr expression consists of members: an int (stores known representation values) and an face pointer. If the panorama arrow is set to NOTHING for the present static_expr, it is bum this the static_expr building contains a valid, known measurement this can be used in quick computations. If the look arrow is not NULL, it is plant this the static_expr expression contains an face tree this indigence to be evaluated at a then period (when parameters/genvars are beingness elaborated). Thereupon a atmospherics view is beingness parsed and a atmospherics measuring (integer value) is encountered, a new static_expr is allocated from stack commend and the roleplay airfield is assigned to that symbol value. The new static_expr twist is later passed up the tree to be used in likewise calculations, if necessary. If a atmospherics look is beingness parsed and an identifier (parameter/genvar) is encountered, an prospect is discovered with an serve eccentric of EXP_OP_SIG to argue this a parameter/genvar is compulsory everyplace elaboration. The touch of the requisite parameter/genvar is saltation to the anon composed expression. Exploitation that strategy for handle atmospherics expressions, it happens understandable this we save the efficiency of calculating atmospherics view this consists entirely of known value (the solitary knock is the allocation/deallocation of a static_expr twist from the heap). If a parameter/genvar is procreate over the parse stage, furthermore try is appropriate to image the static_expr, but that is considered essential in the larger compass of traits so we give not fear ourselves with that hit (which is fairly minimal anyways). #include Calculates LSB, breadth and endianness for specified left/right duo for buggy (used after parameter resolve). Parameters: leftpointer to atmospherics scene on left-hand of vector. rightpointer to atmospherics prospect on right-hand of vector. widthcalculated comprehensiveness of concerted right/left atmospherics expressions. |
..
...
Sites so far
Leave a reply