OLD | NEW |
---|---|
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 1558 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1569 functions->s_name = #aname; \ | 1569 functions->s_name = #aname; \ |
1570 functions->name = c_##aname; \ | 1570 functions->name = c_##aname; \ |
1571 functions->flags = Code::ComputeFlags(Code::BUILTIN); \ | 1571 functions->flags = Code::ComputeFlags(Code::BUILTIN); \ |
1572 functions->extra_args = aextra_args; \ | 1572 functions->extra_args = aextra_args; \ |
1573 ++functions; | 1573 ++functions; |
1574 | 1574 |
1575 #define DEF_FUNCTION_PTR_A(aname, kind, state, extra) \ | 1575 #define DEF_FUNCTION_PTR_A(aname, kind, state, extra) \ |
1576 functions->generator = FUNCTION_ADDR(Generate_##aname); \ | 1576 functions->generator = FUNCTION_ADDR(Generate_##aname); \ |
1577 functions->c_code = NULL; \ | 1577 functions->c_code = NULL; \ |
1578 functions->s_name = #aname; \ | 1578 functions->s_name = #aname; \ |
1579 functions->name = aname; \ | 1579 functions->name = k##aname; \ |
1580 functions->flags = Code::ComputeFlags(Code::kind, \ | 1580 functions->flags = Code::ComputeFlags(Code::kind, \ |
1581 NOT_IN_LOOP, \ | 1581 NOT_IN_LOOP, \ |
1582 state, \ | 1582 state, \ |
1583 extra); \ | 1583 extra); \ |
1584 functions->extra_args = NO_EXTRA_ARGUMENTS; \ | 1584 functions->extra_args = NO_EXTRA_ARGUMENTS; \ |
1585 ++functions; | 1585 ++functions; |
1586 | 1586 |
1587 BUILTIN_LIST_C(DEF_FUNCTION_PTR_C) | 1587 BUILTIN_LIST_C(DEF_FUNCTION_PTR_C) |
1588 BUILTIN_LIST_A(DEF_FUNCTION_PTR_A) | 1588 BUILTIN_LIST_A(DEF_FUNCTION_PTR_A) |
1589 BUILTIN_LIST_DEBUG_A(DEF_FUNCTION_PTR_A) | 1589 BUILTIN_LIST_DEBUG_A(DEF_FUNCTION_PTR_A) |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1678 Code* entry = Code::cast(builtins_[i]); | 1678 Code* entry = Code::cast(builtins_[i]); |
1679 if (entry->contains(pc)) { | 1679 if (entry->contains(pc)) { |
1680 return names_[i]; | 1680 return names_[i]; |
1681 } | 1681 } |
1682 } | 1682 } |
1683 } | 1683 } |
1684 return NULL; | 1684 return NULL; |
1685 } | 1685 } |
1686 | 1686 |
1687 | 1687 |
1688 #define DEFINE_BUILTIN_ACCESSOR_C(name, ignore) \ | |
1689 Handle<Code> Builtins::name() { \ | |
Vitaly Repeshko
2011/03/23 12:13:41
This shouldn't be indented, I think.
Mads Ager (chromium)
2011/03/23 12:28:06
Done.
| |
1690 Code** code_address = \ | |
1691 reinterpret_cast<Code**>(builtin_address(k##name)); \ | |
1692 return Handle<Code>(code_address); \ | |
1693 } | |
1694 #define DEFINE_BUILTIN_ACCESSOR_A(name, kind, state, extra) \ | |
1695 Handle<Code> Builtins::name() { \ | |
Vitaly Repeshko
2011/03/23 12:13:41
Ditto.
Mads Ager (chromium)
2011/03/23 12:28:06
Done.
| |
1696 Code** code_address = \ | |
1697 reinterpret_cast<Code**>(builtin_address(k##name)); \ | |
1698 return Handle<Code>(code_address); \ | |
1699 } | |
1700 BUILTIN_LIST_C(DEFINE_BUILTIN_ACCESSOR_C) | |
1701 BUILTIN_LIST_A(DEFINE_BUILTIN_ACCESSOR_A) | |
1702 BUILTIN_LIST_DEBUG_A(DEFINE_BUILTIN_ACCESSOR_A) | |
1703 #undef DEFINE_BUILTIN_ACCESSOR_C | |
1704 #undef DEFINE_BUILTIN_ACCESSOR_A | |
1705 | |
1706 | |
1688 } } // namespace v8::internal | 1707 } } // namespace v8::internal |
OLD | NEW |