target_offset_t ThrowBaseOffset( // GET OFFSET OF BASE SCOPE thr_scope, // - scope of throw SCOPE base_scope ) // - scope for base { SEARCH_RESULT *result; // - search result for valid type target_offset_t offset; // - exact offset of base result = ScopeBaseResult( thr_scope, base_scope ); offset = result->exact_delta; ScopeFreeResult( result ); return offset; }
static TYPE convert_base_ptr( // CONVERT TO A BASE-CLASS POINTER PTREE *expr, // - addr( ptr to be converted ) TYPE base, // - base type SCOPE derived_scope, // - derived scope SCOPE base_scope, // - base scope bool positive ) // - true ==> use positive value { SEARCH_RESULT *result; result = ScopeBaseResult( derived_scope, base_scope ); NodeConvertToBasePtr( expr, base, result, positive ); ScopeFreeResult( result ); return( base ); }