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 1635 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1646 | 1646 |
1647 // Create a scope for the handles in the builtins. | 1647 // Create a scope for the handles in the builtins. |
1648 HandleScope scope(isolate); | 1648 HandleScope scope(isolate); |
1649 | 1649 |
1650 const BuiltinDesc* functions = builtin_function_table.functions(); | 1650 const BuiltinDesc* functions = builtin_function_table.functions(); |
1651 | 1651 |
1652 // For now we generate builtin adaptor code into a stack-allocated | 1652 // For now we generate builtin adaptor code into a stack-allocated |
1653 // buffer, before copying it into individual code objects. Be careful | 1653 // buffer, before copying it into individual code objects. Be careful |
1654 // with alignment, some platforms don't like unaligned code. | 1654 // with alignment, some platforms don't like unaligned code. |
1655 // TODO(jbramley): I had to increase the size of this buffer from 8KB because | 1655 // TODO(jbramley): I had to increase the size of this buffer from 8KB because |
1656 // we can generate a lot of debug code on A64. | 1656 // we can generate a lot of debug code on ARM64. |
1657 union { int force_alignment; byte buffer[16*KB]; } u; | 1657 union { int force_alignment; byte buffer[16*KB]; } u; |
1658 | 1658 |
1659 // Traverse the list of builtins and generate an adaptor in a | 1659 // Traverse the list of builtins and generate an adaptor in a |
1660 // separate code object for each one. | 1660 // separate code object for each one. |
1661 for (int i = 0; i < builtin_count; i++) { | 1661 for (int i = 0; i < builtin_count; i++) { |
1662 if (create_heap_objects) { | 1662 if (create_heap_objects) { |
1663 MacroAssembler masm(isolate, u.buffer, sizeof u.buffer); | 1663 MacroAssembler masm(isolate, u.buffer, sizeof u.buffer); |
1664 // Generate the code/adaptor. | 1664 // Generate the code/adaptor. |
1665 typedef void (*Generator)(MacroAssembler*, int, BuiltinExtraArguments); | 1665 typedef void (*Generator)(MacroAssembler*, int, BuiltinExtraArguments); |
1666 Generator g = FUNCTION_CAST<Generator>(functions[i].generator); | 1666 Generator g = FUNCTION_CAST<Generator>(functions[i].generator); |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1768 } | 1768 } |
1769 BUILTIN_LIST_C(DEFINE_BUILTIN_ACCESSOR_C) | 1769 BUILTIN_LIST_C(DEFINE_BUILTIN_ACCESSOR_C) |
1770 BUILTIN_LIST_A(DEFINE_BUILTIN_ACCESSOR_A) | 1770 BUILTIN_LIST_A(DEFINE_BUILTIN_ACCESSOR_A) |
1771 BUILTIN_LIST_H(DEFINE_BUILTIN_ACCESSOR_H) | 1771 BUILTIN_LIST_H(DEFINE_BUILTIN_ACCESSOR_H) |
1772 BUILTIN_LIST_DEBUG_A(DEFINE_BUILTIN_ACCESSOR_A) | 1772 BUILTIN_LIST_DEBUG_A(DEFINE_BUILTIN_ACCESSOR_A) |
1773 #undef DEFINE_BUILTIN_ACCESSOR_C | 1773 #undef DEFINE_BUILTIN_ACCESSOR_C |
1774 #undef DEFINE_BUILTIN_ACCESSOR_A | 1774 #undef DEFINE_BUILTIN_ACCESSOR_A |
1775 | 1775 |
1776 | 1776 |
1777 } } // namespace v8::internal | 1777 } } // namespace v8::internal |
OLD | NEW |