| 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 1637 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1648 functions->generator = FUNCTION_ADDR(Generate_##aname); \ | 1648 functions->generator = FUNCTION_ADDR(Generate_##aname); \ |
| 1649 functions->c_code = NULL; \ | 1649 functions->c_code = NULL; \ |
| 1650 functions->s_name = #aname; \ | 1650 functions->s_name = #aname; \ |
| 1651 functions->name = k##aname; \ | 1651 functions->name = k##aname; \ |
| 1652 functions->flags = Code::ComputeFlags(Code::kind, \ | 1652 functions->flags = Code::ComputeFlags(Code::kind, \ |
| 1653 state, \ | 1653 state, \ |
| 1654 extra); \ | 1654 extra); \ |
| 1655 functions->extra_args = NO_EXTRA_ARGUMENTS; \ | 1655 functions->extra_args = NO_EXTRA_ARGUMENTS; \ |
| 1656 ++functions; | 1656 ++functions; |
| 1657 | 1657 |
| 1658 #define DEF_FUNCTION_PTR_H(aname, kind, extra) \ |
| 1659 functions->generator = FUNCTION_ADDR(Generate_##aname); \ |
| 1660 functions->c_code = NULL; \ |
| 1661 functions->s_name = #aname; \ |
| 1662 functions->name = k##aname; \ |
| 1663 functions->flags = Code::ComputeFlags( \ |
| 1664 Code::HANDLER, MONOMORPHIC, extra, Code::NORMAL, Code::kind); \ |
| 1665 functions->extra_args = NO_EXTRA_ARGUMENTS; \ |
| 1666 ++functions; |
| 1667 |
| 1658 BUILTIN_LIST_C(DEF_FUNCTION_PTR_C) | 1668 BUILTIN_LIST_C(DEF_FUNCTION_PTR_C) |
| 1659 BUILTIN_LIST_A(DEF_FUNCTION_PTR_A) | 1669 BUILTIN_LIST_A(DEF_FUNCTION_PTR_A) |
| 1670 BUILTIN_LIST_H(DEF_FUNCTION_PTR_H) |
| 1660 BUILTIN_LIST_DEBUG_A(DEF_FUNCTION_PTR_A) | 1671 BUILTIN_LIST_DEBUG_A(DEF_FUNCTION_PTR_A) |
| 1661 | 1672 |
| 1662 #undef DEF_FUNCTION_PTR_C | 1673 #undef DEF_FUNCTION_PTR_C |
| 1663 #undef DEF_FUNCTION_PTR_A | 1674 #undef DEF_FUNCTION_PTR_A |
| 1664 } | 1675 } |
| 1665 | 1676 |
| 1666 | 1677 |
| 1667 void Builtins::SetUp(Isolate* isolate, bool create_heap_objects) { | 1678 void Builtins::SetUp(Isolate* isolate, bool create_heap_objects) { |
| 1668 ASSERT(!initialized_); | 1679 ASSERT(!initialized_); |
| 1669 Heap* heap = isolate->heap(); | 1680 Heap* heap = isolate->heap(); |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1776 Code** code_address = \ | 1787 Code** code_address = \ |
| 1777 reinterpret_cast<Code**>(builtin_address(k##name)); \ | 1788 reinterpret_cast<Code**>(builtin_address(k##name)); \ |
| 1778 return Handle<Code>(code_address); \ | 1789 return Handle<Code>(code_address); \ |
| 1779 } | 1790 } |
| 1780 #define DEFINE_BUILTIN_ACCESSOR_A(name, kind, state, extra) \ | 1791 #define DEFINE_BUILTIN_ACCESSOR_A(name, kind, state, extra) \ |
| 1781 Handle<Code> Builtins::name() { \ | 1792 Handle<Code> Builtins::name() { \ |
| 1782 Code** code_address = \ | 1793 Code** code_address = \ |
| 1783 reinterpret_cast<Code**>(builtin_address(k##name)); \ | 1794 reinterpret_cast<Code**>(builtin_address(k##name)); \ |
| 1784 return Handle<Code>(code_address); \ | 1795 return Handle<Code>(code_address); \ |
| 1785 } | 1796 } |
| 1797 #define DEFINE_BUILTIN_ACCESSOR_H(name, kind, extra) \ |
| 1798 Handle<Code> Builtins::name() { \ |
| 1799 Code** code_address = \ |
| 1800 reinterpret_cast<Code**>(builtin_address(k##name)); \ |
| 1801 return Handle<Code>(code_address); \ |
| 1802 } |
| 1786 BUILTIN_LIST_C(DEFINE_BUILTIN_ACCESSOR_C) | 1803 BUILTIN_LIST_C(DEFINE_BUILTIN_ACCESSOR_C) |
| 1787 BUILTIN_LIST_A(DEFINE_BUILTIN_ACCESSOR_A) | 1804 BUILTIN_LIST_A(DEFINE_BUILTIN_ACCESSOR_A) |
| 1805 BUILTIN_LIST_H(DEFINE_BUILTIN_ACCESSOR_H) |
| 1788 BUILTIN_LIST_DEBUG_A(DEFINE_BUILTIN_ACCESSOR_A) | 1806 BUILTIN_LIST_DEBUG_A(DEFINE_BUILTIN_ACCESSOR_A) |
| 1789 #undef DEFINE_BUILTIN_ACCESSOR_C | 1807 #undef DEFINE_BUILTIN_ACCESSOR_C |
| 1790 #undef DEFINE_BUILTIN_ACCESSOR_A | 1808 #undef DEFINE_BUILTIN_ACCESSOR_A |
| 1791 | 1809 |
| 1792 | 1810 |
| 1793 } } // namespace v8::internal | 1811 } } // namespace v8::internal |
| OLD | NEW |