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