X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=includes%2FStgMiscClosures.h;h=9158682047d58ae25134fc2396f48867e6fd9d19;hb=2b16fa4791b08b02df8461f3b79d0e44d72d0960;hp=4a6a7c47c27b5f320995a808ce96db9fc7e9d77e;hpb=0065d5ab628975892cea1ec7303f968c3338cbe1;p=ghc-hetmet.git diff --git a/includes/StgMiscClosures.h b/includes/StgMiscClosures.h index 4a6a7c4..9158682 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 @@ -39,27 +41,22 @@ RTS_RET_INFO(stg_upd_frame_info); RTS_RET_INFO(stg_marked_upd_frame_info); RTS_RET_INFO(stg_noupd_frame_info); -RTS_RET_INFO(stg_seq_frame_info); RTS_RET_INFO(stg_catch_frame_info); RTS_RET_INFO(stg_catch_retry_frame_info); RTS_RET_INFO(stg_atomically_frame_info); RTS_RET_INFO(stg_atomically_waiting_frame_info); RTS_RET_INFO(stg_catch_stm_frame_info); +RTS_RET_INFO(stg_unblockAsyncExceptionszh_ret_info); RTS_ENTRY(stg_upd_frame_ret); RTS_ENTRY(stg_marked_upd_frame_ret); -RTS_ENTRY(stg_seq_frame_ret); - -/* Entry code for constructors created by the bytecode interpreter */ -RTS_FUN(stg_interp_constr_entry); -RTS_FUN(stg_interp_constr1_entry); -RTS_FUN(stg_interp_constr2_entry); -RTS_FUN(stg_interp_constr3_entry); -RTS_FUN(stg_interp_constr4_entry); -RTS_FUN(stg_interp_constr5_entry); -RTS_FUN(stg_interp_constr6_entry); -RTS_FUN(stg_interp_constr7_entry); -RTS_FUN(stg_interp_constr8_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. */ @@ -84,14 +81,6 @@ RTS_ENTRY(stg_apply_interp_ret); RTS_INFO(stg_IND_info); RTS_INFO(stg_IND_direct_info); -RTS_INFO(stg_IND_0_info); -RTS_INFO(stg_IND_1_info); -RTS_INFO(stg_IND_2_info); -RTS_INFO(stg_IND_3_info); -RTS_INFO(stg_IND_4_info); -RTS_INFO(stg_IND_5_info); -RTS_INFO(stg_IND_6_info); -RTS_INFO(stg_IND_7_info); RTS_INFO(stg_IND_STATIC_info); RTS_INFO(stg_IND_PERM_info); RTS_INFO(stg_IND_OLDGEN_info); @@ -117,8 +106,8 @@ RTS_INFO(stg_EVACUATED_info); RTS_INFO(stg_WEAK_info); RTS_INFO(stg_DEAD_WEAK_info); RTS_INFO(stg_STABLE_NAME_info); -RTS_INFO(stg_FULL_MVAR_info); -RTS_INFO(stg_EMPTY_MVAR_info); +RTS_INFO(stg_MVAR_CLEAN_info); +RTS_INFO(stg_MVAR_DIRTY_info); RTS_INFO(stg_TSO_info); RTS_INFO(stg_ARR_WORDS_info); RTS_INFO(stg_MUT_ARR_WORDS_info); @@ -133,27 +122,24 @@ RTS_INFO(stg_MUT_CONS_info); RTS_INFO(stg_catch_info); RTS_INFO(stg_PAP_info); RTS_INFO(stg_AP_info); +RTS_INFO(stg_AP_NOUPD_info); RTS_INFO(stg_AP_STACK_info); RTS_INFO(stg_dummy_ret_info); RTS_INFO(stg_raise_info); -RTS_INFO(stg_TVAR_WAIT_QUEUE_info); +RTS_INFO(stg_raise_ret_info); +RTS_INFO(stg_TVAR_WATCH_QUEUE_info); +RTS_INFO(stg_INVARIANT_CHECK_QUEUE_info); +RTS_INFO(stg_ATOMIC_INVARIANT_info); RTS_INFO(stg_TVAR_info); RTS_INFO(stg_TREC_CHUNK_info); RTS_INFO(stg_TREC_HEADER_info); -RTS_INFO(stg_END_STM_WAIT_QUEUE_info); +RTS_INFO(stg_END_STM_WATCH_QUEUE_info); +RTS_INFO(stg_END_INVARIANT_CHECK_QUEUE_info); RTS_INFO(stg_END_STM_CHUNK_LIST_info); RTS_INFO(stg_NO_TREC_info); RTS_ENTRY(stg_IND_entry); RTS_ENTRY(stg_IND_direct_entry); -RTS_ENTRY(stg_IND_0_entry); -RTS_ENTRY(stg_IND_1_entry); -RTS_ENTRY(stg_IND_2_entry); -RTS_ENTRY(stg_IND_3_entry); -RTS_ENTRY(stg_IND_4_entry); -RTS_ENTRY(stg_IND_5_entry); -RTS_ENTRY(stg_IND_6_entry); -RTS_ENTRY(stg_IND_7_entry); RTS_ENTRY(stg_IND_STATIC_entry); RTS_ENTRY(stg_IND_PERM_entry); RTS_ENTRY(stg_IND_OLDGEN_entry); @@ -194,14 +180,19 @@ RTS_ENTRY(stg_MUT_CONS_entry); RTS_ENTRY(stg_catch_entry); RTS_ENTRY(stg_PAP_entry); RTS_ENTRY(stg_AP_entry); +RTS_ENTRY(stg_AP_NOUPD_entry); RTS_ENTRY(stg_AP_STACK_entry); RTS_ENTRY(stg_dummy_ret_entry); RTS_ENTRY(stg_raise_entry); -RTS_ENTRY(stg_END_STM_WAIT_QUEUE_entry); +RTS_ENTRY(stg_raise_ret_ret); +RTS_ENTRY(stg_END_STM_WATCH_QUEUE_entry); +RTS_ENTRY(stg_END_INVARIANT_CHECK_QUEUE_entry); RTS_ENTRY(stg_END_STM_CHUNK_LIST_entry); RTS_ENTRY(stg_NO_TREC_entry); RTS_ENTRY(stg_TVAR_entry); -RTS_ENTRY(stg_TVAR_WAIT_QUEUE_entry); +RTS_ENTRY(stg_TVAR_WATCH_QUEUE_entry); +RTS_ENTRY(stg_INVARIANT_CHECK_QUEUE_entry); +RTS_ENTRY(stg_ATOMIC_INVARIANT_entry); RTS_ENTRY(stg_TREC_CHUNK_entry); RTS_ENTRY(stg_TREC_HEADER_entry); @@ -224,7 +215,8 @@ RTS_CLOSURE(stg_NO_FINALIZER_closure); RTS_CLOSURE(stg_dummy_ret_closure); RTS_CLOSURE(stg_forceIO_closure); -RTS_CLOSURE(stg_END_STM_WAIT_QUEUE_closure); +RTS_CLOSURE(stg_END_STM_WATCH_QUEUE_closure); +RTS_CLOSURE(stg_END_INVARIANT_CHECK_QUEUE_closure); RTS_CLOSURE(stg_END_STM_CHUNK_LIST_closure); RTS_CLOSURE(stg_NO_TREC_closure); @@ -490,6 +482,9 @@ RTS_FUN(stg_block_async_void); RTS_ENTRY(stg_block_async_void_ret); #endif RTS_FUN(stg_block_stmwait); +RTS_FUN(stg_block_throwto); +RTS_ENTRY(stg_block_throwto_ret); +RTS_RET_INFO(stg_block_throwto_info); /* Entry/exit points from StgStartup.cmm */ @@ -500,10 +495,13 @@ RTS_FUN(stg_returnToStackTop); RTS_FUN(stg_returnToSched); RTS_FUN(stg_returnToSchedNotPaused); RTS_FUN(stg_returnToSchedButFirst); +RTS_FUN(stg_threadFinished); RTS_FUN(stg_init_finish); RTS_FUN(stg_init); +RTS_FUN(StgReturn); + /* ----------------------------------------------------------------------------- PrimOps -------------------------------------------------------------------------- */ @@ -529,7 +527,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); @@ -548,9 +548,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); @@ -582,11 +579,13 @@ RTS_FUN(forkzh_fast); RTS_FUN(forkOnzh_fast); RTS_FUN(yieldzh_fast); RTS_FUN(killThreadzh_fast); +RTS_FUN(asyncExceptionsBlockedzh_fast); RTS_FUN(blockAsyncExceptionszh_fast); RTS_FUN(unblockAsyncExceptionszh_fast); RTS_FUN(myThreadIdzh_fast); RTS_FUN(labelThreadzh_fast); RTS_FUN(isCurrentThreadBoundzh_fast); +RTS_FUN(threadStatuszh_fast); RTS_FUN(mkWeakzh_fast); RTS_FUN(finalizzeWeakzh_fast); @@ -601,6 +600,59 @@ RTS_FUN(catchSTMzh_fast); RTS_FUN(atomicallyzh_fast); RTS_FUN(newTVarzh_fast); RTS_FUN(readTVarzh_fast); +RTS_FUN(readTVarIOzh_fast); RTS_FUN(writeTVarzh_fast); +RTS_FUN(checkzh_fast); + +RTS_FUN(unpackClosurezh_fast); +RTS_FUN(getApStackValzh_fast); +RTS_FUN(getSparkzh_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 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 */