Skip to content
Snippets Groups Projects
Commit c3c9d159 authored by Sven Tennie's avatar Sven Tennie :smiley_cat:
Browse files

Fix compile errors

This commit will be squashed.
parent 78c2c2f8
No related branches found
No related tags found
No related merge requests found
Pipeline #27014 failed
......@@ -44,12 +44,13 @@ static StgStack* cloneStackChunk(Capability* capability, const StgStack* stack)
StgStack* cloneStack(Capability* capability, const StgStack* stack)
{
StgStack *top_stack = cloneStackChunk(capability, stack);
StgStack last_stack = top_stack;
StgStack *last_stack = top_stack;
while (true) {
// check whether the stack ends in an underflow frame
StgPtr top = last_stack->stack + last_stack->stack_size
StgUnderflowFrame *frame = ((StgUnderflowFrame *)top)[-1];
if (frame->header.info == &stg_UNDERFLOW_FRAME_info) {
StgPtr top = last_stack->stack + last_stack->stack_size;
StgUnderflowFrame *underFlowFrame = ((StgUnderflowFrame *) top);
StgUnderflowFrame *frame = underFlowFrame--;
if (frame->info == &stg_stack_underflow_frame_info) {
StgStack *s = cloneStackChunk(capability, frame->next_chunk);
frame->next_chunk = s;
last_stack = s;
......@@ -96,9 +97,8 @@ void handleCloneStackMessage(MessageCloneStack *msg){
#else // !defined(THREADED_RTS)
GNU_ATTRIBUTE(__noreturn__)
void sendCloneStackMessage(StgTSO *tso STG_UNUSED, HsStablePtr mvar STG_UNUSED) {
void sendCloneStackMessage(StgTSO *tso STG_UNUSED, HsStablePtr mvar STG_UNUSED) {
barf("Sending CloneStackMessages is only available in threaded RTS!");
}
#endif // end !defined(THREADED_RTS)
......@@ -12,12 +12,12 @@ extern StgClosure DLL_IMPORT_DATA_VARNAME(base_GHCziStackziCloneStack_StackSnaps
StgStack* cloneStack(Capability* capability, const StgStack* stack);
void sendCloneStackMessage(StgTSO *tso, HsStablePtr mvar);
#include "BeginPrivate.h"
#if defined(THREADED_RTS)
void handleCloneStackMessage(MessageCloneStack *msg);
#endif
void sendCloneStackMessage(StgTSO *tso, HsStablePtr mvar);
#include "EndPrivate.h"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment