{
W_ words, payload_words, n, p;
{
W_ words, payload_words, n, p;
{
W_ words, bytes, payload_words, p;
{
W_ words, bytes, payload_words, p;
bytes = R1;
/* payload_words is what we will tell the profiler we had to allocate */
payload_words = ROUNDUP_BYTES_TO_WDS(bytes);
bytes = R1;
/* payload_words is what we will tell the profiler we had to allocate */
payload_words = ROUNDUP_BYTES_TO_WDS(bytes);
{
W_ words, bytes, payload_words, p, alignment;
{
W_ words, bytes, payload_words, p, alignment;
{
W_ words, n, init, arr, p;
/* Args: R1 = words, R2 = initialisation value */
n = R1;
{
W_ words, n, init, arr, p;
/* Args: R1 = words, R2 = initialisation value */
n = R1;
words = BYTES_TO_WDS(SIZEOF_StgMutArrPtrs) + n;
("ptr" arr) = foreign "C" allocateLocal(MyCapability() "ptr",words) [R2];
words = BYTES_TO_WDS(SIZEOF_StgMutArrPtrs) + n;
("ptr" arr) = foreign "C" allocateLocal(MyCapability() "ptr",words) [R2];
mv = Hp - SIZEOF_StgMutVar + WDS(1);
SET_HDR(mv,stg_MUT_VAR_DIRTY_info,W_[CCCS]);
mv = Hp - SIZEOF_StgMutVar + WDS(1);
SET_HDR(mv,stg_MUT_VAR_DIRTY_info,W_[CCCS]);
w = Hp - SIZEOF_StgWeak + WDS(1);
SET_HDR(w, stg_WEAK_info, W_[CCCS]);
w = Hp - SIZEOF_StgWeak + WDS(1);
SET_HDR(w, stg_WEAK_info, W_[CCCS]);
w = Hp - SIZEOF_StgWeak + WDS(1);
SET_HDR(w, stg_WEAK_info, W_[CCCS]);
w = Hp - SIZEOF_StgWeak + WDS(1);
SET_HDR(w, stg_WEAK_info, W_[CCCS]);
Floating point operations.
-------------------------------------------------------------------------- */
Floating point operations.
-------------------------------------------------------------------------- */
old_trec = StgTSO_trec(CurrentTSO);
/* Nested transactions are not allowed; raise an exception */
if (old_trec != NO_TREC) {
R1 = base_ControlziExceptionziBase_nestedAtomically_closure;
old_trec = StgTSO_trec(CurrentTSO);
/* Nested transactions are not allowed; raise an exception */
if (old_trec != NO_TREC) {
R1 = base_ControlziExceptionziBase_nestedAtomically_closure;
trec = StgTSO_trec(CurrentTSO);
tvar = R1;
("ptr" result) = foreign "C" stmReadTVar(MyCapability() "ptr", trec "ptr", tvar "ptr") [];
trec = StgTSO_trec(CurrentTSO);
tvar = R1;
("ptr" result) = foreign "C" stmReadTVar(MyCapability() "ptr", trec "ptr", tvar "ptr") [];
mvar = Hp - SIZEOF_StgMVar + WDS(1);
SET_HDR(mvar,stg_MVAR_DIRTY_info,W_[CCCS]);
mvar = Hp - SIZEOF_StgMVar + WDS(1);
SET_HDR(mvar,stg_MVAR_DIRTY_info,W_[CCCS]);
tso = StgMVar_head(mvar);
PerformPut(tso,StgMVar_value(mvar));
tso = StgMVar_head(mvar);
PerformPut(tso,StgMVar_value(mvar));
/* actually perform the putMVar for the thread that we just woke up */
tso = StgMVar_head(mvar);
PerformPut(tso,StgMVar_value(mvar));
/* actually perform the putMVar for the thread that we just woke up */
tso = StgMVar_head(mvar);
PerformPut(tso,StgMVar_value(mvar));
Stable pointer primitives
------------------------------------------------------------------------- */
Stable pointer primitives
------------------------------------------------------------------------- */
Bytecode object primitives
------------------------------------------------------------------------- */
Bytecode object primitives
------------------------------------------------------------------------- */
bco = Hp - bytes + WDS(1);
SET_HDR(bco, stg_BCO_info, W_[CCCS]);
bco = Hp - bytes + WDS(1);
SET_HDR(bco, stg_BCO_info, W_[CCCS]);
{
/* args: R1 = closure to analyze */
// TODO: Consider the absence of ptrs or nonptrs as a special case ?
{
/* args: R1 = closure to analyze */
// TODO: Consider the absence of ptrs or nonptrs as a special case ?
// evaluation by the current thread are also under evaluation by
// another thread. It relies on *both* threads doing noDuplicate#;
// the second one will get blocked if they are duplicating some work.
// evaluation by the current thread are also under evaluation by
// another thread. It relies on *both* threads doing noDuplicate#;
// the second one will get blocked if they are duplicating some work.
{
W_ ap_stack, offset, val, ok;
{
W_ ap_stack, offset, val, ok;
// Write the cost center stack of the first argument on stderr; return
// the second. Possibly only makes sense for already evaluated
// things?
// Write the cost center stack of the first argument on stderr; return
// the second. Possibly only makes sense for already evaluated
// things?