diff options
author | sewardj <unknown> | 1999-07-06 16:17:40 +0000 |
---|---|---|
committer | sewardj <unknown> | 1999-07-06 16:17:40 +0000 |
commit | 7635e89a1daa92ec508bed9a37272316fe0f5fa0 (patch) | |
tree | 5b8ec3d2e6aadc0cf0d53b534a95ba82b73b28a3 | |
parent | 99032744740fa870c7cf646d3fa651c6bcf5d2ee (diff) | |
download | haskell-7635e89a1daa92ec508bed9a37272316fe0f5fa0.tar.gz |
[project @ 1999-07-06 16:17:39 by sewardj]
Make vectored returns to Hugs work, and make IS_CODE_PTR etc work
for dynamically loaded objects.
-rw-r--r-- | ghc/includes/Assembler.h | 3 | ||||
-rw-r--r-- | ghc/includes/ClosureMacros.h | 15 | ||||
-rw-r--r-- | ghc/includes/StgMiscClosures.h | 5 |
3 files changed, 19 insertions, 4 deletions
diff --git a/ghc/includes/Assembler.h b/ghc/includes/Assembler.h index 913ec9eeb1..b7087129d0 100644 --- a/ghc/includes/Assembler.h +++ b/ghc/includes/Assembler.h @@ -1,6 +1,6 @@ /* ----------------------------------------------------------------------------- - * $Id: Assembler.h,v 1.6 1999/04/27 10:07:22 sewardj Exp $ + * $Id: Assembler.h,v 1.7 1999/07/06 16:17:39 sewardj Exp $ * * (c) The GHC Team 1994-1998. * @@ -223,6 +223,7 @@ extern AsmBCO asm_BCO_seq ( void ); * ------------------------------------------------------------------------*/ extern AsmVar asmClosure ( AsmBCO bco, AsmObject p ); +extern AsmVar asmGHCClosure ( AsmBCO bco, AsmObject p ); extern AsmVar asmAllocCONSTR ( AsmBCO bco, AsmInfo info ); diff --git a/ghc/includes/ClosureMacros.h b/ghc/includes/ClosureMacros.h index 34b08c31bb..07dfa09a57 100644 --- a/ghc/includes/ClosureMacros.h +++ b/ghc/includes/ClosureMacros.h @@ -1,5 +1,5 @@ /* ---------------------------------------------------------------------------- - * $Id: ClosureMacros.h,v 1.17 1999/06/25 09:13:37 simonmar Exp $ + * $Id: ClosureMacros.h,v 1.18 1999/07/06 16:17:39 sewardj Exp $ * * (c) The GHC Team, 1998-1999 * @@ -102,9 +102,22 @@ extern StgFun start; extern void* TEXT_SECTION_END_MARKER_DECL; extern void* DATA_SECTION_END_MARKER_DECL; +#ifdef INTERPRETER +/* Take into account code sections in dynamically loaded object files. */ +#define IS_CODE_PTR(p) ( ((P_)(p) < (P_)&TEXT_SECTION_END_MARKER) \ + || is_dynamically_loaded_code_or_rodata_ptr(p) ) +#define IS_DATA_PTR(p) ( ((P_)(p) >= (P_)&TEXT_SECTION_END_MARKER && \ + (P_)(p) < (P_)&DATA_SECTION_END_MARKER) \ + || is_dynamically_loaded_rwdata_ptr(p) ) +#define IS_USER_PTR(p) ( ((P_)(p) >= (P_)&DATA_SECTION_END_MARKER) \ + && is_not_dynamically_loaded_ptr(p) ) +#else #define IS_CODE_PTR(p) ((P_)(p) < (P_)&TEXT_SECTION_END_MARKER) #define IS_DATA_PTR(p) ((P_)(p) >= (P_)&TEXT_SECTION_END_MARKER && (P_)(p) < (P_)&DATA_SECTION_END_MARKER) #define IS_USER_PTR(p) ((P_)(p) >= (P_)&DATA_SECTION_END_MARKER) +#endif + + #ifdef HAVE_WIN32_DLL_SUPPORT extern int is_heap_alloced(const void* x); diff --git a/ghc/includes/StgMiscClosures.h b/ghc/includes/StgMiscClosures.h index 94bf651dc6..c1ac9f078e 100644 --- a/ghc/includes/StgMiscClosures.h +++ b/ghc/includes/StgMiscClosures.h @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: StgMiscClosures.h,v 1.13 1999/05/21 14:46:21 sof Exp $ + * $Id: StgMiscClosures.h,v 1.14 1999/07/06 16:17:40 sewardj Exp $ * * (c) The GHC Team, 1998-1999 * @@ -87,7 +87,8 @@ extern DLL_IMPORT_RTS const StgInfoTable dummy_ret_info; #ifdef INTERPRETER EXTFUN(Hugs_CONSTR_entry); -extern const StgInfoTable ret_bco_info; + +extern const vec_info_8 ret_bco_info; #endif /* INTERPRETER */ |