X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=includes%2FStgMiscClosures.h;h=421e62ef7a3895a3a34c27cc335df23a7c738823;hb=4b0d51372d354687f0b2f7b2c2583bed059ce315;hp=a99ff72a222f448162a8503589a8d493f4dea0f2;hpb=1ed01a871030f05905a9595e4837dfffc087ef64;p=ghc-hetmet.git diff --git a/includes/StgMiscClosures.h b/includes/StgMiscClosures.h index a99ff72..421e62e 100644 --- a/includes/StgMiscClosures.h +++ b/includes/StgMiscClosures.h @@ -8,6 +8,8 @@ * our Cmm code generator doesn't know how to generate local symbols * for the RTS bits (it assumes all RTS symbols are external). * + * See wiki:Commentary/Compiler/Backends/PprC#Prototypes + * * --------------------------------------------------------------------------*/ #ifndef STGMISCCLOSURES_H @@ -48,8 +50,12 @@ RTS_RET_INFO(stg_catch_stm_frame_info); RTS_ENTRY(stg_upd_frame_ret); RTS_ENTRY(stg_marked_upd_frame_ret); -/* Entry code for constructors created by the bytecode interpreter */ -RTS_FUN(stg_interp_constr_entry); +// RTS_FUN(stg_interp_constr_entry); +// +// This is referenced using the FFI in the compiler (ByteCodeItbls), +// so we can't give it the correct type here because the prototypes +// would clash (FFI references are always declared with type StgWord[] +// in the generated C code). /* Magic glue code for when compiled code returns a value in R1/F1/D1 or a VoidRep to the interpreter. */ @@ -493,6 +499,8 @@ RTS_FUN(stg_threadFinished); RTS_FUN(stg_init_finish); RTS_FUN(stg_init); +RTS_FUN(StgReturn); + /* ----------------------------------------------------------------------------- PrimOps -------------------------------------------------------------------------- */ @@ -518,7 +526,9 @@ RTS_FUN(int2Integerzh_fast); RTS_FUN(word2Integerzh_fast); RTS_FUN(decodeFloatzh_fast); +RTS_FUN(decodeFloatzuIntzh_fast); RTS_FUN(decodeDoublezh_fast); +RTS_FUN(decodeDoublezu2Intzh_fast); RTS_FUN(andIntegerzh_fast); RTS_FUN(orIntegerzh_fast); @@ -537,9 +547,6 @@ RTS_FUN(newByteArrayzh_fast); RTS_FUN(newPinnedByteArrayzh_fast); RTS_FUN(newArrayzh_fast); -RTS_FUN(decodeFloatzh_fast); -RTS_FUN(decodeDoublezh_fast); - RTS_FUN(newMutVarzh_fast); RTS_FUN(atomicModifyMutVarzh_fast); @@ -598,4 +605,50 @@ RTS_FUN(getApStackValzh_fast); RTS_FUN(noDuplicatezh_fast); +/* Other misc stuff */ +// See wiki:Commentary/Compiler/Backends/PprC#Prototypes + +#if IN_STG_CODE && !IN_STGCRUN + +// Interpreter.c +extern StgWord rts_stop_next_breakpoint[]; +extern StgWord rts_stop_on_exception[]; +extern StgWord rts_breakpoint_io_action[]; + +// Schedule.c +extern int RTS_VAR(context_switch); +extern StgWord RTS_VAR(blocked_queue_hd), RTS_VAR(blocked_queue_tl); +extern StgWord RTS_VAR(sleeping_queue); +extern StgWord RTS_VAR(blackhole_queue); +extern StgWord RTS_VAR(sched_mutex); + +// Apply.cmm +// canned bitmap for each arg type +extern StgWord stg_arg_bitmaps[]; +extern StgWord stg_ap_stack_entries[]; +extern StgWord stg_stack_save_entries[]; + +// Storage.c +extern unsigned int RTS_VAR(alloc_blocks); +extern unsigned int RTS_VAR(alloc_blocks_lim); +extern StgWord RTS_VAR(weak_ptr_list); +extern StgWord RTS_VAR(atomic_modify_mutvar_mutex); + +// RtsFlags +extern StgWord RTS_VAR(RtsFlags); // bogus type + +// Stable.c +extern StgWord RTS_VAR(stable_ptr_table); + +// Profiling.c +extern unsigned int RTS_VAR(era); +extern StgWord RTS_VAR(CCCS); /* current CCS */ +extern unsigned int RTS_VAR(entering_PAP); +extern StgWord RTS_VAR(CC_LIST); /* registered CC list */ +extern StgWord RTS_VAR(CCS_LIST); /* registered CCS list */ +extern unsigned int RTS_VAR(CC_ID); /* global ids */ +extern unsigned int RTS_VAR(CCS_ID); + +#endif + #endif /* STGMISCCLOSURES_H */