Use C-style system headers in C++ code to avoid issues with std:: namespace
[mesa.git] / src / glsl / glsl_parser_extras.cpp
1 /*
2 * Copyright © 2008, 2009 Intel Corporation
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice (including the next
12 * paragraph) shall be included in all copies or substantial portions of the
13 * Software.
14 *
15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21 * DEALINGS IN THE SOFTWARE.
22 */
23 #include <stdio.h>
24 #include <stdarg.h>
25 #include <string.h>
26 #include <assert.h>
27
28 extern "C" {
29 #include "main/core.h" /* for struct gl_context */
30 }
31
32 #include "ralloc.h"
33 #include "ast.h"
34 #include "glsl_parser_extras.h"
35 #include "glsl_parser.h"
36 #include "ir_optimization.h"
37 #include "loop_analysis.h"
38
39 _mesa_glsl_parse_state::_mesa_glsl_parse_state(struct gl_context *ctx,
40 GLenum target, void *mem_ctx)
41 {
42 switch (target) {
43 case GL_VERTEX_SHADER: this->target = vertex_shader; break;
44 case GL_FRAGMENT_SHADER: this->target = fragment_shader; break;
45 case GL_GEOMETRY_SHADER: this->target = geometry_shader; break;
46 }
47
48 this->scanner = NULL;
49 this->translation_unit.make_empty();
50 this->symbols = new(mem_ctx) glsl_symbol_table;
51 this->info_log = ralloc_strdup(mem_ctx, "");
52 this->error = false;
53 this->loop_or_switch_nesting = NULL;
54
55 /* Set default language version and extensions */
56 this->language_version = 110;
57 this->es_shader = false;
58 this->ARB_texture_rectangle_enable = true;
59
60 /* OpenGL ES 2.0 has different defaults from desktop GL. */
61 if (ctx->API == API_OPENGLES2) {
62 this->language_version = 100;
63 this->es_shader = true;
64 this->ARB_texture_rectangle_enable = false;
65 }
66
67 this->extensions = &ctx->Extensions;
68
69 this->Const.MaxLights = ctx->Const.MaxLights;
70 this->Const.MaxClipPlanes = ctx->Const.MaxClipPlanes;
71 this->Const.MaxTextureUnits = ctx->Const.MaxTextureUnits;
72 this->Const.MaxTextureCoords = ctx->Const.MaxTextureCoordUnits;
73 this->Const.MaxVertexAttribs = ctx->Const.VertexProgram.MaxAttribs;
74 this->Const.MaxVertexUniformComponents = ctx->Const.VertexProgram.MaxUniformComponents;
75 this->Const.MaxVaryingFloats = ctx->Const.MaxVarying * 4;
76 this->Const.MaxVertexTextureImageUnits = ctx->Const.MaxVertexTextureImageUnits;
77 this->Const.MaxCombinedTextureImageUnits = ctx->Const.MaxCombinedTextureImageUnits;
78 this->Const.MaxTextureImageUnits = ctx->Const.MaxTextureImageUnits;
79 this->Const.MaxFragmentUniformComponents = ctx->Const.FragmentProgram.MaxUniformComponents;
80
81 this->Const.MaxDrawBuffers = ctx->Const.MaxDrawBuffers;
82
83 /* Note: Once the OpenGL 3.0 'forward compatible' context or the OpenGL 3.2
84 * Core context is supported, this logic will need change. Older versions of
85 * GLSL are no longer supported outside the compatibility contexts of 3.x.
86 */
87 this->Const.GLSL_100ES = (ctx->API == API_OPENGLES2)
88 || ctx->Extensions.ARB_ES2_compatibility;
89 this->Const.GLSL_110 = (ctx->API == API_OPENGL);
90 this->Const.GLSL_120 = (ctx->API == API_OPENGL)
91 && (ctx->Const.GLSLVersion >= 120);
92 this->Const.GLSL_130 = (ctx->API == API_OPENGL)
93 && (ctx->Const.GLSLVersion >= 130);
94
95 const unsigned lowest_version =
96 (ctx->API == API_OPENGLES2) || ctx->Extensions.ARB_ES2_compatibility
97 ? 100 : 110;
98 const unsigned highest_version =
99 (ctx->API == API_OPENGL) ? ctx->Const.GLSLVersion : 100;
100 char *supported = ralloc_strdup(this, "");
101
102 for (unsigned ver = lowest_version; ver <= highest_version; ver += 10) {
103 const char *const prefix = (ver == lowest_version)
104 ? ""
105 : ((ver == highest_version) ? ", and " : ", ");
106
107 ralloc_asprintf_append(& supported, "%s%d.%02d%s",
108 prefix,
109 ver / 100, ver % 100,
110 (ver == 100) ? " ES" : "");
111 }
112
113 this->supported_version_string = supported;
114 }
115
116 const char *
117 _mesa_glsl_shader_target_name(enum _mesa_glsl_parser_targets target)
118 {
119 switch (target) {
120 case vertex_shader: return "vertex";
121 case fragment_shader: return "fragment";
122 case geometry_shader: return "geometry";
123 }
124
125 assert(!"Should not get here.");
126 return "unknown";
127 }
128
129
130 void
131 _mesa_glsl_error(YYLTYPE *locp, _mesa_glsl_parse_state *state,
132 const char *fmt, ...)
133 {
134 va_list ap;
135
136 state->error = true;
137
138 assert(state->info_log != NULL);
139 ralloc_asprintf_append(&state->info_log, "%u:%u(%u): error: ",
140 locp->source,
141 locp->first_line,
142 locp->first_column);
143 va_start(ap, fmt);
144 ralloc_vasprintf_append(&state->info_log, fmt, ap);
145 va_end(ap);
146 ralloc_strcat(&state->info_log, "\n");
147 }
148
149
150 void
151 _mesa_glsl_warning(const YYLTYPE *locp, _mesa_glsl_parse_state *state,
152 const char *fmt, ...)
153 {
154 va_list ap;
155
156 assert(state->info_log != NULL);
157 ralloc_asprintf_append(&state->info_log, "%u:%u(%u): warning: ",
158 locp->source,
159 locp->first_line,
160 locp->first_column);
161 va_start(ap, fmt);
162 ralloc_vasprintf_append(&state->info_log, fmt, ap);
163 va_end(ap);
164 ralloc_strcat(&state->info_log, "\n");
165 }
166
167
168 bool
169 _mesa_glsl_process_extension(const char *name, YYLTYPE *name_locp,
170 const char *behavior, YYLTYPE *behavior_locp,
171 _mesa_glsl_parse_state *state)
172 {
173 enum {
174 extension_disable,
175 extension_enable,
176 extension_require,
177 extension_warn
178 } ext_mode;
179
180 if (strcmp(behavior, "warn") == 0) {
181 ext_mode = extension_warn;
182 } else if (strcmp(behavior, "require") == 0) {
183 ext_mode = extension_require;
184 } else if (strcmp(behavior, "enable") == 0) {
185 ext_mode = extension_enable;
186 } else if (strcmp(behavior, "disable") == 0) {
187 ext_mode = extension_disable;
188 } else {
189 _mesa_glsl_error(behavior_locp, state,
190 "Unknown extension behavior `%s'",
191 behavior);
192 return false;
193 }
194
195 bool unsupported = false;
196
197 if (strcmp(name, "all") == 0) {
198 if ((ext_mode == extension_enable) || (ext_mode == extension_require)) {
199 _mesa_glsl_error(name_locp, state, "Cannot %s all extensions",
200 (ext_mode == extension_enable)
201 ? "enable" : "require");
202 return false;
203 }
204 } else if (strcmp(name, "GL_ARB_draw_buffers") == 0) {
205 /* This extension is only supported in fragment shaders.
206 */
207 if (state->target != fragment_shader) {
208 unsupported = true;
209 } else {
210 state->ARB_draw_buffers_enable = (ext_mode != extension_disable);
211 state->ARB_draw_buffers_warn = (ext_mode == extension_warn);
212 }
213 } else if (strcmp(name, "GL_ARB_draw_instanced") == 0) {
214 /* This extension is only supported in vertex shaders.
215 */
216 if (state->target != vertex_shader) {
217 unsupported = true;
218 } else {
219 state->ARB_draw_instanced_enable = (ext_mode != extension_disable);
220 state->ARB_draw_instanced_warn = (ext_mode == extension_warn);
221 }
222 } else if (strcmp(name, "GL_ARB_explicit_attrib_location") == 0) {
223 state->ARB_explicit_attrib_location_enable =
224 (ext_mode != extension_disable);
225 state->ARB_explicit_attrib_location_warn =
226 (ext_mode == extension_warn);
227
228 unsupported = !state->extensions->ARB_explicit_attrib_location;
229 } else if (strcmp(name, "GL_ARB_fragment_coord_conventions") == 0) {
230 state->ARB_fragment_coord_conventions_enable =
231 (ext_mode != extension_disable);
232 state->ARB_fragment_coord_conventions_warn =
233 (ext_mode == extension_warn);
234
235 unsupported = !state->extensions->ARB_fragment_coord_conventions;
236 } else if (strcmp(name, "GL_ARB_texture_rectangle") == 0) {
237 state->ARB_texture_rectangle_enable = (ext_mode != extension_disable);
238 state->ARB_texture_rectangle_warn = (ext_mode == extension_warn);
239 } else if (strcmp(name, "GL_EXT_texture_array") == 0) {
240 state->EXT_texture_array_enable = (ext_mode != extension_disable);
241 state->EXT_texture_array_warn = (ext_mode == extension_warn);
242
243 unsupported = !state->extensions->EXT_texture_array;
244 } else if (strcmp(name, "GL_ARB_shader_stencil_export") == 0) {
245 if (state->target != fragment_shader) {
246 unsupported = true;
247 } else {
248 state->ARB_shader_stencil_export_enable = (ext_mode != extension_disable);
249 state->ARB_shader_stencil_export_warn = (ext_mode == extension_warn);
250 unsupported = !state->extensions->ARB_shader_stencil_export;
251 }
252 } else if (strcmp(name, "GL_AMD_conservative_depth") == 0) {
253 /* The AMD_conservative spec does not forbid requiring the extension in
254 * the vertex shader.
255 */
256 state->AMD_conservative_depth_enable = (ext_mode != extension_disable);
257 state->AMD_conservative_depth_warn = (ext_mode == extension_warn);
258 unsupported = !state->extensions->AMD_conservative_depth;
259 } else {
260 unsupported = true;
261 }
262
263 if (unsupported) {
264 static const char *const fmt = "extension `%s' unsupported in %s shader";
265
266 if (ext_mode == extension_require) {
267 _mesa_glsl_error(name_locp, state, fmt,
268 name, _mesa_glsl_shader_target_name(state->target));
269 return false;
270 } else {
271 _mesa_glsl_warning(name_locp, state, fmt,
272 name, _mesa_glsl_shader_target_name(state->target));
273 }
274 }
275
276 return true;
277 }
278
279 void
280 _mesa_ast_type_qualifier_print(const struct ast_type_qualifier *q)
281 {
282 if (q->flags.q.constant)
283 printf("const ");
284
285 if (q->flags.q.invariant)
286 printf("invariant ");
287
288 if (q->flags.q.attribute)
289 printf("attribute ");
290
291 if (q->flags.q.varying)
292 printf("varying ");
293
294 if (q->flags.q.in && q->flags.q.out)
295 printf("inout ");
296 else {
297 if (q->flags.q.in)
298 printf("in ");
299
300 if (q->flags.q.out)
301 printf("out ");
302 }
303
304 if (q->flags.q.centroid)
305 printf("centroid ");
306 if (q->flags.q.uniform)
307 printf("uniform ");
308 if (q->flags.q.smooth)
309 printf("smooth ");
310 if (q->flags.q.flat)
311 printf("flat ");
312 if (q->flags.q.noperspective)
313 printf("noperspective ");
314 }
315
316
317 void
318 ast_node::print(void) const
319 {
320 printf("unhandled node ");
321 }
322
323
324 ast_node::ast_node(void)
325 {
326 this->location.source = 0;
327 this->location.line = 0;
328 this->location.column = 0;
329 }
330
331
332 static void
333 ast_opt_array_size_print(bool is_array, const ast_expression *array_size)
334 {
335 if (is_array) {
336 printf("[ ");
337
338 if (array_size)
339 array_size->print();
340
341 printf("] ");
342 }
343 }
344
345
346 void
347 ast_compound_statement::print(void) const
348 {
349 printf("{\n");
350
351 foreach_list_const(n, &this->statements) {
352 ast_node *ast = exec_node_data(ast_node, n, link);
353 ast->print();
354 }
355
356 printf("}\n");
357 }
358
359
360 ast_compound_statement::ast_compound_statement(int new_scope,
361 ast_node *statements)
362 {
363 this->new_scope = new_scope;
364
365 if (statements != NULL) {
366 this->statements.push_degenerate_list_at_head(&statements->link);
367 }
368 }
369
370
371 void
372 ast_expression::print(void) const
373 {
374 switch (oper) {
375 case ast_assign:
376 case ast_mul_assign:
377 case ast_div_assign:
378 case ast_mod_assign:
379 case ast_add_assign:
380 case ast_sub_assign:
381 case ast_ls_assign:
382 case ast_rs_assign:
383 case ast_and_assign:
384 case ast_xor_assign:
385 case ast_or_assign:
386 subexpressions[0]->print();
387 printf("%s ", operator_string(oper));
388 subexpressions[1]->print();
389 break;
390
391 case ast_field_selection:
392 subexpressions[0]->print();
393 printf(". %s ", primary_expression.identifier);
394 break;
395
396 case ast_plus:
397 case ast_neg:
398 case ast_bit_not:
399 case ast_logic_not:
400 case ast_pre_inc:
401 case ast_pre_dec:
402 printf("%s ", operator_string(oper));
403 subexpressions[0]->print();
404 break;
405
406 case ast_post_inc:
407 case ast_post_dec:
408 subexpressions[0]->print();
409 printf("%s ", operator_string(oper));
410 break;
411
412 case ast_conditional:
413 subexpressions[0]->print();
414 printf("? ");
415 subexpressions[1]->print();
416 printf(": ");
417 subexpressions[1]->print();
418 break;
419
420 case ast_array_index:
421 subexpressions[0]->print();
422 printf("[ ");
423 subexpressions[1]->print();
424 printf("] ");
425 break;
426
427 case ast_function_call: {
428 subexpressions[0]->print();
429 printf("( ");
430
431 foreach_list_const (n, &this->expressions) {
432 if (n != this->expressions.get_head())
433 printf(", ");
434
435 ast_node *ast = exec_node_data(ast_node, n, link);
436 ast->print();
437 }
438
439 printf(") ");
440 break;
441 }
442
443 case ast_identifier:
444 printf("%s ", primary_expression.identifier);
445 break;
446
447 case ast_int_constant:
448 printf("%d ", primary_expression.int_constant);
449 break;
450
451 case ast_uint_constant:
452 printf("%u ", primary_expression.uint_constant);
453 break;
454
455 case ast_float_constant:
456 printf("%f ", primary_expression.float_constant);
457 break;
458
459 case ast_bool_constant:
460 printf("%s ",
461 primary_expression.bool_constant
462 ? "true" : "false");
463 break;
464
465 case ast_sequence: {
466 printf("( ");
467 foreach_list_const(n, & this->expressions) {
468 if (n != this->expressions.get_head())
469 printf(", ");
470
471 ast_node *ast = exec_node_data(ast_node, n, link);
472 ast->print();
473 }
474 printf(") ");
475 break;
476 }
477
478 default:
479 assert(0);
480 break;
481 }
482 }
483
484 ast_expression::ast_expression(int oper,
485 ast_expression *ex0,
486 ast_expression *ex1,
487 ast_expression *ex2)
488 {
489 this->oper = ast_operators(oper);
490 this->subexpressions[0] = ex0;
491 this->subexpressions[1] = ex1;
492 this->subexpressions[2] = ex2;
493 }
494
495
496 void
497 ast_expression_statement::print(void) const
498 {
499 if (expression)
500 expression->print();
501
502 printf("; ");
503 }
504
505
506 ast_expression_statement::ast_expression_statement(ast_expression *ex) :
507 expression(ex)
508 {
509 /* empty */
510 }
511
512
513 void
514 ast_function::print(void) const
515 {
516 return_type->print();
517 printf(" %s (", identifier);
518
519 foreach_list_const(n, & this->parameters) {
520 ast_node *ast = exec_node_data(ast_node, n, link);
521 ast->print();
522 }
523
524 printf(")");
525 }
526
527
528 ast_function::ast_function(void)
529 : is_definition(false), signature(NULL)
530 {
531 /* empty */
532 }
533
534
535 void
536 ast_fully_specified_type::print(void) const
537 {
538 _mesa_ast_type_qualifier_print(& qualifier);
539 specifier->print();
540 }
541
542
543 void
544 ast_parameter_declarator::print(void) const
545 {
546 type->print();
547 if (identifier)
548 printf("%s ", identifier);
549 ast_opt_array_size_print(is_array, array_size);
550 }
551
552
553 void
554 ast_function_definition::print(void) const
555 {
556 prototype->print();
557 body->print();
558 }
559
560
561 void
562 ast_declaration::print(void) const
563 {
564 printf("%s ", identifier);
565 ast_opt_array_size_print(is_array, array_size);
566
567 if (initializer) {
568 printf("= ");
569 initializer->print();
570 }
571 }
572
573
574 ast_declaration::ast_declaration(char *identifier, int is_array,
575 ast_expression *array_size,
576 ast_expression *initializer)
577 {
578 this->identifier = identifier;
579 this->is_array = is_array;
580 this->array_size = array_size;
581 this->initializer = initializer;
582 }
583
584
585 void
586 ast_declarator_list::print(void) const
587 {
588 assert(type || invariant);
589
590 if (type)
591 type->print();
592 else
593 printf("invariant ");
594
595 foreach_list_const (ptr, & this->declarations) {
596 if (ptr != this->declarations.get_head())
597 printf(", ");
598
599 ast_node *ast = exec_node_data(ast_node, ptr, link);
600 ast->print();
601 }
602
603 printf("; ");
604 }
605
606
607 ast_declarator_list::ast_declarator_list(ast_fully_specified_type *type)
608 {
609 this->type = type;
610 this->invariant = false;
611 }
612
613 void
614 ast_jump_statement::print(void) const
615 {
616 switch (mode) {
617 case ast_continue:
618 printf("continue; ");
619 break;
620 case ast_break:
621 printf("break; ");
622 break;
623 case ast_return:
624 printf("return ");
625 if (opt_return_value)
626 opt_return_value->print();
627
628 printf("; ");
629 break;
630 case ast_discard:
631 printf("discard; ");
632 break;
633 }
634 }
635
636
637 ast_jump_statement::ast_jump_statement(int mode, ast_expression *return_value)
638 {
639 this->mode = ast_jump_modes(mode);
640
641 if (mode == ast_return)
642 opt_return_value = return_value;
643 }
644
645
646 void
647 ast_selection_statement::print(void) const
648 {
649 printf("if ( ");
650 condition->print();
651 printf(") ");
652
653 then_statement->print();
654
655 if (else_statement) {
656 printf("else ");
657 else_statement->print();
658 }
659
660 }
661
662
663 ast_selection_statement::ast_selection_statement(ast_expression *condition,
664 ast_node *then_statement,
665 ast_node *else_statement)
666 {
667 this->condition = condition;
668 this->then_statement = then_statement;
669 this->else_statement = else_statement;
670 }
671
672
673 void
674 ast_iteration_statement::print(void) const
675 {
676 switch (mode) {
677 case ast_for:
678 printf("for( ");
679 if (init_statement)
680 init_statement->print();
681 printf("; ");
682
683 if (condition)
684 condition->print();
685 printf("; ");
686
687 if (rest_expression)
688 rest_expression->print();
689 printf(") ");
690
691 body->print();
692 break;
693
694 case ast_while:
695 printf("while ( ");
696 if (condition)
697 condition->print();
698 printf(") ");
699 body->print();
700 break;
701
702 case ast_do_while:
703 printf("do ");
704 body->print();
705 printf("while ( ");
706 if (condition)
707 condition->print();
708 printf("); ");
709 break;
710 }
711 }
712
713
714 ast_iteration_statement::ast_iteration_statement(int mode,
715 ast_node *init,
716 ast_node *condition,
717 ast_expression *rest_expression,
718 ast_node *body)
719 {
720 this->mode = ast_iteration_modes(mode);
721 this->init_statement = init;
722 this->condition = condition;
723 this->rest_expression = rest_expression;
724 this->body = body;
725 }
726
727
728 void
729 ast_struct_specifier::print(void) const
730 {
731 printf("struct %s { ", name);
732 foreach_list_const(n, &this->declarations) {
733 ast_node *ast = exec_node_data(ast_node, n, link);
734 ast->print();
735 }
736 printf("} ");
737 }
738
739
740 ast_struct_specifier::ast_struct_specifier(char *identifier,
741 ast_node *declarator_list)
742 {
743 if (identifier == NULL) {
744 static unsigned anon_count = 1;
745 identifier = ralloc_asprintf(this, "#anon_struct_%04x", anon_count);
746 anon_count++;
747 }
748 name = identifier;
749 this->declarations.push_degenerate_list_at_head(&declarator_list->link);
750 }
751
752 bool
753 do_common_optimization(exec_list *ir, bool linked, unsigned max_unroll_iterations)
754 {
755 GLboolean progress = GL_FALSE;
756
757 progress = lower_instructions(ir, SUB_TO_ADD_NEG) || progress;
758
759 if (linked) {
760 progress = do_function_inlining(ir) || progress;
761 progress = do_dead_functions(ir) || progress;
762 }
763 progress = do_structure_splitting(ir) || progress;
764 progress = do_if_simplification(ir) || progress;
765 progress = do_discard_simplification(ir) || progress;
766 progress = do_copy_propagation(ir) || progress;
767 /*progress = do_copy_propagation_elements(ir) || progress;*/
768 if (linked)
769 progress = do_dead_code(ir) || progress;
770 else
771 progress = do_dead_code_unlinked(ir) || progress;
772 progress = do_dead_code_local(ir) || progress;
773 progress = do_tree_grafting(ir) || progress;
774 progress = do_constant_propagation(ir) || progress;
775 if (linked)
776 progress = do_constant_variable(ir) || progress;
777 else
778 progress = do_constant_variable_unlinked(ir) || progress;
779 progress = do_constant_folding(ir) || progress;
780 progress = do_algebraic(ir) || progress;
781 progress = do_lower_jumps(ir) || progress;
782 progress = do_vec_index_to_swizzle(ir) || progress;
783 progress = do_swizzle_swizzle(ir) || progress;
784 progress = do_noop_swizzle(ir) || progress;
785
786 progress = optimize_redundant_jumps(ir) || progress;
787
788 loop_state *ls = analyze_loop_variables(ir);
789 if (ls->loop_found) {
790 progress = set_loop_controls(ir, ls) || progress;
791 progress = unroll_loops(ir, ls, max_unroll_iterations) || progress;
792 }
793 delete ls;
794
795 return progress;
796 }
797
798 extern "C" {
799
800 /**
801 * To be called at GL teardown time, this frees compiler datastructures.
802 *
803 * After calling this, any previously compiled shaders and shader
804 * programs would be invalid. So this should happen at approximately
805 * program exit.
806 */
807 void
808 _mesa_destroy_shader_compiler(void)
809 {
810 _mesa_destroy_shader_compiler_caches();
811
812 _mesa_glsl_release_types();
813 }
814
815 /**
816 * Releases compiler caches to trade off performance for memory.
817 *
818 * Intended to be used with glReleaseShaderCompiler().
819 */
820 void
821 _mesa_destroy_shader_compiler_caches(void)
822 {
823 _mesa_glsl_release_functions();
824 }
825
826 }