Re: [Mesa-dev] [PATCH 5/5] glcpp: Avoid unnecessary call to strlen

2017-09-14 Thread Thomas Helland
2017-09-14 3:29 GMT+02:00 Ian Romanick : > On 09/11/2017 01:21 PM, Thomas Helland wrote: >> Length of the token was already calculated by flex and stored in yyleng, >> no need to implicitly call strlen() via linear_strdup(). >> >> Reviewed-by: Nicolai Hähnle >> Reviewed-by: Timothy Arceri >> >> V

Re: [Mesa-dev] [PATCH 5/5] glcpp: Avoid unnecessary call to strlen

2017-09-14 Thread Thomas Helland
2017-09-14 3:32 GMT+02:00 Ian Romanick : > On 09/11/2017 01:21 PM, Thomas Helland wrote: >> @@ -621,12 +636,17 @@ u64vec4 KEYWORD_WITH_ALT(0, 0, 0, 0, >> yyextra->ARB_gpu_shader_int64_enable, U64V >> [_a-zA-Z][_a-zA-Z0-9]* { >> struct _mesa_glsl_parse_state

Re: [Mesa-dev] [PATCH 5/5] glcpp: Avoid unnecessary call to strlen

2017-09-13 Thread Ian Romanick
On 09/11/2017 01:21 PM, Thomas Helland wrote: > @@ -621,12 +636,17 @@ u64vec4 KEYWORD_WITH_ALT(0, 0, 0, 0, > yyextra->ARB_gpu_shader_int64_enable, U64V > [_a-zA-Z][_a-zA-Z0-9]* { > struct _mesa_glsl_parse_state *state = yyextra; >

Re: [Mesa-dev] [PATCH 5/5] glcpp: Avoid unnecessary call to strlen

2017-09-13 Thread Ian Romanick
On 09/11/2017 01:21 PM, Thomas Helland wrote: > Length of the token was already calculated by flex and stored in yyleng, > no need to implicitly call strlen() via linear_strdup(). > > Reviewed-by: Nicolai Hähnle > Reviewed-by: Timothy Arceri > > V2: Also convert this pattern in glsl_lexer.ll >

[Mesa-dev] [PATCH 5/5] glcpp: Avoid unnecessary call to strlen

2017-09-11 Thread Thomas Helland
Length of the token was already calculated by flex and stored in yyleng, no need to implicitly call strlen() via linear_strdup(). Reviewed-by: Nicolai Hähnle Reviewed-by: Timothy Arceri V2: Also convert this pattern in glsl_lexer.ll V3: Remove a misplaced comment Fix compile warning from V