On Tue, 2015-11-10 at 12:33 +0000, Emil Velikov wrote: > On 8 November 2015 at 22:34, Timothy Arceri <t_arc...@yahoo.com.au> wrote: > > From: Timothy Arceri <timothy.arc...@collabora.com> > > > > This helper is similar to the function added as part of the > > ast_layout_expression class but will be used when only the > > ast_expression type is required for the qualifier. > > > > ast_expression is used if qualifier can't have mulitple declorations > typo "multiple declarations" > > > or if all but he newest qualifier is simply ignored. > "the" > > What is stopping us from introducing this helper first and then > reusing it ? Currently we end up with exact same code twice. > Also I'm struggling to see the function declaration - perhaps we > should just annotate it as static ?
The difference is one processes ast_expression the other processes the new ast_layout_expression type, the reason for the difference is in how the qualifiers are merged. The ast_layout_expression type includes the addition of a list to keep track of of multiple declarations for merging. Where ast_expression is used the rules are different and we can just use the last declared qualifier and throw away any previous one which makes processsing a little simpler. I could make it so everything just uses the new ast_layout_expression type I just wasn't sure what was the best way to do this, so sent the patches with the two functions to see what people would think on review. > > Thanks > Emil _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev