aboutsummaryrefslogtreecommitdiffstats
path: root/mjit.c
diff options
context:
space:
mode:
authorTakashi Kokubun <takashikkbn@gmail.com>2020-11-20 23:31:23 -0800
committerTakashi Kokubun <takashikkbn@gmail.com>2020-11-20 23:39:30 -0800
commit27d5af59a359909e0d434459c30cfc0940f60a5b (patch)
tree307c856a482efc27a8f61e9187b731cde669fa62 /mjit.c
parentd645f18f0fd6b9bd5373ef99b95b04b29f73472b (diff)
downloadruby-27d5af59a359909e0d434459c30cfc0940f60a5b.tar.gz
Unify some confusing macro usages
_MSC_VER used to be the macro to switch JIT compaction. However, since d4381d2ceb, the correct macro to switch it was changed from _MSC_VER to _WIN32. As I didn't properly replace all relevant _MSC_VER usages to _WIN32, these macros have been used inconsistently. nobu replaced _WIN32 with USE_HEADER_TRANSFORMATION in 5eb446d12f3. Therefore we had USE_HEADER_TRANSFORMATION and _MSC_VER. This commit makes sure such inconsistent _MSC_VER usages will be unified to the new header, also renaming it to USE_JIT_COMPACTION to be more precise about the requirements. The header transformation itself is not quite relevant to places changed in this commit.
Diffstat (limited to 'mjit.c')
-rw-r--r--mjit.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mjit.c b/mjit.c
index 32a31e8829..3da9d95d3c 100644
--- a/mjit.c
+++ b/mjit.c
@@ -879,7 +879,7 @@ mjit_resume(void)
return Qtrue;
}
-// Skip calling `clean_object_files` for units which currently exist in the list.
+// Skip calling `clean_temp_files` for units which currently exist in the list.
static void
skip_cleaning_object_files(struct rb_mjit_unit_list *list)
{
@@ -887,7 +887,7 @@ skip_cleaning_object_files(struct rb_mjit_unit_list *list)
// No mutex for list, assuming MJIT worker does not exist yet since it's immediately after fork.
list_for_each_safe(&list->head, unit, next, unode) {
-#ifndef _MSC_VER // Actually mswin does not reach here since it doesn't have fork
+#ifdef USE_JIT_COMPACTION
if (unit->c_file) unit->c_file_inherited_p = true;
#endif