| 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 3963 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3974 __ CmpObjectType(edi, JS_FUNCTION_TYPE, ecx); | 3974 __ CmpObjectType(edi, JS_FUNCTION_TYPE, ecx); |
| 3975 __ j(not_equal, &slow); | 3975 __ j(not_equal, &slow); |
| 3976 | 3976 |
| 3977 // Fast-case: Just invoke the function. | 3977 // Fast-case: Just invoke the function. |
| 3978 ParameterCount actual(argc_); | 3978 ParameterCount actual(argc_); |
| 3979 | 3979 |
| 3980 if (ReceiverMightBeImplicit()) { | 3980 if (ReceiverMightBeImplicit()) { |
| 3981 Label call_as_function; | 3981 Label call_as_function; |
| 3982 __ cmp(eax, masm->isolate()->factory()->the_hole_value()); | 3982 __ cmp(eax, masm->isolate()->factory()->the_hole_value()); |
| 3983 __ j(equal, &call_as_function); | 3983 __ j(equal, &call_as_function); |
| 3984 __ InvokeFunction(edi, actual, JUMP_FUNCTION); | 3984 __ InvokeFunction(edi, |
| 3985 actual, |
| 3986 JUMP_FUNCTION, |
| 3987 NullCallWrapper(), |
| 3988 CALL_AS_METHOD); |
| 3985 __ bind(&call_as_function); | 3989 __ bind(&call_as_function); |
| 3986 } | 3990 } |
| 3987 __ InvokeFunction(edi, | 3991 __ InvokeFunction(edi, |
| 3988 actual, | 3992 actual, |
| 3989 JUMP_FUNCTION, | 3993 JUMP_FUNCTION, |
| 3990 NullCallWrapper(), | 3994 NullCallWrapper(), |
| 3991 CALL_AS_FUNCTION); | 3995 CALL_AS_FUNCTION); |
| 3992 | 3996 |
| 3993 // Slow-case: Non-function called. | 3997 // Slow-case: Non-function called. |
| 3994 __ bind(&slow); | 3998 __ bind(&slow); |
| (...skipping 2194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6189 __ Drop(1); | 6193 __ Drop(1); |
| 6190 __ ret(2 * kPointerSize); | 6194 __ ret(2 * kPointerSize); |
| 6191 } | 6195 } |
| 6192 | 6196 |
| 6193 | 6197 |
| 6194 #undef __ | 6198 #undef __ |
| 6195 | 6199 |
| 6196 } } // namespace v8::internal | 6200 } } // namespace v8::internal |
| 6197 | 6201 |
| 6198 #endif // V8_TARGET_ARCH_IA32 | 6202 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |