Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(172)

Side by Side Diff: src/builtins.cc

Issue 25049003: Tag normal as handlers, and make code handler-specific. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Simplify code Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/builtins.h ('k') | src/ic.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
1774 Code** code_address = \ 1785 Code** code_address = \
1775 reinterpret_cast<Code**>(builtin_address(k##name)); \ 1786 reinterpret_cast<Code**>(builtin_address(k##name)); \
1776 return Handle<Code>(code_address); \ 1787 return Handle<Code>(code_address); \
1777 } 1788 }
1778 #define DEFINE_BUILTIN_ACCESSOR_A(name, kind, state, extra) \ 1789 #define DEFINE_BUILTIN_ACCESSOR_A(name, kind, state, extra) \
1779 Handle<Code> Builtins::name() { \ 1790 Handle<Code> Builtins::name() { \
1780 Code** code_address = \ 1791 Code** code_address = \
1781 reinterpret_cast<Code**>(builtin_address(k##name)); \ 1792 reinterpret_cast<Code**>(builtin_address(k##name)); \
1782 return Handle<Code>(code_address); \ 1793 return Handle<Code>(code_address); \
1783 } 1794 }
1795 #define DEFINE_BUILTIN_ACCESSOR_H(name, kind, extra) \
1796 Handle<Code> Builtins::name() { \
1797 Code** code_address = \
1798 reinterpret_cast<Code**>(builtin_address(k##name)); \
1799 return Handle<Code>(code_address); \
1800 }
1784 BUILTIN_LIST_C(DEFINE_BUILTIN_ACCESSOR_C) 1801 BUILTIN_LIST_C(DEFINE_BUILTIN_ACCESSOR_C)
1785 BUILTIN_LIST_A(DEFINE_BUILTIN_ACCESSOR_A) 1802 BUILTIN_LIST_A(DEFINE_BUILTIN_ACCESSOR_A)
1803 BUILTIN_LIST_H(DEFINE_BUILTIN_ACCESSOR_H)
1786 BUILTIN_LIST_DEBUG_A(DEFINE_BUILTIN_ACCESSOR_A) 1804 BUILTIN_LIST_DEBUG_A(DEFINE_BUILTIN_ACCESSOR_A)
1787 #undef DEFINE_BUILTIN_ACCESSOR_C 1805 #undef DEFINE_BUILTIN_ACCESSOR_C
1788 #undef DEFINE_BUILTIN_ACCESSOR_A 1806 #undef DEFINE_BUILTIN_ACCESSOR_A
1789 1807
1790 1808
1791 } } // namespace v8::internal 1809 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/builtins.h ('k') | src/ic.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698