@@ -232,7 +232,7 @@ struct PrintSExpression : public UnifiedExpressionVisitor<PrintSExpression> {
232
232
233
233
std::ostream& printType (Type type) { return o << typePrinter (type); }
234
234
235
- std::ostream& printHeapType (HeapType type) {
235
+ std::ostream& printHeapTypeName (HeapType type) {
236
236
if (type.isBasic ()) {
237
237
return o << type;
238
238
}
@@ -257,7 +257,7 @@ struct PrintSExpression : public UnifiedExpressionVisitor<PrintSExpression> {
257
257
if (sig.results .isTuple ()) {
258
258
if (auto it = signatureTypes.find (sig); it != signatureTypes.end ()) {
259
259
o << " (type " ;
260
- printHeapType (it->second );
260
+ printHeapTypeName (it->second );
261
261
o << " ) " ;
262
262
}
263
263
}
@@ -471,8 +471,8 @@ struct PrintExpressionContents
471
471
472
472
std::ostream& printType (Type type) { return parent.printType (type); }
473
473
474
- std::ostream& printHeapType (HeapType type) {
475
- return parent.printHeapType (type);
474
+ std::ostream& printHeapTypeName (HeapType type) {
475
+ return parent.printHeapTypeName (type);
476
476
}
477
477
478
478
std::ostream& printResultType (Type type) {
@@ -563,7 +563,7 @@ struct PrintExpressionContents
563
563
o << ' (' ;
564
564
printMinor (o, " type " );
565
565
566
- printHeapType (curr->heapType );
566
+ printHeapTypeName (curr->heapType );
567
567
568
568
o << ' )' ;
569
569
}
@@ -2144,7 +2144,7 @@ struct PrintExpressionContents
2144
2144
}
2145
2145
void visitRefNull (RefNull* curr) {
2146
2146
printMedium (o, " ref.null " );
2147
- printHeapType (curr->type .getHeapType ());
2147
+ printHeapTypeName (curr->type .getHeapType ());
2148
2148
}
2149
2149
void visitRefIsNull (RefIsNull* curr) { printMedium (o, " ref.is_null" ); }
2150
2150
void visitRefFunc (RefFunc* curr) {
@@ -2253,7 +2253,7 @@ struct PrintExpressionContents
2253
2253
2254
2254
void visitCallRef (CallRef* curr) {
2255
2255
printMedium (o, curr->isReturn ? " return_call_ref " : " call_ref " );
2256
- printHeapType (curr->target ->type .getHeapType ());
2256
+ printHeapTypeName (curr->target ->type .getHeapType ());
2257
2257
}
2258
2258
void visitRefTest (RefTest* curr) {
2259
2259
printMedium (o, " ref.test " );
@@ -2310,7 +2310,7 @@ struct PrintExpressionContents
2310
2310
printMedium (o, " _default" );
2311
2311
}
2312
2312
o << ' ' ;
2313
- printHeapType (curr->type .getHeapType ());
2313
+ printHeapTypeName (curr->type .getHeapType ());
2314
2314
}
2315
2315
void printFieldName (HeapType type, Index index) {
2316
2316
auto names = parent.typePrinter .getNames (type).fieldNames ;
@@ -2350,7 +2350,7 @@ struct PrintExpressionContents
2350
2350
printMedium (o, " .get " );
2351
2351
}
2352
2352
printMemoryOrder (curr->order );
2353
- printHeapType (heapType);
2353
+ printHeapTypeName (heapType);
2354
2354
o << ' ' ;
2355
2355
printFieldName (heapType, curr->index );
2356
2356
}
@@ -2362,7 +2362,7 @@ struct PrintExpressionContents
2362
2362
}
2363
2363
printMemoryOrder (curr->order );
2364
2364
auto heapType = curr->ref ->type .getHeapType ();
2365
- printHeapType (heapType);
2365
+ printHeapTypeName (heapType);
2366
2366
o << ' ' ;
2367
2367
printFieldName (heapType, curr->index );
2368
2368
}
@@ -2375,7 +2375,7 @@ struct PrintExpressionContents
2375
2375
printMemoryOrder (curr->order );
2376
2376
printMemoryOrder (curr->order );
2377
2377
auto heapType = curr->ref ->type .getHeapType ();
2378
- printHeapType (heapType);
2378
+ printHeapTypeName (heapType);
2379
2379
o << ' ' ;
2380
2380
printFieldName (heapType, curr->index );
2381
2381
}
@@ -2386,7 +2386,7 @@ struct PrintExpressionContents
2386
2386
printMemoryOrder (curr->order );
2387
2387
printMemoryOrder (curr->order );
2388
2388
auto heapType = curr->ref ->type .getHeapType ();
2389
- printHeapType (heapType);
2389
+ printHeapTypeName (heapType);
2390
2390
o << ' ' ;
2391
2391
printFieldName (heapType, curr->index );
2392
2392
}
@@ -2396,26 +2396,26 @@ struct PrintExpressionContents
2396
2396
printMedium (o, " _default" );
2397
2397
}
2398
2398
o << ' ' ;
2399
- printHeapType (curr->type .getHeapType ());
2399
+ printHeapTypeName (curr->type .getHeapType ());
2400
2400
}
2401
2401
void visitArrayNewData (ArrayNewData* curr) {
2402
2402
printMedium (o, " array.new_data" );
2403
2403
o << ' ' ;
2404
- printHeapType (curr->type .getHeapType ());
2404
+ printHeapTypeName (curr->type .getHeapType ());
2405
2405
o << ' ' ;
2406
2406
curr->segment .print (o);
2407
2407
}
2408
2408
void visitArrayNewElem (ArrayNewElem* curr) {
2409
2409
printMedium (o, " array.new_elem" );
2410
2410
o << ' ' ;
2411
- printHeapType (curr->type .getHeapType ());
2411
+ printHeapTypeName (curr->type .getHeapType ());
2412
2412
o << ' ' ;
2413
2413
curr->segment .print (o);
2414
2414
}
2415
2415
void visitArrayNewFixed (ArrayNewFixed* curr) {
2416
2416
printMedium (o, " array.new_fixed" );
2417
2417
o << ' ' ;
2418
- printHeapType (curr->type .getHeapType ());
2418
+ printHeapTypeName (curr->type .getHeapType ());
2419
2419
o << ' ' ;
2420
2420
o << curr->values .size ();
2421
2421
}
@@ -2430,32 +2430,32 @@ struct PrintExpressionContents
2430
2430
} else {
2431
2431
printMedium (o, " array.get " );
2432
2432
}
2433
- printHeapType (curr->ref ->type .getHeapType ());
2433
+ printHeapTypeName (curr->ref ->type .getHeapType ());
2434
2434
}
2435
2435
void visitArraySet (ArraySet* curr) {
2436
2436
printMedium (o, " array.set " );
2437
- printHeapType (curr->ref ->type .getHeapType ());
2437
+ printHeapTypeName (curr->ref ->type .getHeapType ());
2438
2438
}
2439
2439
void visitArrayLen (ArrayLen* curr) { printMedium (o, " array.len" ); }
2440
2440
void visitArrayCopy (ArrayCopy* curr) {
2441
2441
printMedium (o, " array.copy " );
2442
- printHeapType (curr->destRef ->type .getHeapType ());
2442
+ printHeapTypeName (curr->destRef ->type .getHeapType ());
2443
2443
o << ' ' ;
2444
- printHeapType (curr->srcRef ->type .getHeapType ());
2444
+ printHeapTypeName (curr->srcRef ->type .getHeapType ());
2445
2445
}
2446
2446
void visitArrayFill (ArrayFill* curr) {
2447
2447
printMedium (o, " array.fill " );
2448
- printHeapType (curr->ref ->type .getHeapType ());
2448
+ printHeapTypeName (curr->ref ->type .getHeapType ());
2449
2449
}
2450
2450
void visitArrayInitData (ArrayInitData* curr) {
2451
2451
printMedium (o, " array.init_data " );
2452
- printHeapType (curr->ref ->type .getHeapType ());
2452
+ printHeapTypeName (curr->ref ->type .getHeapType ());
2453
2453
o << ' ' ;
2454
2454
curr->segment .print (o);
2455
2455
}
2456
2456
void visitArrayInitElem (ArrayInitElem* curr) {
2457
2457
printMedium (o, " array.init_elem " );
2458
- printHeapType (curr->ref ->type .getHeapType ());
2458
+ printHeapTypeName (curr->ref ->type .getHeapType ());
2459
2459
o << ' ' ;
2460
2460
curr->segment .print (o);
2461
2461
}
@@ -2547,14 +2547,14 @@ struct PrintExpressionContents
2547
2547
void visitContNew (ContNew* curr) {
2548
2548
assert (curr->type .isContinuation ());
2549
2549
printMedium (o, " cont.new " );
2550
- printHeapType (curr->type .getHeapType ());
2550
+ printHeapTypeName (curr->type .getHeapType ());
2551
2551
}
2552
2552
void visitContBind (ContBind* curr) {
2553
2553
assert (curr->cont ->type .isContinuation () && curr->type .isContinuation ());
2554
2554
printMedium (o, " cont.bind " );
2555
- printHeapType (curr->cont ->type .getHeapType ());
2555
+ printHeapTypeName (curr->cont ->type .getHeapType ());
2556
2556
o << ' ' ;
2557
- printHeapType (curr->type .getHeapType ());
2557
+ printHeapTypeName (curr->type .getHeapType ());
2558
2558
}
2559
2559
void visitSuspend (Suspend* curr) {
2560
2560
printMedium (o, " suspend " );
@@ -2582,7 +2582,7 @@ struct PrintExpressionContents
2582
2582
printMedium (o, " resume" );
2583
2583
2584
2584
o << ' ' ;
2585
- printHeapType (curr->cont ->type .getHeapType ());
2585
+ printHeapTypeName (curr->cont ->type .getHeapType ());
2586
2586
2587
2587
handleResumeTable (o, curr);
2588
2588
}
@@ -2591,7 +2591,7 @@ struct PrintExpressionContents
2591
2591
printMedium (o, " resume_throw" );
2592
2592
2593
2593
o << ' ' ;
2594
- printHeapType (curr->cont ->type .getHeapType ());
2594
+ printHeapTypeName (curr->cont ->type .getHeapType ());
2595
2595
o << ' ' ;
2596
2596
curr->tag .print (o);
2597
2597
@@ -2602,7 +2602,7 @@ struct PrintExpressionContents
2602
2602
printMedium (o, " switch" );
2603
2603
2604
2604
o << ' ' ;
2605
- printHeapType (curr->cont ->type .getHeapType ());
2605
+ printHeapTypeName (curr->cont ->type .getHeapType ());
2606
2606
o << ' ' ;
2607
2607
curr->tag .print (o);
2608
2608
}
@@ -3022,7 +3022,7 @@ void PrintSExpression::handleSignature(Function* curr,
3022
3022
if ((currModule && currModule->features .hasGC ()) ||
3023
3023
requiresExplicitFuncType (curr->type )) {
3024
3024
o << " (type " ;
3025
- printHeapType (curr->type ) << ' )' ;
3025
+ printHeapTypeName (curr->type ) << ' )' ;
3026
3026
}
3027
3027
bool inParam = false ;
3028
3028
Index i = 0 ;
@@ -3247,7 +3247,7 @@ void PrintSExpression::visitDefinedTag(Tag* curr) {
3247
3247
3248
3248
void PrintSExpression::printTagType (HeapType type) {
3249
3249
o << " (type " ;
3250
- printHeapType (type);
3250
+ printHeapTypeName (type);
3251
3251
o << ' )' ;
3252
3252
if (auto params = type.getSignature ().params ; params != Type::none) {
3253
3253
o << maybeSpace << " (param" ;
0 commit comments