| 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/v8.h" | 5 #include "src/v8.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 1412 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1423 HandleScope scope(isolate); | 1423 HandleScope scope(isolate); |
| 1424 | 1424 |
| 1425 const BuiltinDesc* functions = builtin_function_table.functions(); | 1425 const BuiltinDesc* functions = builtin_function_table.functions(); |
| 1426 | 1426 |
| 1427 // For now we generate builtin adaptor code into a stack-allocated | 1427 // For now we generate builtin adaptor code into a stack-allocated |
| 1428 // buffer, before copying it into individual code objects. Be careful | 1428 // buffer, before copying it into individual code objects. Be careful |
| 1429 // with alignment, some platforms don't like unaligned code. | 1429 // with alignment, some platforms don't like unaligned code. |
| 1430 #ifdef DEBUG | 1430 #ifdef DEBUG |
| 1431 // We can generate a lot of debug code on Arm64. | 1431 // We can generate a lot of debug code on Arm64. |
| 1432 const size_t buffer_size = 32*KB; | 1432 const size_t buffer_size = 32*KB; |
| 1433 #elif V8_TARGET_ARCH_PPC64 |
| 1434 // 8 KB is insufficient on PPC64 when FLAG_debug_code is on. |
| 1435 const size_t buffer_size = 10 * KB; |
| 1433 #else | 1436 #else |
| 1434 const size_t buffer_size = 8*KB; | 1437 const size_t buffer_size = 8*KB; |
| 1435 #endif | 1438 #endif |
| 1436 union { int force_alignment; byte buffer[buffer_size]; } u; | 1439 union { int force_alignment; byte buffer[buffer_size]; } u; |
| 1437 | 1440 |
| 1438 // Traverse the list of builtins and generate an adaptor in a | 1441 // Traverse the list of builtins and generate an adaptor in a |
| 1439 // separate code object for each one. | 1442 // separate code object for each one. |
| 1440 for (int i = 0; i < builtin_count; i++) { | 1443 for (int i = 0; i < builtin_count; i++) { |
| 1441 if (create_heap_objects) { | 1444 if (create_heap_objects) { |
| 1442 MacroAssembler masm(isolate, u.buffer, sizeof u.buffer); | 1445 MacroAssembler masm(isolate, u.buffer, sizeof u.buffer); |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1535 BUILTIN_LIST_C(DEFINE_BUILTIN_ACCESSOR_C) | 1538 BUILTIN_LIST_C(DEFINE_BUILTIN_ACCESSOR_C) |
| 1536 BUILTIN_LIST_A(DEFINE_BUILTIN_ACCESSOR_A) | 1539 BUILTIN_LIST_A(DEFINE_BUILTIN_ACCESSOR_A) |
| 1537 BUILTIN_LIST_H(DEFINE_BUILTIN_ACCESSOR_H) | 1540 BUILTIN_LIST_H(DEFINE_BUILTIN_ACCESSOR_H) |
| 1538 BUILTIN_LIST_DEBUG_A(DEFINE_BUILTIN_ACCESSOR_A) | 1541 BUILTIN_LIST_DEBUG_A(DEFINE_BUILTIN_ACCESSOR_A) |
| 1539 #undef DEFINE_BUILTIN_ACCESSOR_C | 1542 #undef DEFINE_BUILTIN_ACCESSOR_C |
| 1540 #undef DEFINE_BUILTIN_ACCESSOR_A | 1543 #undef DEFINE_BUILTIN_ACCESSOR_A |
| 1541 | 1544 |
| 1542 | 1545 |
| 1543 } // namespace internal | 1546 } // namespace internal |
| 1544 } // namespace v8 | 1547 } // namespace v8 |
| OLD | NEW |