diff options
Diffstat (limited to 'src/passes/Precompute.cpp')
-rw-r--r-- | src/passes/Precompute.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/passes/Precompute.cpp b/src/passes/Precompute.cpp index c90fdf167..5fff7710b 100644 --- a/src/passes/Precompute.cpp +++ b/src/passes/Precompute.cpp @@ -509,6 +509,10 @@ private: if (type.isFunction()) { return true; } + // We can emit a StringConst for a string constant. + if (type.isString()) { + return true; + } // All other reference types cannot be precomputed. Even an immutable GC // reference is not currently something this pass can handle, as it will // evaluate and reevaluate code multiple times in e.g. propagateLocals, see |