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 5158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5169 if (HasArgsInRegisters()) { | 5169 if (HasArgsInRegisters()) { |
5170 // Push arguments below return address. | 5170 // Push arguments below return address. |
5171 __ pop(scratch); | 5171 __ pop(scratch); |
5172 __ push(object); | 5172 __ push(object); |
5173 __ push(function); | 5173 __ push(function); |
5174 __ push(scratch); | 5174 __ push(scratch); |
5175 } | 5175 } |
5176 __ InvokeBuiltin(Builtins::INSTANCE_OF, JUMP_FUNCTION); | 5176 __ InvokeBuiltin(Builtins::INSTANCE_OF, JUMP_FUNCTION); |
5177 } else { | 5177 } else { |
5178 // Call the builtin and convert 0/1 to true/false. | 5178 // Call the builtin and convert 0/1 to true/false. |
| 5179 __ EnterInternalFrame(); |
5179 __ push(object); | 5180 __ push(object); |
5180 __ push(function); | 5181 __ push(function); |
5181 __ InvokeBuiltin(Builtins::INSTANCE_OF, CALL_FUNCTION); | 5182 __ InvokeBuiltin(Builtins::INSTANCE_OF, CALL_FUNCTION); |
| 5183 __ LeaveInternalFrame(); |
5182 NearLabel true_value, done; | 5184 NearLabel true_value, done; |
5183 __ test(eax, Operand(eax)); | 5185 __ test(eax, Operand(eax)); |
5184 __ j(zero, &true_value); | 5186 __ j(zero, &true_value); |
5185 __ mov(eax, Factory::false_value()); | 5187 __ mov(eax, Factory::false_value()); |
5186 __ jmp(&done); | 5188 __ jmp(&done); |
5187 __ bind(&true_value); | 5189 __ bind(&true_value); |
5188 __ mov(eax, Factory::true_value()); | 5190 __ mov(eax, Factory::true_value()); |
5189 __ bind(&done); | 5191 __ bind(&done); |
5190 __ ret((HasArgsInRegisters() ? 0 : 2) * kPointerSize); | 5192 __ ret((HasArgsInRegisters() ? 0 : 2) * kPointerSize); |
5191 } | 5193 } |
(...skipping 1314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6506 // Do a tail call to the rewritten stub. | 6508 // Do a tail call to the rewritten stub. |
6507 __ jmp(Operand(edi)); | 6509 __ jmp(Operand(edi)); |
6508 } | 6510 } |
6509 | 6511 |
6510 | 6512 |
6511 #undef __ | 6513 #undef __ |
6512 | 6514 |
6513 } } // namespace v8::internal | 6515 } } // namespace v8::internal |
6514 | 6516 |
6515 #endif // V8_TARGET_ARCH_IA32 | 6517 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |