Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion compiler/make/Makefile.compiler.head
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ endif
include $(CHPL_MAKE_HOME)/make/Makefile.base

INCL_CFLAGS = -I. -I$(COMPILER_ROOT)/include/$(CHPL_MAKE_HOST_PLATFORM) -I$(COMPILER_ROOT)/include $(LLVM_INCLUDES)
COMP_CFLAGS += $(INCL_CFLAGS)
COMP_CFLAGS += $(INCL_CFLAGS) -DHILDE_MM=1

#
# add gc-related stuff
Expand Down
12 changes: 7 additions & 5 deletions compiler/resolution/callDestructors.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#include "symbol.h"


#ifndef HILDE_MM
// Clear autoDestroy flags on variables that get assigned to the return value of
// certain functions.
//
Expand Down Expand Up @@ -55,9 +56,8 @@ static void cullAutoDestroyFlags()
if (ts->hasFlag(FLAG_ARRAY) ||
ts->hasFlag(FLAG_DOMAIN) ||
ts->hasFlag(FLAG_SYNC) ||
ts->hasFlag(FLAG_SINGLE)) {
ts->hasFlag(FLAG_SINGLE))
ret->removeFlag(FLAG_INSERT_AUTO_DESTROY);
}
// Do we need to add other record-wrapped types here? Testing will tell.

// NOTE 1: When the value of a record field is established in a default
Expand Down Expand Up @@ -664,7 +664,7 @@ returnRecordsByReferenceArguments() {
}
freeDefUseMaps(defMap, useMap);
}

#endif

static void
fixupDestructors() {
Expand Down Expand Up @@ -794,7 +794,7 @@ static void insertDestructorCalls()
}
}


#ifndef HILDE_MM
static void insertAutoCopyTemps()
{
Map<Symbol*,Vec<SymExpr*>*> defMap;
Expand Down Expand Up @@ -825,7 +825,7 @@ static void insertAutoCopyTemps()

freeDefUseMaps(defMap, useMap);
}

#endif

// This routine inserts autoCopy calls ahead of yield statements as necessary,
// so the calling routine "owns" the returned value.
Expand Down Expand Up @@ -907,11 +907,13 @@ void
callDestructors() {
fixupDestructors();
insertDestructorCalls();
#ifndef HILDE_MM
insertAutoCopyTemps();
cullAutoDestroyFlags();
cullExplicitAutoDestroyFlags();
insertAutoDestroyCalls();
returnRecordsByReferenceArguments();
#endif
insertYieldTemps();
insertGlobalAutoDestroyCalls();
insertReferenceTemps();
Expand Down