| OLD | NEW |
| 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 934 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 945 // rcx : function name | 945 // rcx : function name |
| 946 // rsp[0] : return address | 946 // rsp[0] : return address |
| 947 // rsp[8] : argument argc | 947 // rsp[8] : argument argc |
| 948 // rsp[16] : argument argc - 1 | 948 // rsp[16] : argument argc - 1 |
| 949 // ... | 949 // ... |
| 950 // rsp[argc * 8] : argument 1 | 950 // rsp[argc * 8] : argument 1 |
| 951 // rsp[(argc + 1) * 8] : argument 0 = receiver | 951 // rsp[(argc + 1) * 8] : argument 0 = receiver |
| 952 // ----------------------------------- | 952 // ----------------------------------- |
| 953 | 953 |
| 954 SharedFunctionInfo* function_info = function->shared(); | 954 SharedFunctionInfo* function_info = function->shared(); |
| 955 if (function_info->HasCustomCallGenerator()) { | 955 if (function_info->HasBuiltinFunctionId()) { |
| 956 const int id = function_info->custom_call_generator_id(); | 956 BuiltinFunctionId id = function_info->builtin_function_id(); |
| 957 MaybeObject* maybe_result = CompileCustomCall( | 957 MaybeObject* maybe_result = CompileCustomCall( |
| 958 id, object, holder, NULL, function, name); | 958 id, object, holder, NULL, function, name); |
| 959 Object* result; | 959 Object* result; |
| 960 if (!maybe_result->ToObject(&result)) return maybe_result; | 960 if (!maybe_result->ToObject(&result)) return maybe_result; |
| 961 // undefined means bail out to regular compiler. | 961 // undefined means bail out to regular compiler. |
| 962 if (!result->IsUndefined()) return result; | 962 if (!result->IsUndefined()) return result; |
| 963 } | 963 } |
| 964 | 964 |
| 965 Label miss_in_smi_check; | 965 Label miss_in_smi_check; |
| 966 | 966 |
| (...skipping 867 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1834 // rcx : function name | 1834 // rcx : function name |
| 1835 // rsp[0] : return address | 1835 // rsp[0] : return address |
| 1836 // rsp[8] : argument argc | 1836 // rsp[8] : argument argc |
| 1837 // rsp[16] : argument argc - 1 | 1837 // rsp[16] : argument argc - 1 |
| 1838 // ... | 1838 // ... |
| 1839 // rsp[argc * 8] : argument 1 | 1839 // rsp[argc * 8] : argument 1 |
| 1840 // rsp[(argc + 1) * 8] : argument 0 = receiver | 1840 // rsp[(argc + 1) * 8] : argument 0 = receiver |
| 1841 // ----------------------------------- | 1841 // ----------------------------------- |
| 1842 | 1842 |
| 1843 SharedFunctionInfo* function_info = function->shared(); | 1843 SharedFunctionInfo* function_info = function->shared(); |
| 1844 if (function_info->HasCustomCallGenerator()) { | 1844 if (function_info->HasBuiltinFunctionId()) { |
| 1845 const int id = function_info->custom_call_generator_id(); | 1845 BuiltinFunctionId id = function_info->builtin_function_id(); |
| 1846 MaybeObject* maybe_result = CompileCustomCall( | 1846 MaybeObject* maybe_result = CompileCustomCall( |
| 1847 id, object, holder, cell, function, name); | 1847 id, object, holder, cell, function, name); |
| 1848 Object* result; | 1848 Object* result; |
| 1849 if (!maybe_result->ToObject(&result)) return maybe_result; | 1849 if (!maybe_result->ToObject(&result)) return maybe_result; |
| 1850 // undefined means bail out to regular compiler. | 1850 // undefined means bail out to regular compiler. |
| 1851 if (!result->IsUndefined()) return result; | 1851 if (!result->IsUndefined()) return result; |
| 1852 } | 1852 } |
| 1853 | 1853 |
| 1854 Label miss; | 1854 Label miss; |
| 1855 | 1855 |
| (...skipping 1275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3131 // Return the generated code. | 3131 // Return the generated code. |
| 3132 return GetCode(); | 3132 return GetCode(); |
| 3133 } | 3133 } |
| 3134 | 3134 |
| 3135 | 3135 |
| 3136 #undef __ | 3136 #undef __ |
| 3137 | 3137 |
| 3138 } } // namespace v8::internal | 3138 } } // namespace v8::internal |
| 3139 | 3139 |
| 3140 #endif // V8_TARGET_ARCH_X64 | 3140 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |