| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |