[ Home | CW Bug Reports | Mail ]

Throw_Err()での不要な code size増加
Subject: BUG -- Throw_Err() unnecessary code bloat
 
---------------------------------------------------------------------------
METROWERKS PRODUCT AND USAGE SECTION
 
Product name :            [ CodeWarrior Professional for Mac ]
Product version :         [ Pro 5 ]
Component name :          [ PowerPlant 2.0 ]
Generating:               [ Mac OS 68K / Mac OS PowerPC ]
Purpose:                  [ application ]
 
---------------------------------------------------------------------------
 

BUG DESCRIPTION SECTION
 
Reason for this report:   [ unnecessary code bloat ]
Bug severity:             [ cosmetic problem ]
Reproducibility:          [ always ]
Problem summary:
 
There is no benefit to expand the Throw_Err() as inline macro. This
introduces nearly 3% code bloat in PowerPlant 2.0 with new LException
class.
 
I changed the Throw_Err() to normal function as the following.
 
in UDebugging.h
 
#ifndef Throw_Err
    void    Throw_Err(PP_PowerPlant::ExceptionCode err);
#endif
 
in UDebugging.cp
 
void    Throw_Err(PP_PowerPlant::ExceptionCode err)
{
#if PP_Obsolete_ThrowExceptionCode
    throw (PP_PowerPlant::ExceptionCode)err;
#else
    throw PP_PowerPlant::LException(err);
#endif
}


この Pageは MacOS X + Radio UserLand で作っています。