Index: src/builtins.cc |
diff --git a/src/builtins.cc b/src/builtins.cc |
index d0c1a446a8beb9e80e5ddce6fab385d74468363c..b523450e2880dcd174e7c384f3251ddf43079dd3 100644 |
--- a/src/builtins.cc |
+++ b/src/builtins.cc |
@@ -1604,9 +1604,13 @@ void Builtins::SetUp(Isolate* isolate, bool create_heap_objects) { |
// For now we generate builtin adaptor code into a stack-allocated |
// buffer, before copying it into individual code objects. Be careful |
// with alignment, some platforms don't like unaligned code. |
- // TODO(jbramley): I had to increase the size of this buffer from 8KB because |
- // we can generate a lot of debug code on ARM64. |
- union { int force_alignment; byte buffer[16*KB]; } u; |
+#ifdef DEBUG |
+ // We can generate a lot of debug code on Arm64. |
+ const size_t buffer_size = 32*KB; |
+#else |
+ const size_t buffer_size = 8*KB; |
+#endif |
+ union { int force_alignment; byte buffer[buffer_size]; } u; |
// Traverse the list of builtins and generate an adaptor in a |
// separate code object for each one. |