Chromium Code Reviews| 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 1609 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1620 Heap* heap = isolate->heap(); | 1620 Heap* heap = isolate->heap(); |
| 1621 | 1621 |
| 1622 // Create a scope for the handles in the builtins. | 1622 // Create a scope for the handles in the builtins. |
| 1623 HandleScope scope(isolate); | 1623 HandleScope scope(isolate); |
| 1624 | 1624 |
| 1625 const BuiltinDesc* functions = builtin_function_table.functions(); | 1625 const BuiltinDesc* functions = builtin_function_table.functions(); |
| 1626 | 1626 |
| 1627 // For now we generate builtin adaptor code into a stack-allocated | 1627 // For now we generate builtin adaptor code into a stack-allocated |
| 1628 // buffer, before copying it into individual code objects. Be careful | 1628 // buffer, before copying it into individual code objects. Be careful |
| 1629 // with alignment, some platforms don't like unaligned code. | 1629 // with alignment, some platforms don't like unaligned code. |
| 1630 union { int force_alignment; byte buffer[8*KB]; } u; | 1630 // TODO(jbramley): I had to increase the size of this buffer from 8KB because |
| 1631 // we can generate a lot of debug code on A64. | |
|
rmcilroy
2014/02/11 18:31:06
Is this still required?
Rodolph Perfetta
2014/02/12 01:08:24
Yes, when in debug we generate a fair amount of ex
| |
| 1632 union { int force_alignment; byte buffer[16*KB]; } u; | |
| 1631 | 1633 |
| 1632 // Traverse the list of builtins and generate an adaptor in a | 1634 // Traverse the list of builtins and generate an adaptor in a |
| 1633 // separate code object for each one. | 1635 // separate code object for each one. |
| 1634 for (int i = 0; i < builtin_count; i++) { | 1636 for (int i = 0; i < builtin_count; i++) { |
| 1635 if (create_heap_objects) { | 1637 if (create_heap_objects) { |
| 1636 MacroAssembler masm(isolate, u.buffer, sizeof u.buffer); | 1638 MacroAssembler masm(isolate, u.buffer, sizeof u.buffer); |
| 1637 // Generate the code/adaptor. | 1639 // Generate the code/adaptor. |
| 1638 typedef void (*Generator)(MacroAssembler*, int, BuiltinExtraArguments); | 1640 typedef void (*Generator)(MacroAssembler*, int, BuiltinExtraArguments); |
| 1639 Generator g = FUNCTION_CAST<Generator>(functions[i].generator); | 1641 Generator g = FUNCTION_CAST<Generator>(functions[i].generator); |
| 1640 // We pass all arguments to the generator, but it may not use all of | 1642 // We pass all arguments to the generator, but it may not use all of |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1741 } | 1743 } |
| 1742 BUILTIN_LIST_C(DEFINE_BUILTIN_ACCESSOR_C) | 1744 BUILTIN_LIST_C(DEFINE_BUILTIN_ACCESSOR_C) |
| 1743 BUILTIN_LIST_A(DEFINE_BUILTIN_ACCESSOR_A) | 1745 BUILTIN_LIST_A(DEFINE_BUILTIN_ACCESSOR_A) |
| 1744 BUILTIN_LIST_H(DEFINE_BUILTIN_ACCESSOR_H) | 1746 BUILTIN_LIST_H(DEFINE_BUILTIN_ACCESSOR_H) |
| 1745 BUILTIN_LIST_DEBUG_A(DEFINE_BUILTIN_ACCESSOR_A) | 1747 BUILTIN_LIST_DEBUG_A(DEFINE_BUILTIN_ACCESSOR_A) |
| 1746 #undef DEFINE_BUILTIN_ACCESSOR_C | 1748 #undef DEFINE_BUILTIN_ACCESSOR_C |
| 1747 #undef DEFINE_BUILTIN_ACCESSOR_A | 1749 #undef DEFINE_BUILTIN_ACCESSOR_A |
| 1748 | 1750 |
| 1749 | 1751 |
| 1750 } } // namespace v8::internal | 1752 } } // namespace v8::internal |
| OLD | NEW |