@@ -338,7 +338,7 @@ fn (mut g Gen) array_init_with_fields(node ast.ArrayInit, elem_type Type, is_amp
338338 g.write2 ('(${elem_styp }[]){' , g.type_default (node.elem_type))
339339 g.write ('}[0], ${depth })' )
340340 } else if node.has_len && node.elem_type == ast.string_type {
341- g.write2 ('&(${elem_styp }[]){' , '_SLIT ("")' )
341+ g.write2 ('&(${elem_styp }[]){' , '_S ("")' )
342342 g.write ('})' )
343343 } else if node.has_len && elem_type.unaliased_sym.kind in [.array, .map ] {
344344 g.write2 ('(voidptr)&(${elem_styp }[]){' , g.type_default (node.elem_type))
@@ -447,7 +447,7 @@ fn (mut g Gen) array_init_with_fields(node ast.ArrayInit, elem_type Type, is_amp
447447 g.expr_with_opt (ast.None{}, ast.none_type, node.elem_type)
448448 g.write (')' )
449449 } else if node.has_len && node.elem_type == ast.string_type {
450- g.write2 ('&(${elem_styp }[]){' , '_SLIT ("")' )
450+ g.write2 ('&(${elem_styp }[]){' , '_S ("")' )
451451 g.write ('})' )
452452 } else if node.has_len && elem_type.unaliased_sym.kind in [.struct , .array, .map ] {
453453 g.write2 ('(voidptr)&(${elem_styp }[]){' , g.type_default (node.elem_type))
@@ -743,7 +743,7 @@ fn (mut g Gen) gen_array_sort(node ast.CallExpr) {
743743 verror ('.sort() is an array method or a fixed array method' )
744744 }
745745 if g.pref.is_bare {
746- g.writeln ('bare_panic(_SLIT ("sort does not work with -freestanding"))' )
746+ g.writeln ('bare_panic(_S ("sort does not work with -freestanding"))' )
747747 return
748748 }
749749 left_is_array := rec_sym.kind == .array
@@ -825,7 +825,7 @@ fn (mut g Gen) gen_array_sort(node ast.CallExpr) {
825825 }
826826
827827 stype_arg := g.styp (elem_type)
828- g.sort_fn_definitions.writeln ('VV_LOCAL_SYMBOL ${g .static_modifier } int ${compare_fn }(${stype_arg }* a, ${stype_arg }* b) {' )
828+ g.sort_fn_definitions.writeln ('VV_LOC ${g .static_modifier } int ${compare_fn }(${stype_arg }* a, ${stype_arg }* b) {' )
829829 c_condition := if comparison_type.sym.has_method ('<' ) {
830830 '${g .styp (comparison_type .typ )}__lt(${left_expr }, ${right_expr })'
831831 } else if comparison_type.unaliased_sym.has_method ('<' ) {
@@ -1159,7 +1159,7 @@ fn (mut g Gen) gen_array_contains_methods() {
11591159 left_type_str = 'Array_voidptr'
11601160 elem_type_str = 'voidptr'
11611161 }
1162- g.type_definitions.writeln ('${g .static_non_parallel }bool ${fn_name }(${left_type_str } a, ${elem_type_str } v); // auto ' )
1162+ g.type_definitions.writeln ('${g .static_non_parallel }bool ${fn_name }(${left_type_str } a, ${elem_type_str } v);' )
11631163 fn_builder.writeln ('${g .static_non_parallel }bool ${fn_name }(${left_type_str } a, ${elem_type_str } v) {' )
11641164 fn_builder.writeln ('\t for (int i = 0; i < a.len; ++i) {' )
11651165 if elem_kind == .string {
@@ -1201,7 +1201,7 @@ fn (mut g Gen) gen_array_contains_methods() {
12011201 if elem_kind == .function {
12021202 elem_type_str = 'voidptr'
12031203 }
1204- g.type_definitions.writeln ('${g .static_non_parallel }bool ${fn_name }(${left_type_str } a, ${elem_type_str } v); // auto ' )
1204+ g.type_definitions.writeln ('${g .static_non_parallel }bool ${fn_name }(${left_type_str } a, ${elem_type_str } v);' )
12051205 fn_builder.writeln ('${g .static_non_parallel }bool ${fn_name }(${left_type_str } a, ${elem_type_str } v) {' )
12061206 fn_builder.writeln ('\t for (int i = 0; i < ${size }; ++i) {' )
12071207 if elem_kind == .string {
@@ -1307,7 +1307,7 @@ fn (mut g Gen) gen_array_index_methods() {
13071307 left_type_str = 'Array_voidptr'
13081308 elem_type_str = 'voidptr'
13091309 }
1310- g.type_definitions.writeln ('${g .static_non_parallel }int ${fn_name }(${left_type_str } a, ${elem_type_str } v); // auto ' )
1310+ g.type_definitions.writeln ('${g .static_non_parallel }int ${fn_name }(${left_type_str } a, ${elem_type_str } v);' )
13111311 fn_builder.writeln ('${g .static_non_parallel }int ${fn_name }(${left_type_str } a, ${elem_type_str } v) {' )
13121312 fn_builder.writeln ('\t ${elem_type_str }* pelem = a.data;' )
13131313 fn_builder.writeln ('\t for (int i = 0; i < a.len; ++i, ++pelem) {' )
@@ -1351,7 +1351,7 @@ fn (mut g Gen) gen_array_index_methods() {
13511351 if elem_sym.kind == .function {
13521352 elem_type_str = 'voidptr'
13531353 }
1354- g.type_definitions.writeln ('${g .static_non_parallel }int ${fn_name }(${left_type_str } a, ${elem_type_str } v); // auto ' )
1354+ g.type_definitions.writeln ('${g .static_non_parallel }int ${fn_name }(${left_type_str } a, ${elem_type_str } v);' )
13551355 fn_builder.writeln ('${g .static_non_parallel }int ${fn_name }(${left_type_str } a, ${elem_type_str } v) {' )
13561356 fn_builder.writeln ('\t for (int i = 0; i < ${info .size }; ++i) {' )
13571357 if elem_sym.kind == .string {
0 commit comments