mirror of
https://github.com/dlang/phobos.git
synced 2025-05-12 23:29:01 +03:00
bugzilla 4398 dmd always uses Windows name mangling for _d_throw
This commit is contained in:
parent
c8631707a6
commit
cd2287f201
2 changed files with 37 additions and 9 deletions
|
@ -1,10 +1,19 @@
|
||||||
//
|
//
|
||||||
// Copyright (c) 1999-2003 by Digital Mars, www.digitalmars.com
|
// Copyright (c) 1999-2010 by Digital Mars, http://www.digitalmars.com
|
||||||
// All Rights Reserved
|
// All Rights Reserved
|
||||||
// Written by Walter Bright
|
// Written by Walter Bright
|
||||||
|
|
||||||
// Exception handling support
|
// Exception handling support
|
||||||
|
|
||||||
|
/* deh.c is Windows only. It is in C because it interacts with all the complex Windows header
|
||||||
|
* definitions for Windows SEH that have not been ported to D. D's eh mechanism on Windows is
|
||||||
|
* layered on top of Windows SEH.
|
||||||
|
*
|
||||||
|
* For other platforms, deh2.d is used instead, as D uses its own invented exception handling
|
||||||
|
* mechanism. (It is not compatible with the C++ eh ELF mechanism.)
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
@ -214,7 +223,7 @@ int _d_exception_filter(struct _EXCEPTION_POINTERS *eptrs,
|
||||||
* Throw a D object.
|
* Throw a D object.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void __stdcall _d_throw(Object *h)
|
void _d_throwc(Object *h)
|
||||||
{
|
{
|
||||||
//printf("_d_throw(h = %p, &h = %p)\n", h, &h);
|
//printf("_d_throw(h = %p, &h = %p)\n", h, &h);
|
||||||
//printf("\tvptr = %p\n", *(void **)h);
|
//printf("\tvptr = %p\n", *(void **)h);
|
||||||
|
@ -223,6 +232,11 @@ void __stdcall _d_throw(Object *h)
|
||||||
1, (DWORD *)&h);
|
1, (DWORD *)&h);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void __stdcall _d_throw(Object *h)
|
||||||
|
{
|
||||||
|
_d_throwc(h);
|
||||||
|
}
|
||||||
|
|
||||||
/***********************************
|
/***********************************
|
||||||
* Create an exception object
|
* Create an exception object
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -2,16 +2,20 @@
|
||||||
* Implementation of exception handling support routines for Posix.
|
* Implementation of exception handling support routines for Posix.
|
||||||
*
|
*
|
||||||
* Copyright: Copyright Digital Mars 2000 - 2010.
|
* Copyright: Copyright Digital Mars 2000 - 2010.
|
||||||
* License: <a href="http://www.boost.org/LICENSE_1_0.txt">Boost License 1.0</a>.
|
* License:
|
||||||
* Authors: Walter Bright
|
|
||||||
*
|
|
||||||
* Copyright Digital Mars 2000 - 2009.
|
|
||||||
* Distributed under the Boost Software License, Version 1.0.
|
* Distributed under the Boost Software License, Version 1.0.
|
||||||
* (See accompanying file LICENSE_1_0.txt or copy at
|
* (See accompanying file LICENSE_1_0.txt or copy at
|
||||||
* http://www.boost.org/LICENSE_1_0.txt)
|
* $(LINK http://www.boost.org/LICENSE_1_0.txt))
|
||||||
|
* Authors: Walter Bright
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// Exception handling support for linux
|
/* deh.c is Windows only. It is in C because it interacts with all the complex Windows header
|
||||||
|
* definitions for Windows SEH that have not been ported to D. D's eh mechanism on Windows is
|
||||||
|
* layered on top of Windows SEH.
|
||||||
|
*
|
||||||
|
* For other platforms, deh2.d is used instead, as D uses its own invented exception handling
|
||||||
|
* mechanism. (It is not compatible with the C++ eh ELF mechanism.)
|
||||||
|
*/
|
||||||
|
|
||||||
//debug=1;
|
//debug=1;
|
||||||
|
|
||||||
|
@ -134,10 +138,20 @@ size_t __eh_find_caller(size_t regbp, size_t *pretaddr)
|
||||||
}
|
}
|
||||||
|
|
||||||
/***********************************
|
/***********************************
|
||||||
* Throw a D object.
|
* Deprecated because of Bugzilla 4398,
|
||||||
|
* keep for the moment for backwards compatibility.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
extern (Windows) void _d_throw(Object *h)
|
extern (Windows) void _d_throw(Object *h)
|
||||||
|
{
|
||||||
|
_d_throwc(h);
|
||||||
|
}
|
||||||
|
|
||||||
|
/***********************************
|
||||||
|
* Throw a D object.
|
||||||
|
*/
|
||||||
|
|
||||||
|
extern (C) void _d_throwc(Object *h)
|
||||||
{
|
{
|
||||||
size_t regebp;
|
size_t regebp;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue