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

Side by Side Diff: src/x64/stub-cache-x64.cc

Issue 5767002: Merge math function ids and custom call generator ids. (Closed)
Patch Set: arm and x64 fixes. Created 10 years 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
« src/stub-cache.h ('K') | « src/stub-cache.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 930 matching lines...) Expand 10 before | Expand all | Expand 10 after
941 // rcx : function name 941 // rcx : function name
942 // rsp[0] : return address 942 // rsp[0] : return address
943 // rsp[8] : argument argc 943 // rsp[8] : argument argc
944 // rsp[16] : argument argc - 1 944 // rsp[16] : argument argc - 1
945 // ... 945 // ...
946 // rsp[argc * 8] : argument 1 946 // rsp[argc * 8] : argument 1
947 // rsp[(argc + 1) * 8] : argument 0 = receiver 947 // rsp[(argc + 1) * 8] : argument 0 = receiver
948 // ----------------------------------- 948 // -----------------------------------
949 949
950 SharedFunctionInfo* function_info = function->shared(); 950 SharedFunctionInfo* function_info = function->shared();
951 if (function_info->HasCustomCallGenerator()) { 951 if (function_info->HasBuiltinFunctionId()) {
952 const int id = function_info->custom_call_generator_id(); 952 BuiltinFunctionId id = function_info->builtin_function_id();
953 MaybeObject* maybe_result = CompileCustomCall( 953 MaybeObject* maybe_result = CompileCustomCall(
954 id, object, holder, NULL, function, name); 954 id, object, holder, NULL, function, name);
955 Object* result; 955 Object* result;
956 if (!maybe_result->ToObject(&result)) return maybe_result; 956 if (!maybe_result->ToObject(&result)) return maybe_result;
957 // undefined means bail out to regular compiler. 957 // undefined means bail out to regular compiler.
958 if (!result->IsUndefined()) return result; 958 if (!result->IsUndefined()) return result;
959 } 959 }
960 960
961 Label miss_in_smi_check; 961 Label miss_in_smi_check;
962 962
(...skipping 860 matching lines...) Expand 10 before | Expand all | Expand 10 after
1823 // rcx : function name 1823 // rcx : function name
1824 // rsp[0] : return address 1824 // rsp[0] : return address
1825 // rsp[8] : argument argc 1825 // rsp[8] : argument argc
1826 // rsp[16] : argument argc - 1 1826 // rsp[16] : argument argc - 1
1827 // ... 1827 // ...
1828 // rsp[argc * 8] : argument 1 1828 // rsp[argc * 8] : argument 1
1829 // rsp[(argc + 1) * 8] : argument 0 = receiver 1829 // rsp[(argc + 1) * 8] : argument 0 = receiver
1830 // ----------------------------------- 1830 // -----------------------------------
1831 1831
1832 SharedFunctionInfo* function_info = function->shared(); 1832 SharedFunctionInfo* function_info = function->shared();
1833 if (function_info->HasCustomCallGenerator()) { 1833 if (function_info->HasBuiltinFunctionId()) {
1834 const int id = function_info->custom_call_generator_id(); 1834 BuiltinFunctionId id = function_info->builtin_function_id();
1835 MaybeObject* maybe_result = CompileCustomCall( 1835 MaybeObject* maybe_result = CompileCustomCall(
1836 id, object, holder, cell, function, name); 1836 id, object, holder, cell, function, name);
1837 Object* result; 1837 Object* result;
1838 if (!maybe_result->ToObject(&result)) return maybe_result; 1838 if (!maybe_result->ToObject(&result)) return maybe_result;
1839 // undefined means bail out to regular compiler. 1839 // undefined means bail out to regular compiler.
1840 if (!result->IsUndefined()) return result; 1840 if (!result->IsUndefined()) return result;
1841 } 1841 }
1842 1842
1843 Label miss; 1843 Label miss;
1844 1844
(...skipping 1273 matching lines...) Expand 10 before | Expand all | Expand 10 after
3118 // Return the generated code. 3118 // Return the generated code.
3119 return GetCode(); 3119 return GetCode();
3120 } 3120 }
3121 3121
3122 3122
3123 #undef __ 3123 #undef __
3124 3124
3125 } } // namespace v8::internal 3125 } } // namespace v8::internal
3126 3126
3127 #endif // V8_TARGET_ARCH_X64 3127 #endif // V8_TARGET_ARCH_X64
OLDNEW
« src/stub-cache.h ('K') | « src/stub-cache.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698