-
Notifications
You must be signed in to change notification settings - Fork 2
/
convCC.go
9549 lines (8817 loc) · 438 KB
/
convCC.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// This code is transcompiled by LuneScript.
package lnsc
import . "github.com/ifritJP/LuneScript/src/lune/base/runtime_go"
var init_convCC bool
var convCC__mod__ string
// decl enum -- ConvMode
type ConvCC_ConvMode = LnsInt
const ConvCC_ConvMode__ConvMeta = 2
const ConvCC_ConvMode__Convert = 1
const ConvCC_ConvMode__Exec = 0
var ConvCC_ConvModeList_ = NewLnsList( []LnsAny {
ConvCC_ConvMode__Exec,
ConvCC_ConvMode__Convert,
ConvCC_ConvMode__ConvMeta,
})
func ConvCC_ConvMode_get__allList() *LnsList{
return ConvCC_ConvModeList_
}
var ConvCC_ConvModeMap_ = map[LnsInt]string {
ConvCC_ConvMode__ConvMeta: "ConvMode.ConvMeta",
ConvCC_ConvMode__Convert: "ConvMode.Convert",
ConvCC_ConvMode__Exec: "ConvMode.Exec",
}
func ConvCC_ConvMode__from(arg1 LnsInt) LnsAny{
if _, ok := ConvCC_ConvModeMap_[arg1]; ok { return arg1 }
return nil
}
func ConvCC_ConvMode_getTxt(arg1 LnsInt) string {
return ConvCC_ConvModeMap_[arg1];
}
// decl enum -- ValKind
type convCC_ValKind = LnsInt
const convCC_ValKind__Any = 1
const convCC_ValKind__Other = 5
const convCC_ValKind__Prim = 0
const convCC_ValKind__Stem = 3
const convCC_ValKind__StemWork = 2
const convCC_ValKind__Var = 4
var convCC_ValKindList_ = NewLnsList( []LnsAny {
convCC_ValKind__Prim,
convCC_ValKind__Any,
convCC_ValKind__StemWork,
convCC_ValKind__Stem,
convCC_ValKind__Var,
convCC_ValKind__Other,
})
func convCC_ValKind_get__allList_1164_() *LnsList{
return convCC_ValKindList_
}
var convCC_ValKindMap_ = map[LnsInt]string {
convCC_ValKind__Any: "ValKind.Any",
convCC_ValKind__Other: "ValKind.Other",
convCC_ValKind__Prim: "ValKind.Prim",
convCC_ValKind__Stem: "ValKind.Stem",
convCC_ValKind__StemWork: "ValKind.StemWork",
convCC_ValKind__Var: "ValKind.Var",
}
func convCC_ValKind__from_1157_(arg1 LnsInt) LnsAny{
if _, ok := convCC_ValKindMap_[arg1]; ok { return arg1 }
return nil
}
func convCC_ValKind_getTxt(arg1 LnsInt) string {
return convCC_ValKindMap_[arg1];
}
// decl enum -- ProcessMode
type convCC_ProcessMode = LnsInt
const convCC_ProcessMode__DefClass = 6
const convCC_ProcessMode__DefWrap = 10
const convCC_ProcessMode__Form = 7
const convCC_ProcessMode__Immediate = 8
const convCC_ProcessMode__Include = 0
const convCC_ProcessMode__InitFuncSym = 9
const convCC_ProcessMode__InitModule = 3
const convCC_ProcessMode__Intermediate = 4
const convCC_ProcessMode__Prototype = 1
const convCC_ProcessMode__StringFormat = 5
const convCC_ProcessMode__WideScopeVer = 2
var convCC_ProcessModeList_ = NewLnsList( []LnsAny {
convCC_ProcessMode__Include,
convCC_ProcessMode__Prototype,
convCC_ProcessMode__WideScopeVer,
convCC_ProcessMode__InitModule,
convCC_ProcessMode__Intermediate,
convCC_ProcessMode__StringFormat,
convCC_ProcessMode__DefClass,
convCC_ProcessMode__Form,
convCC_ProcessMode__Immediate,
convCC_ProcessMode__InitFuncSym,
convCC_ProcessMode__DefWrap,
})
func convCC_ProcessMode_get__allList_1213_() *LnsList{
return convCC_ProcessModeList_
}
var convCC_ProcessModeMap_ = map[LnsInt]string {
convCC_ProcessMode__DefClass: "ProcessMode.DefClass",
convCC_ProcessMode__DefWrap: "ProcessMode.DefWrap",
convCC_ProcessMode__Form: "ProcessMode.Form",
convCC_ProcessMode__Immediate: "ProcessMode.Immediate",
convCC_ProcessMode__Include: "ProcessMode.Include",
convCC_ProcessMode__InitFuncSym: "ProcessMode.InitFuncSym",
convCC_ProcessMode__InitModule: "ProcessMode.InitModule",
convCC_ProcessMode__Intermediate: "ProcessMode.Intermediate",
convCC_ProcessMode__Prototype: "ProcessMode.Prototype",
convCC_ProcessMode__StringFormat: "ProcessMode.StringFormat",
convCC_ProcessMode__WideScopeVer: "ProcessMode.WideScopeVer",
}
func convCC_ProcessMode__from_1206_(arg1 LnsInt) LnsAny{
if _, ok := convCC_ProcessModeMap_[arg1]; ok { return arg1 }
return nil
}
func convCC_ProcessMode_getTxt(arg1 LnsInt) string {
return convCC_ProcessModeMap_[arg1];
}
// decl enum -- Out2HMode
type convCC_Out2HMode = LnsInt
const convCC_Out2HMode__HeaderPri = 1
const convCC_Out2HMode__HeaderPub = 0
const convCC_Out2HMode__SourcePri = 3
const convCC_Out2HMode__SourcePub = 2
var convCC_Out2HModeList_ = NewLnsList( []LnsAny {
convCC_Out2HMode__HeaderPub,
convCC_Out2HMode__HeaderPri,
convCC_Out2HMode__SourcePub,
convCC_Out2HMode__SourcePri,
})
func convCC_Out2HMode_get__allList_1515_() *LnsList{
return convCC_Out2HModeList_
}
var convCC_Out2HModeMap_ = map[LnsInt]string {
convCC_Out2HMode__HeaderPri: "Out2HMode.HeaderPri",
convCC_Out2HMode__HeaderPub: "Out2HMode.HeaderPub",
convCC_Out2HMode__SourcePri: "Out2HMode.SourcePri",
convCC_Out2HMode__SourcePub: "Out2HMode.SourcePub",
}
func convCC_Out2HMode__from_1508_(arg1 LnsInt) LnsAny{
if _, ok := convCC_Out2HModeMap_[arg1]; ok { return arg1 }
return nil
}
func convCC_Out2HMode_getTxt(arg1 LnsInt) string {
return convCC_Out2HModeMap_[arg1];
}
// decl enum -- FuncWrap
type convCC_FuncWrap = LnsInt
const convCC_FuncWrap__CallWrap = 1
const convCC_FuncWrap__NilWrap = 2
const convCC_FuncWrap__Normal = 0
var convCC_FuncWrapList_ = NewLnsList( []LnsAny {
convCC_FuncWrap__Normal,
convCC_FuncWrap__CallWrap,
convCC_FuncWrap__NilWrap,
})
func convCC_FuncWrap_get__allList_2008_() *LnsList{
return convCC_FuncWrapList_
}
var convCC_FuncWrapMap_ = map[LnsInt]string {
convCC_FuncWrap__CallWrap: "FuncWrap.CallWrap",
convCC_FuncWrap__NilWrap: "FuncWrap.NilWrap",
convCC_FuncWrap__Normal: "FuncWrap.Normal",
}
func convCC_FuncWrap__from_2001_(arg1 LnsInt) LnsAny{
if _, ok := convCC_FuncWrapMap_[arg1]; ok { return arg1 }
return nil
}
func convCC_FuncWrap_getTxt(arg1 LnsInt) string {
return convCC_FuncWrapMap_[arg1];
}
var convCC_cTypeInt string
var convCC_cTypeReal string
var convCC_cTypeBool string
var convCC_cTypeStem string
var convCC_cTypeAny string
var convCC_cTypeAnyP string
var convCC_cTypeAnyPP string
var convCC_cTypeEnvP string
var convCC_cTypeVarP string
var convCC_cTypeMod string
var convCC_cTypeModP string
var convCC_cTypeBlockP string
var convCC_cValNil string
var convCC_cValNone string
var convCC_cValDDD0 string
var convCC_accessAny string
var convCC_stepIndent LnsInt
var convCC_scopeAccess LnsInt
var convCC_invalidSymbolId LnsInt
// decl alge -- DstInfo
type convCC_DstInfo = LnsAny
type convCC_DstInfo__Node struct{
Val1 *Nodes_Node
Val2 bool
}
func (self *convCC_DstInfo__Node) GetTxt() string {
return "DstInfo.Node"
}
type convCC_DstInfo__Symbol struct{
Val1 Ast_LowSymbol
Val2 LnsAny
Val3 bool
}
func (self *convCC_DstInfo__Symbol) GetTxt() string {
return "DstInfo.Symbol"
}
// decl alge -- CollectionKind
type convCC_CollectionKind = LnsAny
type convCC_CollectionKind__Array struct{
}
var convCC_CollectionKind__Array_Obj = &convCC_CollectionKind__Array{}
func (self *convCC_CollectionKind__Array) GetTxt() string {
return "CollectionKind.Array"
}
type convCC_CollectionKind__ExtArray struct{
Val1 *Ast_TypeInfo
}
func (self *convCC_CollectionKind__ExtArray) GetTxt() string {
return "CollectionKind.ExtArray"
}
type convCC_CollectionKind__ExtList struct{
Val1 *Ast_TypeInfo
}
func (self *convCC_CollectionKind__ExtList) GetTxt() string {
return "CollectionKind.ExtList"
}
type convCC_CollectionKind__ExtMap struct{
Val1 *Ast_TypeInfo
}
func (self *convCC_CollectionKind__ExtMap) GetTxt() string {
return "CollectionKind.ExtMap"
}
type convCC_CollectionKind__ExtSet struct{
Val1 *Ast_TypeInfo
}
func (self *convCC_CollectionKind__ExtSet) GetTxt() string {
return "CollectionKind.ExtSet"
}
type convCC_CollectionKind__List struct{
}
var convCC_CollectionKind__List_Obj = &convCC_CollectionKind__List{}
func (self *convCC_CollectionKind__List) GetTxt() string {
return "CollectionKind.List"
}
type convCC_CollectionKind__Map struct{
}
var convCC_CollectionKind__Map_Obj = &convCC_CollectionKind__Map{}
func (self *convCC_CollectionKind__Map) GetTxt() string {
return "CollectionKind.Map"
}
type convCC_CollectionKind__Set struct{
}
var convCC_CollectionKind__Set_Obj = &convCC_CollectionKind__Set{}
func (self *convCC_CollectionKind__Set) GetTxt() string {
return "CollectionKind.Set"
}
// decl alge -- MRetInfo
type convCC_MRetInfo = LnsAny
type convCC_MRetInfo__DDD struct{
Val1 *Nodes_ExpListNode
}
func (self *convCC_MRetInfo__DDD) GetTxt() string {
return "MRetInfo.DDD"
}
type convCC_MRetInfo__Form struct{
}
var convCC_MRetInfo__Form_Obj = &convCC_MRetInfo__Form{}
func (self *convCC_MRetInfo__Form) GetTxt() string {
return "MRetInfo.Form"
}
type convCC_MRetInfo__FormFunc struct{
Val1 *Ast_TypeInfo
}
func (self *convCC_MRetInfo__FormFunc) GetTxt() string {
return "MRetInfo.FormFunc"
}
type convCC_MRetInfo__Format struct{
Val1 string
Val2 *Nodes_ExpListNode
}
func (self *convCC_MRetInfo__Format) GetTxt() string {
return "MRetInfo.Format"
}
type convCC_MRetInfo__Func struct{
Val1 *Nodes_Node
}
func (self *convCC_MRetInfo__Func) GetTxt() string {
return "MRetInfo.Func"
}
type convCC_MRetInfo__Method struct{
Val1 *Ast_TypeInfo
}
func (self *convCC_MRetInfo__Method) GetTxt() string {
return "MRetInfo.Method"
}
type convCC_processExp_1881_ func ()
type convCC_process2stemCallback_2057_ func ()
type convCC_outputMacroStmtBlock_2219_ func ()
type convCC_processRValue_2298_ func ()
type convCC_ProcessToValForm_2538_ func (arg1 LnsInt)
// for 5418: ExpCast
func conv2Form24646( src func ()) LnsForm {
return func (argList []LnsAny) []LnsAny {
src()
return []LnsAny{}
}
}
// for 362
func convCC_convExp854(arg1 []LnsAny) string {
return Lns_getFromMulti( arg1, 0 ).(string)
}
// for 367
func convCC_convExp921(arg1 []LnsAny) string {
return Lns_getFromMulti( arg1, 0 ).(string)
}
// for 10418
func convCC_convExp44566(arg1 []LnsAny) string {
return Lns_getFromMulti( arg1, 0 ).(string)
}
// for 1648
func convCC_convExp7159(arg1 []LnsAny) string {
return Lns_getFromMulti( arg1, 0 ).(string)
}
// for 1986
func convCC_convExp9783(arg1 []LnsAny) string {
return Lns_getFromMulti( arg1, 0 ).(string)
}
// for 4768
func convCC_convExp22105(arg1 []LnsAny) string {
return Lns_getFromMulti( arg1, 0 ).(string)
}
// for 6230
func convCC_convExp27618(arg1 []LnsAny) string {
return Lns_getFromMulti( arg1, 0 ).(string)
}
// for 6408
func convCC_convExp28558(arg1 []LnsAny) string {
return Lns_getFromMulti( arg1, 0 ).(string)
}
// for 6409
func convCC_convExp28572(arg1 []LnsAny) string {
return Lns_getFromMulti( arg1, 0 ).(string)
}
// for 10779
func convCC_convExp46442(arg1 []LnsAny) string {
return Lns_getFromMulti( arg1, 0 ).(string)
}
// for 10780
func convCC_convExp46456(arg1 []LnsAny) string {
return Lns_getFromMulti( arg1, 0 ).(string)
}
// 81: decl @lune.@base.@convCC.isClosure
func convCC_isClosure_1011_(funcType *Ast_TypeInfo) bool {
{
_scope := funcType.FP.Get_scope()
if _scope != nil {
scope := _scope.(*Ast_Scope)
return scope.FP.Get_closureSymList().Len() > 0
}
}
return false
}
// 210: decl @lune.@base.@convCC.getValKind
func convCC_getValKind_1167_(valType *Ast_TypeInfo) LnsInt {
var expType *Ast_TypeInfo
expType = valType.FP.Get_srcTypeInfo()
if expType.FP.Get_nilable(){
return convCC_ValKind__Stem
}
if _switch466 := expType.FP.Get_kind(); _switch466 == Ast_TypeInfoKind__Alternate || _switch466 == Ast_TypeInfoKind__Stem || _switch466 == Ast_TypeInfoKind__DDD || _switch466 == Ast_TypeInfoKind__Alge {
return convCC_ValKind__Stem
}
if _switch522 := expType; _switch522 == Ast_builtinTypeInt || _switch522 == Ast_builtinTypeChar {
return convCC_ValKind__Prim
} else if _switch522 == Ast_builtinTypeReal {
return convCC_ValKind__Prim
} else if _switch522 == Ast_builtinTypeBool {
return convCC_ValKind__Prim
} else {
{
_enumType := Ast_EnumTypeInfoDownCastF(expType.FP)
if _enumType != nil {
enumType := _enumType.(*Ast_EnumTypeInfo)
return convCC_getValKind_1167_(enumType.FP.Get_valTypeInfo())
}
}
return convCC_ValKind__Any
}
// insert a dummy
return 0
}
// 247: decl @lune.@base.@convCC.isStemType
func convCC_isStemType_1171_(valType *Ast_TypeInfo) bool {
return convCC_getValKind_1167_(valType) == convCC_ValKind__Stem
}
// 252: decl @lune.@base.@convCC.getRetKind
func convCC_getRetKind_1178_(retTypeList *LnsList) LnsInt {
if _switch582 := retTypeList.Len(); _switch582 == 0 {
return convCC_ValKind__Other
} else if _switch582 == 1 {
return convCC_getValKind_1167_(retTypeList.GetAt(1).(Ast_TypeInfoDownCast).ToAst_TypeInfo())
}
return convCC_ValKind__Stem
}
// 275: decl @lune.@base.@convCC.getCType
func convCC_getCType_1188_(valType *Ast_TypeInfo) string {
var expType *Ast_TypeInfo
expType = valType.FP.Get_srcTypeInfo()
if _switch697 := expType; _switch697 == Ast_builtinTypeInt || _switch697 == Ast_builtinTypeChar {
return convCC_cTypeInt
} else if _switch697 == Ast_builtinTypeReal {
return convCC_cTypeReal
} else if _switch697 == Ast_builtinTypeBool {
return convCC_cTypeBool
} else {
{
_enumType := Ast_EnumTypeInfoDownCastF(expType.FP)
if _enumType != nil {
enumType := _enumType.(*Ast_EnumTypeInfo)
return convCC_getCType_1188_(enumType.FP.Get_valTypeInfo())
}
}
if convCC_getValKind_1167_(valType) == convCC_ValKind__Any{
return convCC_cTypeAnyP
}
return convCC_cTypeStem
}
// insert a dummy
return ""
}
// 304: decl @lune.@base.@convCC.getCRetType
func convCC_getCRetType_1195_(retTypeList *LnsList) string {
if _switch736 := retTypeList.Len(); _switch736 == 0 {
return "void"
} else if _switch736 == 1 {
return convCC_getCType_1188_(retTypeList.GetAt(1).(Ast_TypeInfoDownCast).ToAst_TypeInfo())
}
return convCC_cTypeStem
}
// 316: decl @lune.@base.@convCC.getBlockName
func convCC_getBlockName_1198_(scope *Ast_Scope) string {
return Lns_getVM().String_format("pBlock_%X", []LnsAny{scope.FP.Get_scopeId()})
}
// 346: decl @lune.@base.@convCC.isClassMember
func convCC_isClassMember_1216_(symbol Ast_LowSymbol) bool {
if Lns_isCondTrue( Lns_GetEnv().PopVal( Lns_GetEnv().IncStack() ||
Lns_GetEnv().SetStackVal( Lns_GetEnv().NilAccFin(Lns_GetEnv().NilAccPush(symbol.Get_scope().FP.Get_ownerTypeInfo()) &&
Lns_NilAccCall1( Lns_GetEnv(), func () LnsAny { return Lns_GetEnv().NilAccPop().(*Ast_TypeInfo).FP.Get_kind()})) == Ast_TypeInfoKind__Class) &&
Lns_GetEnv().SetStackVal( symbol.Get_kind() == Ast_SymbolKind__Mbr) &&
Lns_GetEnv().SetStackVal( symbol.Get_staticFlag()) ).(bool)){
return true
}
return false
}
// 359: decl @lune.@base.@convCC.str2cstr
func convCC_str2cstr_1219_(txt string) string {
var work string
work = txt
if Lns_isCondTrue( Lns_car(Lns_getVM().String_find(work, "^```", nil, nil))){
work = convCC_convExp854(Lns_2DDD(Lns_getVM().String_gsub((Lns_getVM().String_format("%q", []LnsAny{Lns_getVM().String_sub(work,4, -4)})),"\\\n", "\\n")))
} else if Lns_isCondTrue( Lns_car(Lns_getVM().String_find(work, "^'", nil, nil))){
work = Lns_getVM().String_format("\"%s\"", []LnsAny{Lns_car(Lns_getVM().String_gsub((Lns_getVM().String_format("%s", []LnsAny{Lns_getVM().String_sub(work,2, -2)})),"\"", "\\\"")).(string)})
}
work = convCC_convExp921(Lns_2DDD(Lns_getVM().String_gsub(work,"\\9", "\\t")))
return work
}
// 718: decl @lune.@base.@convCC.getOrgTypeInfo
func convCC_getOrgTypeInfo_1430_(typeInfo *Ast_TypeInfo) *Ast_TypeInfo {
{
_enumType := Ast_EnumTypeInfoDownCastF(typeInfo.FP.Get_srcTypeInfo().FP.Get_nonnilableType().FP)
if _enumType != nil {
enumType := _enumType.(*Ast_EnumTypeInfo)
return enumType.FP.Get_valTypeInfo()
}
}
return typeInfo.FP.Get_srcTypeInfo().FP.Get_nonnilableType()
}
// 725: decl @lune.@base.@convCC.getAccessPrimValFromSymbolDirect
func convCC_getAccessPrimValFromSymbolDirect_1433_(symName string,valKind LnsInt,symType *Ast_TypeInfo) string {
var txt string
txt = symName
if _switch3235 := valKind; _switch3235 == convCC_ValKind__Var {
txt = txt + "->stem"
} else if _switch3235 == convCC_ValKind__Stem {
} else if _switch3235 == convCC_ValKind__Prim {
return txt
}
if _switch3290 := convCC_getOrgTypeInfo_1430_(symType); _switch3290 == Ast_builtinTypeInt || _switch3290 == Ast_builtinTypeChar {
txt = txt + ".val.intVal"
} else if _switch3290 == Ast_builtinTypeReal {
txt = txt + ".val.realVal"
} else if _switch3290 == Ast_builtinTypeBool {
txt = txt + ".val.boolVal"
}
return txt
}
// 755: decl @lune.@base.@convCC.createSymbolParam
func convCC_createSymbolParam_1436_(name string,valKind LnsInt,cTypeTxt string) *convCC_SymbolParam {
if _switch3399 := valKind; _switch3399 == convCC_ValKind__Stem {
return NewconvCC_SymbolParam(convCC_ValKind__Stem, 0, convCC_cTypeStem)
} else if _switch3399 == convCC_ValKind__Any {
return NewconvCC_SymbolParam(convCC_ValKind__Any, 0, convCC_cTypeAnyP)
} else if _switch3399 == convCC_ValKind__Prim {
return NewconvCC_SymbolParam(convCC_ValKind__Prim, 0, cTypeTxt)
} else if _switch3399 == convCC_ValKind__Other {
return NewconvCC_SymbolParam(convCC_ValKind__Other, 0, "void")
} else {
Util_err(Lns_getVM().String_format("not support %s:%s", []LnsAny{name, convCC_ValKind_getTxt( valKind)}))
}
// insert a dummy
return nil
}
// 1003: decl @lune.@base.@convCC.getLiteralStrAny
func convCC_getLiteralStrAny_1497_(txt string) string {
return Lns_getVM().String_format("lns_litStr2any( _pEnv, %s )", []LnsAny{txt})
}
// 1007: decl @lune.@base.@convCC.getLiteralStrStem
func convCC_getLiteralStrStem_1500_(txt string) string {
return Lns_getVM().String_format("LNS_STEM_ANY( %s )", []LnsAny{convCC_getLiteralStrAny_1497_(txt)})
}
// 1019: decl @lune.@base.@convCC.getOut2HeaderPrefix
func convCC_getOut2HeaderPrefix_1518_(mode LnsInt) string {
if _switch4498 := mode; _switch4498 == convCC_Out2HMode__HeaderPub {
return "extern "
} else if _switch4498 == convCC_Out2HMode__SourcePri {
return "static "
}
return ""
}
// 1213: decl @lune.@base.@convCC.processAddModuleGlobal
func convCC_processAddModuleGlobal_1639_(stream Util_SourceStream,valName string) {
stream.Writeln(Lns_getVM().String_format("lns_mtd_List_insert( _pEnv, *lns_module_globalStemList, %s );", []LnsAny{valName}))
}
// 1221: decl @lune.@base.@convCC.filter
func convCC_filter_1642_(node *Nodes_Node,filter *convCC_convFilter,parent *Nodes_Node) {
node.FP.ProcessFilter(&filter.Nodes_Filter, ConvCC_Opt2Stem(NewConvCC_Opt(parent)))
}
// 1289: decl @lune.@base.@convCC.getSymbolIndex
func convCC_getSymbolIndex_1657_(symbol *Ast_SymbolInfo) LnsInt {
var param LnsAny
{
_param := symbol.FP.Get_convModuleParam()
if _param == nil{
return 0
} else {
param = _param
}
}
return (param.(*convCC_SymbolParam)).Index
}
// 1496: decl @lune.@base.@convCC.registerBuiltin
func convCC_registerBuiltin_1761_() {
var builtin *TransUnit_BuiltinFuncType
builtin = TransUnit_getBuiltinFunc()
for _, _symbol := range( builtin.FP.Get_allSymbol().Items ) {
symbol := _symbol.(Ast_SymbolInfoDownCast).ToAst_SymbolInfo()
var param *convCC_SymbolParam
if _switch6377 := symbol.FP.Get_kind(); _switch6377 == Ast_SymbolKind__Mtd || _switch6377 == Ast_SymbolKind__Fun {
var retTypeList *LnsList
retTypeList = symbol.FP.Get_typeInfo().FP.Get_retTypeInfoList()
param = convCC_createSymbolParam_1436_(symbol.FP.Get_name(), convCC_getRetKind_1178_(retTypeList), convCC_getCRetType_1195_(retTypeList))
} else if _switch6377 == Ast_SymbolKind__Mbr || _switch6377 == Ast_SymbolKind__Var {
param = convCC_createSymbolParam_1436_(symbol.FP.Get_name(), convCC_getValKind_1167_(symbol.FP.Get_typeInfo()), convCC_getCType_1188_(symbol.FP.Get_typeInfo()))
} else {
Util_err(Lns_getVM().String_format("illeal symbol -- %s %d", []LnsAny{symbol.FP.Get_name(), 1512}))
}
symbol.FP.Set_convModuleParam(param.FP)
}
}
// 1867: decl @lune.@base.@convCC.getAccessPrimValFromStem
func convCC_getAccessPrimValFromStem_1851_(dddFlag bool,typeInfo *Ast_TypeInfo,index LnsInt) string {
var txt string
txt = ""
if dddFlag{
txt = Lns_getVM().String_format(".val.pAny->val.ddd.stemList[ %d ]", []LnsAny{index})
}
var expType *Ast_TypeInfo
{
_enumType := Ast_EnumTypeInfoDownCastF(typeInfo.FP.Get_srcTypeInfo().FP)
if _enumType != nil {
enumType := _enumType.(*Ast_EnumTypeInfo)
expType = enumType.FP.Get_valTypeInfo()
} else {
expType = typeInfo.FP.Get_srcTypeInfo()
}
}
if _switch9430 := expType; _switch9430 == Ast_builtinTypeInt || _switch9430 == Ast_builtinTypeChar {
txt = txt + ".val.intVal"
} else if _switch9430 == Ast_builtinTypeReal {
txt = txt + ".val.realVal"
} else if _switch9430 == Ast_builtinTypeBool {
txt = txt + ".val.boolVal"
} else {
if convCC_getValKind_1167_(expType) == convCC_ValKind__Any{
txt = txt + ".val.pAny"
}
}
return txt
}
// 1901: decl @lune.@base.@convCC.getAccessValFromStem
func convCC_getAccessValFromStem_1854_(typeInfo *Ast_TypeInfo) string {
var txt string
var expType *Ast_TypeInfo
{
_enumType := Ast_EnumTypeInfoDownCastF(typeInfo.FP.Get_srcTypeInfo().FP)
if _enumType != nil {
enumType := _enumType.(*Ast_EnumTypeInfo)
expType = enumType.FP.Get_valTypeInfo()
} else {
expType = typeInfo.FP.Get_srcTypeInfo()
}
}
if _switch9545 := expType; _switch9545 == Ast_builtinTypeInt || _switch9545 == Ast_builtinTypeChar {
txt = ".val.intVal"
} else if _switch9545 == Ast_builtinTypeReal {
txt = ".val.realVal"
} else if _switch9545 == Ast_builtinTypeBool {
txt = ".val.boolVal"
} else {
if convCC_getValKind_1167_(typeInfo) == convCC_ValKind__Any{
txt = convCC_accessAny
} else {
txt = ""
}
}
return txt
}
// 2095: decl @lune.@base.@convCC.getLiteral2Stem
func convCC_getLiteral2Stem_1884_(valTxt string,typeInfo *Ast_TypeInfo) string {
if _switch10290 := typeInfo.FP.Get_srcTypeInfo(); _switch10290 == Ast_builtinTypeInt || _switch10290 == Ast_builtinTypeChar {
return Lns_getVM().String_format("LNS_STEM_INT( %s )", []LnsAny{valTxt})
} else if _switch10290 == Ast_builtinTypeReal {
return Lns_getVM().String_format("LNS_STEM_REAL( %s )", []LnsAny{valTxt})
} else if _switch10290 == Ast_builtinTypeBool {
return Lns_getVM().String_format("LNS_STEM_BOOL( %s )", []LnsAny{valTxt})
} else {
return "NULL"
}
// insert a dummy
return ""
}
// 2113: decl @lune.@base.@convCC.getStemTypeId
func convCC_getStemTypeId_1887_(typeInfo *Ast_TypeInfo) string {
if typeInfo.FP.Get_nilable(){
return "lns_stem_type_none"
}
if _switch10350 := typeInfo; _switch10350 == Ast_builtinTypeInt || _switch10350 == Ast_builtinTypeChar {
return "lns_stem_type_int"
} else if _switch10350 == Ast_builtinTypeInt || _switch10350 == Ast_builtinTypeReal {
return "lns_stem_type_real"
} else if _switch10350 == Ast_builtinTypeBool {
return "lns_stem_type_bool"
} else {
return "lns_stem_type_any"
}
// insert a dummy
return ""
}
// 2133: decl @lune.@base.@convCC.getPrepareClosure
func convCC_getPrepareClosure_1894_(scopeMgr *convCC_ScopeMgr,funcName string,argNum LnsInt,hasDDD bool,symList *LnsList) string {
var txt string
txt = Lns_getVM().String_format("lns_func2any( _pEnv, (lns_closure_t *)%s, %d, %s, %d", []LnsAny{funcName, argNum, hasDDD, symList.Len()})
for _, _symbolInfo := range( symList.Items ) {
symbolInfo := _symbolInfo.(Ast_SymbolInfoDownCast).ToAst_SymbolInfo()
txt = txt + ", "
txt = txt + scopeMgr.FP.Symbol2Any(symbolInfo.FP)
}
txt = txt + ")"
return txt
}
// 2150: decl @lune.@base.@convCC.getFunc2any
func convCC_getFunc2any_1897_(moduleCtrl *convCC_ModuleCtrl,scopeMgr *convCC_ScopeMgr,funcType *Ast_TypeInfo) string {
var argList *LnsList
argList = funcType.FP.Get_argTypeInfoList()
var hasDDD bool
hasDDD = Lns_GetEnv().PopVal( Lns_GetEnv().IncStack() ||
Lns_GetEnv().SetStackVal( argList.Len() > 0) &&
Lns_GetEnv().SetStackVal( argList.GetAt(argList.Len()).(Ast_TypeInfoDownCast).ToAst_TypeInfo().FP.Get_kind() == Ast_TypeInfoKind__DDD) ||
Lns_GetEnv().SetStackVal( false) ).(bool)
return convCC_getPrepareClosure_1894_(scopeMgr, moduleCtrl.FP.GetFuncName(funcType), funcType.FP.Get_argTypeInfoList().Len(), hasDDD, (Lns_unwrap( funcType.FP.Get_scope()).(*Ast_Scope)).FP.Get_closureSymList())
}
// 2632: decl @lune.@base.@convCC.processAlgeNewProto
func convCC_processAlgeNewProto_1925_(stream Util_SourceStream,moduleCtrl *convCC_ModuleCtrl,typeInfo *Ast_TypeInfo,valInfo *Ast_AlgeValInfo) {
stream.Write(Lns_getVM().String_format("%s %s( %s _pEnv", []LnsAny{convCC_cTypeStem, moduleCtrl.FP.GetNewAlgeCName(typeInfo, valInfo.FP.Get_name()), convCC_cTypeEnvP}))
for _index, _valTypeInfo := range( valInfo.FP.Get_typeList().Items ) {
index := _index + 1
valTypeInfo := _valTypeInfo.(Ast_TypeInfoDownCast).ToAst_TypeInfo()
stream.Write(Lns_getVM().String_format(", %s _val%d", []LnsAny{convCC_getCType_1188_(valTypeInfo), index}))
}
stream.Write(")")
}
// 2646: decl @lune.@base.@convCC.processAlgePrototype
func convCC_processAlgePrototype_1928_(stream Util_SourceStream,moduleCtrl *convCC_ModuleCtrl,node *Nodes_DeclAlgeNode) {
var algeType *Ast_AlgeTypeInfo
algeType = node.FP.Get_algeType()
var valList *LnsList
valList = NewLnsList([]LnsAny{})
{
__collection12410 := algeType.FP.Get_valInfoMap()
__sorted12410 := __collection12410.CreateKeyListStr()
__sorted12410.Sort( LnsItemKindStr, nil )
for _, ___key12410 := range( __sorted12410.Items ) {
valInfo := __collection12410.Items[ ___key12410 ].(Ast_AlgeValInfoDownCast).ToAst_AlgeValInfo()
valList.Insert(Ast_AlgeValInfo2Stem(valInfo))
}
}
var process func()
process = func() {
stream.Writeln("typedef enum {")
stream.PushIndent(nil)
var enumName string
enumName = moduleCtrl.FP.GetAlgeEnumCName(node.FP.Get_expType())
for _index, _valInfo := range( valList.Items ) {
index := _index + 1
valInfo := _valInfo.(Ast_AlgeValInfoDownCast).ToAst_AlgeValInfo()
if index > 1{
stream.Writeln(",")
}
stream.Write(Lns_getVM().String_format("%s_%s", []LnsAny{enumName, valInfo.FP.Get_name()}))
}
stream.Writeln("")
stream.PopIndent()
stream.Writeln(Lns_getVM().String_format("} %s;", []LnsAny{enumName}))
for _, _valInfo := range( valList.Items ) {
valInfo := _valInfo.(Ast_AlgeValInfoDownCast).ToAst_AlgeValInfo()
if valInfo.FP.Get_typeList().Len() > 0{
stream.Writeln("typedef struct {")
stream.PushIndent(nil)
for _index, _typeInfo := range( valInfo.FP.Get_typeList().Items ) {
index := _index + 1
typeInfo := _typeInfo.(Ast_TypeInfoDownCast).ToAst_TypeInfo()
stream.Writeln(Lns_getVM().String_format("%s _val%d;", []LnsAny{convCC_getCType_1188_(typeInfo), index}))
}
stream.PopIndent()
stream.Writeln(Lns_getVM().String_format("} %s;", []LnsAny{moduleCtrl.FP.GetAlgeValStrCName(node.FP.Get_expType(), valInfo.FP.Get_name())}))
}
}
for _, _valInfo := range( valList.Items ) {
valInfo := _valInfo.(Ast_AlgeValInfoDownCast).ToAst_AlgeValInfo()
if valInfo.FP.Get_typeList().Len() > 0{
convCC_processAlgeNewProto_1925_(stream, moduleCtrl, node.FP.Get_expType(), valInfo)
stream.Writeln(";")
}
}
}
{
var processwork func(out2HMode LnsInt)
processwork = func(out2HMode LnsInt) {
if _switch12676 := out2HMode; _switch12676 == convCC_Out2HMode__HeaderPub || _switch12676 == convCC_Out2HMode__SourcePri {
process()
}
}
if Ast_isPubToExternal(node.FP.Get_expType().FP.Get_accessMode()){
stream.SwitchToHeader()
processwork(convCC_Out2HMode__HeaderPub)
stream.ReturnToSource()
processwork(convCC_Out2HMode__SourcePub)
} else {
processwork(convCC_Out2HMode__SourcePri)
}
}
stream.Writeln(Lns_getVM().String_format("static void %s( %s _pEnv );", []LnsAny{moduleCtrl.FP.GetAlgeInitCName(node.FP.Get_expType()), convCC_cTypeEnvP}))
}
// 2716: decl @lune.@base.@convCC.processAlgeWideScope
func convCC_processAlgeWideScope_1944_(stream Util_SourceStream,moduleCtrl *convCC_ModuleCtrl,node *Nodes_DeclAlgeNode) {
var algeType *Ast_AlgeTypeInfo
algeType = node.FP.Get_algeType()
var valList *LnsList
valList = NewLnsList([]LnsAny{})
{
__collection12799 := algeType.FP.Get_valInfoMap()
__sorted12799 := __collection12799.CreateKeyListStr()
__sorted12799.Sort( LnsItemKindStr, nil )
for _, ___key12799 := range( __sorted12799.Items ) {
valInfo := __collection12799.Items[ ___key12799 ].(Ast_AlgeValInfoDownCast).ToAst_AlgeValInfo()
valList.Insert(Ast_AlgeValInfo2Stem(valInfo))
}
}
var process func(out2HMode LnsInt)
process = func(out2HMode LnsInt) {
var prefix string
prefix = convCC_getOut2HeaderPrefix_1518_(out2HMode)
for _, _valInfo := range( valList.Items ) {
valInfo := _valInfo.(Ast_AlgeValInfoDownCast).ToAst_AlgeValInfo()
if valInfo.FP.Get_typeList().Len() == 0{
var varName string
varName = moduleCtrl.FP.GetAlgeValCName(node.FP.Get_expType(), valInfo.FP.Get_name())
stream.Writeln(Lns_getVM().String_format("%s%s %s;", []LnsAny{prefix, convCC_cTypeStem, varName}))
stream.Writeln(Lns_getVM().String_format("%s%s %s_any;", []LnsAny{prefix, convCC_cTypeAny, varName}))
}
}
}
{
var processwork func(out2HMode LnsInt)
processwork = func(out2HMode LnsInt) {
if _switch12940 := out2HMode; _switch12940 == convCC_Out2HMode__HeaderPub || _switch12940 == convCC_Out2HMode__SourcePri || _switch12940 == convCC_Out2HMode__SourcePub {
process(out2HMode)
}
}
if Ast_isPubToExternal(node.FP.Get_expType().FP.Get_accessMode()){
stream.SwitchToHeader()
processwork(convCC_Out2HMode__HeaderPub)
stream.ReturnToSource()
processwork(convCC_Out2HMode__SourcePub)
} else {
processwork(convCC_Out2HMode__SourcePri)
}
}
var algeTypeName string
algeTypeName = moduleCtrl.FP.GetAlgeCName(node.FP.Get_expType())
stream.Writeln(Lns_getVM().String_format("static %s %s_type2NameMap;", []LnsAny{convCC_cTypeAnyP, algeTypeName}))
}
// 2755: decl @lune.@base.@convCC.processAlgeForm
func convCC_processAlgeForm_1960_(stream Util_SourceStream,moduleCtrl *convCC_ModuleCtrl,node *Nodes_DeclAlgeNode) {
var algeType *Ast_AlgeTypeInfo
algeType = node.FP.Get_algeType()
var valList *LnsList
valList = NewLnsList([]LnsAny{})
{
__collection13067 := algeType.FP.Get_valInfoMap()
__sorted13067 := __collection13067.CreateKeyListStr()
__sorted13067.Sort( LnsItemKindStr, nil )
for _, ___key13067 := range( __sorted13067.Items ) {
valInfo := __collection13067.Items[ ___key13067 ].(Ast_AlgeValInfoDownCast).ToAst_AlgeValInfo()
valList.Insert(Ast_AlgeValInfo2Stem(valInfo))
}
}
var algeName string
algeName = moduleCtrl.FP.GetAlgeCName(&algeType.Ast_TypeInfo)
var type2NameMapName string
type2NameMapName = Lns_getVM().String_format("%s_type2NameMap", []LnsAny{algeName})
if Lns_op_not(Ast_isPubToExternal(algeType.FP.Get_accessMode())){
stream.Write("static ")
}
stream.Writeln(Lns_getVM().String_format("%s %s_get__txt( %s _pEnv, %s pAny ) {", []LnsAny{convCC_cTypeAnyP, algeName, convCC_cTypeEnvP, convCC_cTypeAnyP}))
stream.PushIndent(nil)
stream.Writeln(Lns_getVM().String_format("return lns_mtd_Map_get( _pEnv, %s, LNS_STEM_INT( pAny->val.alge.type ) )%s;", []LnsAny{type2NameMapName, convCC_accessAny}))
stream.PopIndent()
stream.Writeln("}")
stream.Writeln(Lns_getVM().String_format("static void %s( %s _pEnv ) {", []LnsAny{moduleCtrl.FP.GetAlgeInitCName(&algeType.Ast_TypeInfo), convCC_cTypeEnvP}))
stream.PushIndent(nil)
stream.Writeln(type2NameMapName + " = lns_class_Map_new( _pEnv );")
convCC_processAddModuleGlobal_1639_(stream, Lns_getVM().String_format("LNS_STEM_ANY( %s )", []LnsAny{type2NameMapName}))
var fullName string
fullName = moduleCtrl.FP.GetFullName(&algeType.Ast_TypeInfo)
var enumName string
enumName = moduleCtrl.FP.GetAlgeEnumCName(&algeType.Ast_TypeInfo)
for _, _valInfo := range( valList.Items ) {
valInfo := _valInfo.(Ast_AlgeValInfoDownCast).ToAst_AlgeValInfo()
stream.Write(Lns_getVM().String_format("lns_mtd_Map_add( _pEnv, %s, LNS_STEM_INT( %s_%s ), ", []LnsAny{type2NameMapName, enumName, valInfo.FP.Get_name()}))
stream.Writeln(Lns_getVM().String_format("LNS_STEM_ANY( lns_litStr2any( _pEnv, \"%s.%s\" ) ) );", []LnsAny{fullName, valInfo.FP.Get_name()}))
}
for _, _valInfo := range( valList.Items ) {
valInfo := _valInfo.(Ast_AlgeValInfoDownCast).ToAst_AlgeValInfo()
if valInfo.FP.Get_typeList().Len() == 0{
var varName string
varName = moduleCtrl.FP.GetAlgeValCName(&algeType.Ast_TypeInfo, valInfo.FP.Get_name())
stream.Writeln(Lns_getVM().String_format("lns_init_alge( &%s, &%s_any, %s_%s );", []LnsAny{varName, varName, enumName, valInfo.FP.Get_name()}))
}
}
stream.PopIndent()
stream.Writeln("}")
for _, _valInfo := range( valList.Items ) {
valInfo := _valInfo.(Ast_AlgeValInfoDownCast).ToAst_AlgeValInfo()
if valInfo.FP.Get_typeList().Len() > 0{
var hasAnyFlag bool
hasAnyFlag = false
for _, _valType := range( valInfo.FP.Get_typeList().Items ) {
valType := _valType.(Ast_TypeInfoDownCast).ToAst_TypeInfo()
if convCC_isStemType_1171_(valType){
hasAnyFlag = true
break
}
}
var valStruct string
valStruct = moduleCtrl.FP.GetAlgeValStrCName(&algeType.Ast_TypeInfo, valInfo.FP.Get_name())
var gcTxt string
if hasAnyFlag{
gcTxt = Lns_getVM().String_format("lns_gc_alge_%s_%s", []LnsAny{algeName, valInfo.FP.Get_name()})
stream.Writeln(Lns_getVM().String_format("static void %s( %s _pEnv, void * pVal ) {", []LnsAny{gcTxt, convCC_cTypeEnvP}))
stream.PushIndent(nil)
stream.Writeln(Lns_getVM().String_format("%s *pWorkVal = (%s *)pVal;", []LnsAny{valStruct, valStruct}))
for _paramIndex, _valType := range( valInfo.FP.Get_typeList().Items ) {
paramIndex := _paramIndex + 1
valType := _valType.(Ast_TypeInfoDownCast).ToAst_TypeInfo()
if convCC_isStemType_1171_(valType){
stream.Writeln(Lns_getVM().String_format("lns_decre_ref( _pEnv, pWorkVal->_val%d.val.pAny );", []LnsAny{paramIndex}))
}
}
stream.PopIndent()
stream.Writeln("}")
} else {
gcTxt = "NULL"
}
convCC_processAlgeNewProto_1925_(stream, moduleCtrl, &algeType.Ast_TypeInfo, valInfo)
stream.Writeln("{")
stream.PushIndent(nil)
stream.Writeln(Lns_getVM().String_format("%s pAny = lns_alge_new( _pEnv, %s_%s, sizeof( %s ), %s );", []LnsAny{convCC_cTypeAnyP, enumName, valInfo.FP.Get_name(), valStruct, gcTxt}))
stream.Writeln(Lns_getVM().String_format("%s *pVal = pAny->val.alge.pVal;", []LnsAny{valStruct}))
for _paramIndex, _valType := range( valInfo.FP.Get_typeList().Items ) {
paramIndex := _paramIndex + 1
valType := _valType.(Ast_TypeInfoDownCast).ToAst_TypeInfo()
if convCC_isStemType_1171_(valType){
stream.Writeln(Lns_getVM().String_format("lns_setQ( pVal->_val%d, _val%d );", []LnsAny{paramIndex, paramIndex}))
} else {
stream.Writeln(Lns_getVM().String_format("pVal->_val%d = _val%d;", []LnsAny{paramIndex, paramIndex}))
}
}
stream.Writeln("return LNS_STEM_ANY( pAny );")
stream.PopIndent()
stream.Writeln("}")
}
}
}
// 3035: decl @lune.@base.@convCC.getMethodTypeTxt
func convCC_getMethodTypeTxt_1987_(retTypeList *LnsList) string {
if retTypeList.Len() == 1{
var retType *Ast_TypeInfo
retType = retTypeList.GetAt(1).(Ast_TypeInfoDownCast).ToAst_TypeInfo().FP.Get_srcTypeInfo()
{
_enumType := Ast_EnumTypeInfoDownCastF(retType.FP)