Commit pre enabling CTCE pass (which is quite slow, but does work). Had to add walking through cast nodes for finding variables to close over. Also had to remove the static in front of functions to prevent gcc compiling it so that it segfaults (doesn't segfault if compiled with clang, but wanted to make sure.)
This commit is contained in:
@@ -204,8 +204,9 @@ obj c_generator (Object) {
|
||||
parameters += ", ..."
|
||||
}
|
||||
var possibly_static = string()
|
||||
if (!backing.is_extern && decorated_name != "main")
|
||||
possibly_static = "static "
|
||||
// commented out to fix phantom crash
|
||||
/*if (!backing.is_extern && decorated_name != "main")*/
|
||||
/*possibly_static = "static "*/
|
||||
return make_pair(possibly_static + type_to_c(backing.type->return_type) + " " + decorated_name + "(" + parameter_types + ");\n",
|
||||
possibly_static + type_to_c(backing.type->return_type) + " " + decorated_name + "(" + parameters + ")")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user