| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 2964 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2975 __ CmpObjectType(rdi, JS_FUNCTION_TYPE, rcx); | 2975 __ CmpObjectType(rdi, JS_FUNCTION_TYPE, rcx); |
| 2976 __ j(not_equal, &slow); | 2976 __ j(not_equal, &slow); |
| 2977 | 2977 |
| 2978 // Fast-case: Just invoke the function. | 2978 // Fast-case: Just invoke the function. |
| 2979 ParameterCount actual(argc_); | 2979 ParameterCount actual(argc_); |
| 2980 | 2980 |
| 2981 if (ReceiverMightBeImplicit()) { | 2981 if (ReceiverMightBeImplicit()) { |
| 2982 Label call_as_function; | 2982 Label call_as_function; |
| 2983 __ CompareRoot(rax, Heap::kTheHoleValueRootIndex); | 2983 __ CompareRoot(rax, Heap::kTheHoleValueRootIndex); |
| 2984 __ j(equal, &call_as_function); | 2984 __ j(equal, &call_as_function); |
| 2985 __ InvokeFunction(rdi, actual, JUMP_FUNCTION); | 2985 __ InvokeFunction(rdi, |
| 2986 actual, |
| 2987 JUMP_FUNCTION, |
| 2988 NullCallWrapper(), |
| 2989 CALL_AS_METHOD); |
| 2986 __ bind(&call_as_function); | 2990 __ bind(&call_as_function); |
| 2987 } | 2991 } |
| 2988 __ InvokeFunction(rdi, | 2992 __ InvokeFunction(rdi, |
| 2989 actual, | 2993 actual, |
| 2990 JUMP_FUNCTION, | 2994 JUMP_FUNCTION, |
| 2991 NullCallWrapper(), | 2995 NullCallWrapper(), |
| 2992 CALL_AS_FUNCTION); | 2996 CALL_AS_FUNCTION); |
| 2993 | 2997 |
| 2994 // Slow-case: Non-function called. | 2998 // Slow-case: Non-function called. |
| 2995 __ bind(&slow); | 2999 __ bind(&slow); |
| (...skipping 2127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5123 __ Drop(1); | 5127 __ Drop(1); |
| 5124 __ ret(2 * kPointerSize); | 5128 __ ret(2 * kPointerSize); |
| 5125 } | 5129 } |
| 5126 | 5130 |
| 5127 | 5131 |
| 5128 #undef __ | 5132 #undef __ |
| 5129 | 5133 |
| 5130 } } // namespace v8::internal | 5134 } } // namespace v8::internal |
| 5131 | 5135 |
| 5132 #endif // V8_TARGET_ARCH_X64 | 5136 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |