@@ -427,10 +427,6 @@ void TypeComposition (Type* lhs, const Type* rhs)
427
427
** type or this fails with a critical check.
428
428
*/
429
429
{
430
- FuncDesc * F1 ;
431
- FuncDesc * F2 ;
432
- long LeftCount , RightCount ;
433
-
434
430
/* Compose two types */
435
431
while (lhs -> C != T_END ) {
436
432
@@ -440,13 +436,13 @@ void TypeComposition (Type* lhs, const Type* rhs)
440
436
}
441
437
442
438
/* Check for sanity */
443
- CHECK (GetUnqualTypeCode (lhs ) == GetUnqualTypeCode (rhs ));
439
+ CHECK (GetUnderlyingTypeCode (lhs ) == GetUnderlyingTypeCode (rhs ));
444
440
445
441
/* Check for special type elements */
446
442
if (IsTypeFunc (lhs )) {
447
443
/* Compose the function descriptors */
448
- F1 = GetFuncDesc (lhs );
449
- F2 = GetFuncDesc (rhs );
444
+ FuncDesc * F1 = GetFuncDesc (lhs );
445
+ FuncDesc * F2 = GetFuncDesc (rhs );
450
446
451
447
/* If F1 has an empty parameter list (which does also mean, it is
452
448
** not a function definition, because the flag is reset in this
@@ -470,8 +466,8 @@ void TypeComposition (Type* lhs, const Type* rhs)
470
466
}
471
467
} else if (IsTypeArray (lhs )) {
472
468
/* Check member count */
473
- LeftCount = GetElementCount (lhs );
474
- RightCount = GetElementCount (rhs );
469
+ long LeftCount = GetElementCount (lhs );
470
+ long RightCount = GetElementCount (rhs );
475
471
476
472
/* Set composite type if it is requested */
477
473
if (LeftCount != UNSPECIFIED ) {
@@ -485,28 +481,4 @@ void TypeComposition (Type* lhs, const Type* rhs)
485
481
++ lhs ;
486
482
++ rhs ;
487
483
}
488
-
489
- return ;
490
- }
491
-
492
-
493
-
494
- FuncDesc * RefineFuncDesc (Type * OldType , const Type * NewType )
495
- /* Refine the existing function descriptor with a new one */
496
- {
497
- FuncDesc * Old = GetFuncDesc (OldType );
498
- FuncDesc * New = GetFuncDesc (NewType );
499
-
500
- CHECK (Old != 0 && New != 0 );
501
-
502
- if ((New -> Flags & FD_EMPTY ) == 0 ) {
503
- if ((Old -> Flags & FD_EMPTY ) == 0 ) {
504
- TypeComposition (OldType , NewType );
505
- } else {
506
- TypeCopy (OldType , NewType );
507
- Old -> Flags &= ~FD_EMPTY ;
508
- }
509
- }
510
-
511
- return Old ;
512
484
}
0 commit comments