Changeset 4c58668 in mainline


Ignore:
Timestamp:
2018-07-05T21:41:18Z (6 years ago)
Author:
Dzejrou <dzejrou@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
973a268
Parents:
ad403590
git-author:
Jaroslav Jindrak <dzejrou@…> (2017-11-23 23:23:49)
git-committer:
Dzejrou <dzejrou@…> (2018-07-05 21:41:18)
Message:

cpp: misc modifications

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/cpp/src/internal/runtime.cpp

    rad403590 r4c58668  
    3636     * call of a pure virtual function cannot be made.
    3737     */
     38    // TODO: terminate in this
    3839    extern "C" void __cxa_pure_call()
    3940    { /* DUMMY BODY */ }
     
    6970    { /* DUMMY BODY */ }
    7071
     72    /**
     73     * This structure represents part of the vtable segment
     74     * that contains data related to dynamic_cast.
     75     */
     76    struct vtable
     77    {
     78        // Unimportant to us.
     79
     80        std::ptrdiff_t offset_to_top;
     81        std::type_info* tinfo;
     82
     83        // Actual vtable.
     84    };
    7185    extern "C" void* __dynamic_cast(const void* sub, const __class_type_info* src,
    7286                                    const __class_type_info* dst, std::ptrdiff_t offset)
    7387    {
    7488        // TODO: implement
     89        // NOTE: as far as I understand it, we get vtable prefix from sub, get the type_info
     90        //       ptr from that and then climb the inheritance hierarchy upwards till we either
     91        //       fint dst or fail and return nullptr
    7592        return nullptr;
    7693    }
Note: See TracChangeset for help on using the changeset viewer.