| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #if V8_TARGET_ARCH_X87 | 7 #if V8_TARGET_ARCH_X87 |
| 8 | 8 |
| 9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
| 10 #include "src/bootstrapper.h" | 10 #include "src/bootstrapper.h" |
| (...skipping 1587 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1598 __ ret(0); // rax, rdx were pushed | 1598 __ ret(0); // rax, rdx were pushed |
| 1599 } | 1599 } |
| 1600 __ bind(&runtime_call); | 1600 __ bind(&runtime_call); |
| 1601 | 1601 |
| 1602 // Push arguments below the return address. | 1602 // Push arguments below the return address. |
| 1603 __ pop(ecx); | 1603 __ pop(ecx); |
| 1604 __ push(edx); | 1604 __ push(edx); |
| 1605 __ push(eax); | 1605 __ push(eax); |
| 1606 | 1606 |
| 1607 // Figure out which native to call and setup the arguments. | 1607 // Figure out which native to call and setup the arguments. |
| 1608 Builtins::JavaScript builtin; | 1608 if (cc == equal && strict()) { |
| 1609 if (cc == equal) { | 1609 __ push(ecx); |
| 1610 builtin = strict() ? Builtins::STRICT_EQUALS : Builtins::EQUALS; | 1610 __ TailCallRuntime(Runtime::kStrictEquals, 2, 1); |
| 1611 } else { | 1611 } else { |
| 1612 builtin = | 1612 Builtins::JavaScript builtin; |
| 1613 is_strong(strength()) ? Builtins::COMPARE_STRONG : Builtins::COMPARE; | 1613 if (cc == equal) { |
| 1614 __ push(Immediate(Smi::FromInt(NegativeComparisonResult(cc)))); | 1614 builtin = Builtins::EQUALS; |
| 1615 } else { |
| 1616 builtin = |
| 1617 is_strong(strength()) ? Builtins::COMPARE_STRONG : Builtins::COMPARE; |
| 1618 __ push(Immediate(Smi::FromInt(NegativeComparisonResult(cc)))); |
| 1619 } |
| 1620 |
| 1621 // Restore return address on the stack. |
| 1622 __ push(ecx); |
| 1623 |
| 1624 // Call the native; it returns -1 (less), 0 (equal), or 1 (greater) |
| 1625 // tagged as a small integer. |
| 1626 __ InvokeBuiltin(builtin, JUMP_FUNCTION); |
| 1615 } | 1627 } |
| 1616 | 1628 |
| 1617 // Restore return address on the stack. | |
| 1618 __ push(ecx); | |
| 1619 | |
| 1620 // Call the native; it returns -1 (less), 0 (equal), or 1 (greater) | |
| 1621 // tagged as a small integer. | |
| 1622 __ InvokeBuiltin(builtin, JUMP_FUNCTION); | |
| 1623 | |
| 1624 __ bind(&miss); | 1629 __ bind(&miss); |
| 1625 GenerateMiss(masm); | 1630 GenerateMiss(masm); |
| 1626 } | 1631 } |
| 1627 | 1632 |
| 1628 | 1633 |
| 1629 static void CallStubInRecordCallTarget(MacroAssembler* masm, CodeStub* stub, | 1634 static void CallStubInRecordCallTarget(MacroAssembler* masm, CodeStub* stub, |
| 1630 bool is_super) { | 1635 bool is_super) { |
| 1631 // eax : number of arguments to the construct function | 1636 // eax : number of arguments to the construct function |
| 1632 // ebx : feedback vector | 1637 // ebx : feedback vector |
| 1633 // edx : slot in feedback vector (Smi) | 1638 // edx : slot in feedback vector (Smi) |
| (...skipping 3705 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5339 Operand(ebp, 7 * kPointerSize), NULL); | 5344 Operand(ebp, 7 * kPointerSize), NULL); |
| 5340 } | 5345 } |
| 5341 | 5346 |
| 5342 | 5347 |
| 5343 #undef __ | 5348 #undef __ |
| 5344 | 5349 |
| 5345 } // namespace internal | 5350 } // namespace internal |
| 5346 } // namespace v8 | 5351 } // namespace v8 |
| 5347 | 5352 |
| 5348 #endif // V8_TARGET_ARCH_X87 | 5353 #endif // V8_TARGET_ARCH_X87 |
| OLD | NEW |