mirror of
https://github.com/reactos/reactos.git
synced 2025-06-25 07:09:46 +00:00
[SHELL/EXPERIMENTS]
* Create a branch for some evul shell experiments. svn path=/branches/shell-experiments/; revision=61927
This commit is contained in:
parent
d09f611410
commit
527f2f9057
20177 changed files with 0 additions and 1312061 deletions
13
lib/sdk/cpprt/CMakeLists.txt
Normal file
13
lib/sdk/cpprt/CMakeLists.txt
Normal file
|
@ -0,0 +1,13 @@
|
|||
|
||||
set_cpp(WITH_EXCEPTIONS)
|
||||
|
||||
list(APPEND SOURCE
|
||||
ehvec.cpp
|
||||
typeinfo.cpp)
|
||||
|
||||
if(ARCH STREQUAL "i386")
|
||||
add_asm_files(cpprt_asm i386/cpprt.s)
|
||||
elseif(ARCH STREQUAL "amd64")
|
||||
add_asm_files(cpprt_asm amd64/cpprt.s)
|
||||
endif()
|
||||
add_library(cpprt ${SOURCE} ${cpprt_asm})
|
16
lib/sdk/cpprt/amd64/cpprt.s
Normal file
16
lib/sdk/cpprt/amd64/cpprt.s
Normal file
|
@ -0,0 +1,16 @@
|
|||
#include <asm.inc>
|
||||
|
||||
.code
|
||||
|
||||
MACRO(DEFINE_ALIAS, alias, orig, type)
|
||||
EXTERN &orig:&type
|
||||
ALIAS <&alias> = <&orig>
|
||||
ENDM
|
||||
|
||||
; void __cdecl `eh vector constructor iterator'(void *,unsigned __int64,int,void (__cdecl*)(void *),void (__cdecl*)(void *))
|
||||
DEFINE_ALIAS ??_L@YAXPEAX_KHP6AX0@Z2@Z, ?MSVCRTEX_eh_vector_constructor_iterator@@YAXPEAX_KHP6AX0@Z2@Z
|
||||
|
||||
; void __cdecl `eh vector destructor iterator'(void *,unsigned __int64,int,void (__cdecl*)(void *))
|
||||
DEFINE_ALIAS ??_M@YAXPEAX_KHP6AX0@Z@Z, ?MSVCRTEX_eh_vector_destructor_iterator@@YAXPEAX_KHP6AX0@Z@Z
|
||||
|
||||
END
|
48
lib/sdk/cpprt/ehvec.cpp
Normal file
48
lib/sdk/cpprt/ehvec.cpp
Normal file
|
@ -0,0 +1,48 @@
|
|||
/*
|
||||
* PROJECT: ReactOS c++ runtime library
|
||||
* LICENSE: GPLv2+ - See COPYING in the top level directory
|
||||
* PURPOSE: Exception-handling vector ctor/dtor iterator implementation
|
||||
* PROGRAMMER: Thomas Faber (thomas.faber@reactos.org)
|
||||
*/
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
void __stdcall MSVCRTEX_eh_vector_constructor_iterator(void *pMem, size_t sizeOfItem, int nItems, void (__thiscall *ctor)(void *), void (__thiscall *dtor)(void *))
|
||||
{
|
||||
char *pEnd = static_cast<char *>(pMem) + nItems * sizeOfItem;
|
||||
for (char *pItem = static_cast<char *>(pMem);
|
||||
pItem < pEnd;
|
||||
pItem += sizeOfItem)
|
||||
{
|
||||
try
|
||||
{
|
||||
ctor(pItem);
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
for (pItem -= sizeOfItem; pItem >= pMem; pItem -= sizeOfItem)
|
||||
dtor(pItem);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void __stdcall MSVCRTEX_eh_vector_destructor_iterator(void *pMem, size_t sizeOfItem, int nItems, void (__thiscall *dtor)(void *))
|
||||
{
|
||||
char *pEnd = static_cast<char *>(pMem) + nItems * sizeOfItem;
|
||||
for (char *pItem = pEnd - sizeOfItem;
|
||||
pItem >= pMem;
|
||||
pItem -= sizeOfItem)
|
||||
{
|
||||
try
|
||||
{
|
||||
dtor(pItem);
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
for (pItem -= sizeOfItem; pItem >= pMem; pItem -= sizeOfItem)
|
||||
dtor(pItem);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
}
|
16
lib/sdk/cpprt/i386/cpprt.s
Normal file
16
lib/sdk/cpprt/i386/cpprt.s
Normal file
|
@ -0,0 +1,16 @@
|
|||
#include <asm.inc>
|
||||
|
||||
.code
|
||||
|
||||
MACRO(DEFINE_ALIAS, alias, orig, type)
|
||||
EXTERN &orig:&type
|
||||
ALIAS <&alias> = <&orig>
|
||||
ENDM
|
||||
|
||||
; void __stdcall `eh vector constructor iterator'(void *,unsigned int,int,void (__thiscall*)(void *),void (__thiscall*)(void *))
|
||||
DEFINE_ALIAS ??_L@YGXPAXIHP6EX0@Z1@Z, ?MSVCRTEX_eh_vector_constructor_iterator@@YGXPAXIHP6EX0@Z1@Z
|
||||
|
||||
; void __stdcall `eh vector destructor iterator'(void *,unsigned int,int,void (__thiscall*)(void *))
|
||||
DEFINE_ALIAS ??_M@YGXPAXIHP6EX0@Z@Z, ?MSVCRTEX_eh_vector_destructor_iterator@@YGXPAXIHP6EX0@Z@Z
|
||||
|
||||
END
|
27
lib/sdk/cpprt/typeinfo.cpp
Normal file
27
lib/sdk/cpprt/typeinfo.cpp
Normal file
|
@ -0,0 +1,27 @@
|
|||
/*
|
||||
* PROJECT: ReactOS c++ runtime library
|
||||
* LICENSE: GPLv2+ - See COPYING in the top level directory
|
||||
* PURPOSE: Type info stub implementation
|
||||
* PROGRAMMER: Thomas Faber (thomas.faber@reactos.org)
|
||||
*/
|
||||
|
||||
/* TODO: #include <exception> instead */
|
||||
class type_info {
|
||||
public:
|
||||
__declspec(dllimport) virtual ~type_info();
|
||||
private:
|
||||
type_info(const type_info &);
|
||||
type_info &operator=(const type_info &);
|
||||
};
|
||||
|
||||
/* These stubs don't need to do anything (those private functions are never
|
||||
* called). They need to be in cpprt, though, in order to have the vtable
|
||||
* and generated destructor thunks available to programs */
|
||||
type_info::type_info(const type_info &)
|
||||
{
|
||||
}
|
||||
|
||||
type_info &type_info::operator=(const type_info &)
|
||||
{
|
||||
return *this;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue