diff options
Diffstat (limited to 'src/passes/Precompute.cpp')
-rw-r--r-- | src/passes/Precompute.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/passes/Precompute.cpp b/src/passes/Precompute.cpp index 5baf2331f..89e618ab3 100644 --- a/src/passes/Precompute.cpp +++ b/src/passes/Precompute.cpp @@ -799,9 +799,11 @@ private: if (type.isFunction()) { return true; } - // We can emit a StringConst for a string constant. + // We can emit a StringConst for a string constant in principle, but we do + // not want to as that might cause more allocations to happen. See similar + // code in SimplifyGlobals. if (type.isString()) { - return true; + return false; } // All other reference types cannot be precomputed. Even an immutable GC // reference is not currently something this pass can handle, as it will |