Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(121)

Side by Side Diff: src/builtins.cc

Issue 1415463002: Stack buffer for builtin code generation too small in some cases. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: update based on review comments Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/builtins.h" 5 #include "src/builtins.h"
6 6
7 #include "src/api.h" 7 #include "src/api.h"
8 #include "src/api-natives.h" 8 #include "src/api-natives.h"
9 #include "src/arguments.h" 9 #include "src/arguments.h"
10 #include "src/base/once.h" 10 #include "src/base/once.h"
(...skipping 2076 matching lines...) Expand 10 before | Expand all | Expand 10 after
2087 HandleScope scope(isolate); 2087 HandleScope scope(isolate);
2088 2088
2089 const BuiltinDesc* functions = builtin_function_table.functions(); 2089 const BuiltinDesc* functions = builtin_function_table.functions();
2090 2090
2091 // For now we generate builtin adaptor code into a stack-allocated 2091 // For now we generate builtin adaptor code into a stack-allocated
2092 // buffer, before copying it into individual code objects. Be careful 2092 // buffer, before copying it into individual code objects. Be careful
2093 // with alignment, some platforms don't like unaligned code. 2093 // with alignment, some platforms don't like unaligned code.
2094 #ifdef DEBUG 2094 #ifdef DEBUG
2095 // We can generate a lot of debug code on Arm64. 2095 // We can generate a lot of debug code on Arm64.
2096 const size_t buffer_size = 32*KB; 2096 const size_t buffer_size = 32*KB;
2097 #elif V8_TARGET_ARCH_PPC64
2098 // 8 KB is insufficient on PPC64 when FLAG_debug_code is on.
2099 const size_t buffer_size = 10 * KB;
2097 #else 2100 #else
2098 const size_t buffer_size = 8*KB; 2101 const size_t buffer_size = 8*KB;
2099 #endif 2102 #endif
2100 union { int force_alignment; byte buffer[buffer_size]; } u; 2103 union { int force_alignment; byte buffer[buffer_size]; } u;
2101 2104
2102 // Traverse the list of builtins and generate an adaptor in a 2105 // Traverse the list of builtins and generate an adaptor in a
2103 // separate code object for each one. 2106 // separate code object for each one.
2104 for (int i = 0; i < builtin_count; i++) { 2107 for (int i = 0; i < builtin_count; i++) {
2105 if (create_heap_objects) { 2108 if (create_heap_objects) {
2106 MacroAssembler masm(isolate, u.buffer, sizeof u.buffer); 2109 MacroAssembler masm(isolate, u.buffer, sizeof u.buffer);
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
2199 BUILTIN_LIST_C(DEFINE_BUILTIN_ACCESSOR_C) 2202 BUILTIN_LIST_C(DEFINE_BUILTIN_ACCESSOR_C)
2200 BUILTIN_LIST_A(DEFINE_BUILTIN_ACCESSOR_A) 2203 BUILTIN_LIST_A(DEFINE_BUILTIN_ACCESSOR_A)
2201 BUILTIN_LIST_H(DEFINE_BUILTIN_ACCESSOR_H) 2204 BUILTIN_LIST_H(DEFINE_BUILTIN_ACCESSOR_H)
2202 BUILTIN_LIST_DEBUG_A(DEFINE_BUILTIN_ACCESSOR_A) 2205 BUILTIN_LIST_DEBUG_A(DEFINE_BUILTIN_ACCESSOR_A)
2203 #undef DEFINE_BUILTIN_ACCESSOR_C 2206 #undef DEFINE_BUILTIN_ACCESSOR_C
2204 #undef DEFINE_BUILTIN_ACCESSOR_A 2207 #undef DEFINE_BUILTIN_ACCESSOR_A
2205 2208
2206 2209
2207 } // namespace internal 2210 } // namespace internal
2208 } // namespace v8 2211 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698