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 859 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
870 // Check that the result is not a smi. | 870 // Check that the result is not a smi. |
871 __ test(edi, Immediate(kSmiTagMask)); | 871 __ test(edi, Immediate(kSmiTagMask)); |
872 __ j(zero, miss); | 872 __ j(zero, miss); |
873 | 873 |
874 // Check that the value is a JavaScript function, fetching its map into eax. | 874 // Check that the value is a JavaScript function, fetching its map into eax. |
875 __ CmpObjectType(edi, JS_FUNCTION_TYPE, eax); | 875 __ CmpObjectType(edi, JS_FUNCTION_TYPE, eax); |
876 __ j(not_equal, miss); | 876 __ j(not_equal, miss); |
877 | 877 |
878 // Invoke the function. | 878 // Invoke the function. |
879 ParameterCount actual(argc); | 879 ParameterCount actual(argc); |
880 __ InvokeFunction(edi, actual, JUMP_FUNCTION); | 880 __ InvokeFunction(edi, actual, JUMP_FUNCTION, |
| 881 NullCallWrapper(), CALL_AS_METHOD); |
881 } | 882 } |
882 | 883 |
883 // The generated code falls through if the call should be handled by runtime. | 884 // The generated code falls through if the call should be handled by runtime. |
884 static void GenerateCallNormal(MacroAssembler* masm, int argc) { | 885 static void GenerateCallNormal(MacroAssembler* masm, int argc) { |
885 // ----------- S t a t e ------------- | 886 // ----------- S t a t e ------------- |
886 // -- ecx : name | 887 // -- ecx : name |
887 // -- esp[0] : return address | 888 // -- esp[0] : return address |
888 // -- esp[(argc - n) * 4] : arg[n] (zero-based) | 889 // -- esp[(argc - n) * 4] : arg[n] (zero-based) |
889 // -- ... | 890 // -- ... |
890 // -- esp[(argc + 1) * 4] : receiver | 891 // -- esp[(argc + 1) * 4] : receiver |
(...skipping 697 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1588 Condition cc = *jmp_address == Assembler::kJncShortOpcode | 1589 Condition cc = *jmp_address == Assembler::kJncShortOpcode |
1589 ? not_zero | 1590 ? not_zero |
1590 : zero; | 1591 : zero; |
1591 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc); | 1592 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc); |
1592 } | 1593 } |
1593 | 1594 |
1594 | 1595 |
1595 } } // namespace v8::internal | 1596 } } // namespace v8::internal |
1596 | 1597 |
1597 #endif // V8_TARGET_ARCH_IA32 | 1598 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |