@@ -1068,8 +1068,8 @@ pub fn (mut g Gen) write_typeof_functions() {
1068
1068
if sum_info.is_generic {
1069
1069
continue
1070
1070
}
1071
- g.writeln ('/*C1*/ ${static_prefix} char * v_typeof_sumtype_${sym.cname} (int sidx) {' )
1072
- g.definitions.writeln ('/*C1*/ ${static_prefix} char * v_typeof_sumtype_${sym.cname} (int);' )
1071
+ g.writeln ('${static_prefix} char * v_typeof_sumtype_${sym.cname} (int sidx) {' )
1072
+ g.definitions.writeln ('${static_prefix} char * v_typeof_sumtype_${sym.cname} (int);' )
1073
1073
if g.pref.build_mode == .build_module {
1074
1074
g.writeln ('\t\t if( sidx == _v_type_idx_${sym.cname} () ) return "${util.strip_main_name(sym.name)} ";' )
1075
1075
for v in sum_info.variants {
@@ -2554,7 +2554,7 @@ fn (mut g Gen) get_sumtype_casting_fn(got_ ast.Type, exp_ ast.Type) string {
2554
2554
}
2555
2555
g.sumtype_definitions[i] = true
2556
2556
g.sumtype_casting_fns << SumtypeCastingFn{
2557
- fn_name: fn_name + '/*ISEE*/'
2557
+ fn_name: fn_name
2558
2558
got: if got_.has_flag (.option) {
2559
2559
new_got := ast.idx_to_type (got_sym.idx).set_flag (.option)
2560
2560
new_got
@@ -2785,7 +2785,7 @@ fn (mut g Gen) expr_with_cast(expr ast.Expr, got_type_raw ast.Type, expected_typ
2785
2785
// Do not allocate for `Interface(unsafe{nil})` casts
2786
2786
is_nil_cast := expr is ast.UnsafeExpr && expr.expr is ast.Nil
2787
2787
if is_nil_cast {
2788
- g.write2 ( '/*nil*/' , '((void*)0)' )
2788
+ g.write ( '((void*)0)' )
2789
2789
return
2790
2790
}
2791
2791
}
@@ -2842,9 +2842,7 @@ fn (mut g Gen) expr_with_cast(expr ast.Expr, got_type_raw ast.Type, expected_typ
2842
2842
unwrapped_got_sym = g.table.sym (unwrapped_got_type)
2843
2843
}
2844
2844
2845
- fname := g.get_sumtype_casting_fn (unwrapped_got_type, unwrapped_expected_type) +
2846
- '/*Q*/'
2847
-
2845
+ fname := g.get_sumtype_casting_fn (unwrapped_got_type, unwrapped_expected_type)
2848
2846
if expr is ast.ArrayInit && got_sym.kind == .array_fixed {
2849
2847
stmt_str := g.go_before_last_stmt ().trim_space ()
2850
2848
g.empty_line = true
@@ -3224,7 +3222,7 @@ fn (mut g Gen) gen_clone_assignment(var_type ast.Type, val ast.Expr, typ ast.Typ
3224
3222
is_sumtype := g.table.type_kind (var_type) == .sum_type
3225
3223
if is_sumtype {
3226
3224
variant_typ := g.styp (typ).replace ('*' , '' )
3227
- fn_name := g.get_sumtype_casting_fn (typ, var_type) + '/*L*/'
3225
+ fn_name := g.get_sumtype_casting_fn (typ, var_type)
3228
3226
g.write ('${fn_name} (ADDR(${variant_typ} , array_clone_static_to_depth(' )
3229
3227
if typ.is_ptr () {
3230
3228
g.write ('*' )
0 commit comments