Commit 0c433261 authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

msvcp90: Added ios_base class implementation.

parent bf5c3019
...@@ -68,6 +68,7 @@ extern const vtable_ptr MSVCP_length_error_vtable; ...@@ -68,6 +68,7 @@ extern const vtable_ptr MSVCP_length_error_vtable;
extern const vtable_ptr MSVCP_out_of_range_vtable; extern const vtable_ptr MSVCP_out_of_range_vtable;
extern const vtable_ptr MSVCP_invalid_argument_vtable; extern const vtable_ptr MSVCP_invalid_argument_vtable;
extern const vtable_ptr MSVCP_runtime_error_vtable; extern const vtable_ptr MSVCP_runtime_error_vtable;
extern const vtable_ptr MSVCP_failure_vtable;
DEFINE_THISCALL_WRAPPER(MSVCP_exception_ctor, 8) DEFINE_THISCALL_WRAPPER(MSVCP_exception_ctor, 8)
exception* __thiscall MSVCP_exception_ctor(exception *this, const char **name) exception* __thiscall MSVCP_exception_ctor(exception *this, const char **name)
...@@ -558,6 +559,13 @@ void* __thiscall MSVCP_runtime_error_vector_dtor( ...@@ -558,6 +559,13 @@ void* __thiscall MSVCP_runtime_error_vector_dtor(
return this; return this;
} }
DEFINE_THISCALL_WRAPPER(MSVCP_runtime_error_what, 4)
const char* __thiscall MSVCP_runtime_error_what(runtime_error *this)
{
TRACE("%p\n", this);
return MSVCP_basic_string_char_c_str(&this->str);
}
DEFINE_RTTI_DATA(runtime_error, 0, 1, &exception_rtti_base_descriptor, NULL, NULL, ".?AVruntime_error@std@@"); DEFINE_RTTI_DATA(runtime_error, 0, 1, &exception_rtti_base_descriptor, NULL, NULL, ".?AVruntime_error@std@@");
static const cxx_type_info runtime_error_cxx_type_info = { static const cxx_type_info runtime_error_cxx_type_info = {
...@@ -584,13 +592,77 @@ static const cxx_exception_type runtime_error_cxx_type = { ...@@ -584,13 +592,77 @@ static const cxx_exception_type runtime_error_cxx_type = {
&runtime_error_cxx_type_table &runtime_error_cxx_type_table
}; };
DEFINE_THISCALL_WRAPPER(MSVCP_runtime_error_what, 4) /* failure class data */
const char* __thiscall MSVCP_runtime_error_what(runtime_error *this) typedef runtime_error failure;
DEFINE_THISCALL_WRAPPER(MSVCP_failure_ctor, 8)
failure* __thiscall MSVCP_failure_ctor(
failure *this, const char **name)
{
TRACE("%p %s\n", this, *name);
MSVCP_runtime_error_ctor(this, name);
this->e.vtable = &MSVCP_failure_vtable;
return this;
}
DEFINE_THISCALL_WRAPPER(MSVCP_failure_copy_ctor, 8)
failure* __thiscall MSVCP_failure_copy_ctor(
failure *this, failure *rhs)
{
TRACE("%p %p\n", this, rhs);
MSVCP_runtime_error_copy_ctor(this, rhs);
this->e.vtable = &MSVCP_failure_vtable;
return this;
}
DEFINE_THISCALL_WRAPPER(MSVCP_failure_dtor, 4)
void __thiscall MSVCP_failure_dtor(failure *this)
{ {
TRACE("%p\n", this); TRACE("%p\n", this);
return MSVCP_basic_string_char_c_str(&this->str); MSVCP_runtime_error_dtor(this);
} }
DEFINE_THISCALL_WRAPPER(MSVCP_failure_vector_dtor, 8)
void* __thiscall MSVCP_failure_vector_dtor(
failure *this, unsigned int flags)
{
TRACE("%p %x\n", this, flags);
return MSVCP_runtime_error_vector_dtor(this, flags);
}
DEFINE_THISCALL_WRAPPER(MSVCP_failure_what, 4)
const char* __thiscall MSVCP_failure_what(failure *this)
{
TRACE("%p\n", this);
return MSVCP_runtime_error_what(this);
}
DEFINE_RTTI_DATA(failure, 0, 1, &runtime_error_rtti_base_descriptor, &exception_rtti_base_descriptor, NULL, ".?AVfailure@std@@");
static const cxx_type_info failure_cxx_type_info = {
0,
&failure_type_info,
{ 0, -1, 0 },
sizeof(failure),
(cxx_copy_ctor)THISCALL(MSVCP_failure_copy_ctor)
};
static const cxx_type_info_table failure_cxx_type_table = {
3,
{
&failure_cxx_type_info,
&runtime_error_cxx_type_info,
&exception_cxx_type_info
}
};
static const cxx_exception_type failure_cxx_type = {
0,
(cxx_copy_ctor)THISCALL(MSVCP_failure_dtor),
NULL,
&failure_cxx_type_table
};
#ifndef __GNUC__ #ifndef __GNUC__
void __asm_dummy_vtables(void) { void __asm_dummy_vtables(void) {
#endif #endif
...@@ -601,6 +673,7 @@ void __asm_dummy_vtables(void) { ...@@ -601,6 +673,7 @@ void __asm_dummy_vtables(void) {
__ASM_VTABLE(out_of_range, VTABLE_ADD_FUNC(MSVCP_logic_error_what)); __ASM_VTABLE(out_of_range, VTABLE_ADD_FUNC(MSVCP_logic_error_what));
__ASM_VTABLE(invalid_argument, VTABLE_ADD_FUNC(MSVCP_logic_error_what)); __ASM_VTABLE(invalid_argument, VTABLE_ADD_FUNC(MSVCP_logic_error_what));
__ASM_VTABLE(runtime_error, VTABLE_ADD_FUNC(MSVCP_runtime_error_what)); __ASM_VTABLE(runtime_error, VTABLE_ADD_FUNC(MSVCP_runtime_error_what));
__ASM_VTABLE(failure, VTABLE_ADD_FUNC(MSVCP_failure_what));
#ifndef __GNUC__ #ifndef __GNUC__
} }
#endif #endif
...@@ -646,5 +719,10 @@ void throw_exception(exception_type et, const char *str) ...@@ -646,5 +719,10 @@ void throw_exception(exception_type et, const char *str)
MSVCP_runtime_error_ctor(&e, &addr); MSVCP_runtime_error_ctor(&e, &addr);
_CxxThrowException((exception*)&e, &runtime_error_cxx_type); _CxxThrowException((exception*)&e, &runtime_error_cxx_type);
} }
case EXCEPTION_FAILURE: {
failure e;
MSVCP_failure_ctor(&e, &addr);
_CxxThrowException((exception*)&e, &failure_cxx_type);
}
} }
} }
...@@ -163,7 +163,8 @@ typedef enum __exception_type { ...@@ -163,7 +163,8 @@ typedef enum __exception_type {
EXCEPTION_LENGTH_ERROR, EXCEPTION_LENGTH_ERROR,
EXCEPTION_OUT_OF_RANGE, EXCEPTION_OUT_OF_RANGE,
EXCEPTION_INVALID_ARGUMENT, EXCEPTION_INVALID_ARGUMENT,
EXCEPTION_RUNTIME_ERROR EXCEPTION_RUNTIME_ERROR,
EXCEPTION_FAILURE,
} exception_type; } exception_type;
void throw_exception(exception_type, const char *); void throw_exception(exception_type, const char *);
...@@ -260,6 +261,7 @@ typedef struct ...@@ -260,6 +261,7 @@ typedef struct
locale* __thiscall locale_ctor(locale*); locale* __thiscall locale_ctor(locale*);
locale* __thiscall locale_copy_ctor(locale*, const locale*); locale* __thiscall locale_copy_ctor(locale*, const locale*);
locale* __thiscall locale_operator_assign(locale*, const locale*);
void __thiscall locale_dtor(locale*); void __thiscall locale_dtor(locale*);
/* class _Lockit */ /* class _Lockit */
......
...@@ -2834,8 +2834,8 @@ ...@@ -2834,8 +2834,8 @@
@ stub -arch=win64 ?_Tidy@?$time_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@AEAAXXZ @ stub -arch=win64 ?_Tidy@?$time_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@AEAAXXZ
@ stub -arch=win32 ?_Tidy@?$time_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@AAEXXZ @ stub -arch=win32 ?_Tidy@?$time_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@AAEXXZ
@ stub -arch=win64 ?_Tidy@?$time_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@AEAAXXZ @ stub -arch=win64 ?_Tidy@?$time_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@AEAAXXZ
@ cdecl -arch=win32 ?_Tidy@ios_base@std@@AAAXXZ() ios_base_Tidy @ cdecl -arch=win32 ?_Tidy@ios_base@std@@AAAXXZ(ptr) ios_base_Tidy
@ cdecl -arch=win64 ?_Tidy@ios_base@std@@AEAAXXZ() ios_base_Tidy @ cdecl -arch=win64 ?_Tidy@ios_base@std@@AEAAXXZ(ptr) ios_base_Tidy
@ stub -arch=win32 ?_Tidy@strstreambuf@std@@IAEXXZ @ stub -arch=win32 ?_Tidy@strstreambuf@std@@IAEXXZ
@ stub -arch=win64 ?_Tidy@strstreambuf@std@@IEAAXXZ @ stub -arch=win64 ?_Tidy@strstreambuf@std@@IEAAXXZ
@ thiscall -arch=win32 ?_Unlock@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEXXZ(ptr) basic_streambuf_char__Unlock @ thiscall -arch=win32 ?_Unlock@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEXXZ(ptr) basic_streambuf_char__Unlock
...@@ -3788,12 +3788,12 @@ ...@@ -3788,12 +3788,12 @@
@ cdecl -arch=win64 ?erase@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAA?AV?$_String_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@V?$_String_const_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@@Z(ptr ptr ptr) basic_string_wchar_erase_iter @ cdecl -arch=win64 ?erase@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAA?AV?$_String_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@V?$_String_const_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@@Z(ptr ptr ptr) basic_string_wchar_erase_iter
@ thiscall -arch=win32 ?erase@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEAAV12@II@Z(ptr long long) MSVCP_basic_string_wchar_erase @ thiscall -arch=win32 ?erase@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEAAV12@II@Z(ptr long long) MSVCP_basic_string_wchar_erase
@ cdecl -arch=win64 ?erase@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAAEAV12@_K0@Z(ptr long long) MSVCP_basic_string_wchar_erase @ cdecl -arch=win64 ?erase@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAAEAV12@_K0@Z(ptr long long) MSVCP_basic_string_wchar_erase
@ thiscall -arch=win32 ?exceptions@ios_base@std@@QAEXH@Z(ptr long) ios_base_exception_set @ thiscall -arch=win32 ?exceptions@ios_base@std@@QAEXH@Z(ptr long) ios_base_exceptions_set
@ cdecl -arch=win64 ?exceptions@ios_base@std@@QEAAXH@Z(ptr long) ios_base_exception_set @ cdecl -arch=win64 ?exceptions@ios_base@std@@QEAAXH@Z(ptr long) ios_base_exceptions_set
@ thiscall -arch=win32 ?exceptions@ios_base@std@@QAEXI@Z(ptr long) ios_base_exception_set_unsigned @ thiscall -arch=win32 ?exceptions@ios_base@std@@QAEXI@Z(ptr long) ios_base_exceptions_set_unsigned
@ cdecl -arch=win64 ?exceptions@ios_base@std@@QEAAXI@Z(ptr long) ios_base_exception_set_unsigned @ cdecl -arch=win64 ?exceptions@ios_base@std@@QEAAXI@Z(ptr long) ios_base_exceptions_set_unsigned
@ thiscall -arch=win32 ?exceptions@ios_base@std@@QBEHXZ(ptr) ios_base_exception_get @ thiscall -arch=win32 ?exceptions@ios_base@std@@QBEHXZ(ptr) ios_base_exceptions_get
@ cdecl -arch=win64 ?exceptions@ios_base@std@@QEBAHXZ(ptr) ios_base_exception_get @ cdecl -arch=win64 ?exceptions@ios_base@std@@QEBAHXZ(ptr) ios_base_exceptions_get
@ cdecl ?exp@?$_Ctraits@M@std@@SAMM@Z(float) std_Ctraits_float_exp @ cdecl ?exp@?$_Ctraits@M@std@@SAMM@Z(float) std_Ctraits_float_exp
@ cdecl ?exp@?$_Ctraits@N@std@@SANN@Z(double) std_Ctraits_double_exp @ cdecl ?exp@?$_Ctraits@N@std@@SANN@Z(double) std_Ctraits_double_exp
@ cdecl ?exp@?$_Ctraits@O@std@@SAOO@Z(double) std_Ctraits_long_double_exp @ cdecl ?exp@?$_Ctraits@O@std@@SAOO@Z(double) std_Ctraits_long_double_exp
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment