| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 1716 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1727 Heap* heap = isolate->heap(); | 1727 Heap* heap = isolate->heap(); |
| 1728 | 1728 |
| 1729 // Create a scope for the handles in the builtins. | 1729 // Create a scope for the handles in the builtins. |
| 1730 HandleScope scope(isolate); | 1730 HandleScope scope(isolate); |
| 1731 | 1731 |
| 1732 const BuiltinDesc* functions = builtin_function_table.functions(); | 1732 const BuiltinDesc* functions = builtin_function_table.functions(); |
| 1733 | 1733 |
| 1734 // For now we generate builtin adaptor code into a stack-allocated | 1734 // For now we generate builtin adaptor code into a stack-allocated |
| 1735 // buffer, before copying it into individual code objects. Be careful | 1735 // buffer, before copying it into individual code objects. Be careful |
| 1736 // with alignment, some platforms don't like unaligned code. | 1736 // with alignment, some platforms don't like unaligned code. |
| 1737 union { int force_alignment; byte buffer[8*KB]; } u; | 1737 // TODO(jbramley): I had to increase the size of this buffer from 8KB because |
| 1738 // we can generate a lot of debug code on A64. |
| 1739 union { int force_alignment; byte buffer[16*KB]; } u; |
| 1738 | 1740 |
| 1739 // Traverse the list of builtins and generate an adaptor in a | 1741 // Traverse the list of builtins and generate an adaptor in a |
| 1740 // separate code object for each one. | 1742 // separate code object for each one. |
| 1741 for (int i = 0; i < builtin_count; i++) { | 1743 for (int i = 0; i < builtin_count; i++) { |
| 1742 if (create_heap_objects) { | 1744 if (create_heap_objects) { |
| 1743 MacroAssembler masm(isolate, u.buffer, sizeof u.buffer); | 1745 MacroAssembler masm(isolate, u.buffer, sizeof u.buffer); |
| 1744 // Generate the code/adaptor. | 1746 // Generate the code/adaptor. |
| 1745 typedef void (*Generator)(MacroAssembler*, int, BuiltinExtraArguments); | 1747 typedef void (*Generator)(MacroAssembler*, int, BuiltinExtraArguments); |
| 1746 Generator g = FUNCTION_CAST<Generator>(functions[i].generator); | 1748 Generator g = FUNCTION_CAST<Generator>(functions[i].generator); |
| 1747 // We pass all arguments to the generator, but it may not use all of | 1749 // We pass all arguments to the generator, but it may not use all of |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1830 return Handle<Code>(code_address); \ | 1832 return Handle<Code>(code_address); \ |
| 1831 } | 1833 } |
| 1832 BUILTIN_LIST_C(DEFINE_BUILTIN_ACCESSOR_C) | 1834 BUILTIN_LIST_C(DEFINE_BUILTIN_ACCESSOR_C) |
| 1833 BUILTIN_LIST_A(DEFINE_BUILTIN_ACCESSOR_A) | 1835 BUILTIN_LIST_A(DEFINE_BUILTIN_ACCESSOR_A) |
| 1834 BUILTIN_LIST_DEBUG_A(DEFINE_BUILTIN_ACCESSOR_A) | 1836 BUILTIN_LIST_DEBUG_A(DEFINE_BUILTIN_ACCESSOR_A) |
| 1835 #undef DEFINE_BUILTIN_ACCESSOR_C | 1837 #undef DEFINE_BUILTIN_ACCESSOR_C |
| 1836 #undef DEFINE_BUILTIN_ACCESSOR_A | 1838 #undef DEFINE_BUILTIN_ACCESSOR_A |
| 1837 | 1839 |
| 1838 | 1840 |
| 1839 } } // namespace v8::internal | 1841 } } // namespace v8::internal |
| OLD | NEW |