| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 3553 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3564 } | 3564 } |
| 3565 | 3565 |
| 3566 | 3566 |
| 3567 static void CheckInputType(MacroAssembler* masm, | 3567 static void CheckInputType(MacroAssembler* masm, |
| 3568 Register input, | 3568 Register input, |
| 3569 CompareIC::State expected, | 3569 CompareIC::State expected, |
| 3570 Label* fail) { | 3570 Label* fail) { |
| 3571 Label ok; | 3571 Label ok; |
| 3572 if (expected == CompareIC::SMI) { | 3572 if (expected == CompareIC::SMI) { |
| 3573 __ JumpIfNotSmi(input, fail); | 3573 __ JumpIfNotSmi(input, fail); |
| 3574 } else if (expected == CompareIC::HEAP_NUMBER) { | 3574 } else if (expected == CompareIC::NUMBER) { |
| 3575 __ JumpIfSmi(input, &ok); | 3575 __ JumpIfSmi(input, &ok); |
| 3576 __ CompareMap(input, masm->isolate()->factory()->heap_number_map(), NULL); | 3576 __ CompareMap(input, masm->isolate()->factory()->heap_number_map(), NULL); |
| 3577 __ j(not_equal, fail); | 3577 __ j(not_equal, fail); |
| 3578 } | 3578 } |
| 3579 // We could be strict about symbol/string here, but as long as | 3579 // We could be strict about symbol/string here, but as long as |
| 3580 // hydrogen doesn't care, the stub doesn't have to care either. | 3580 // hydrogen doesn't care, the stub doesn't have to care either. |
| 3581 __ bind(&ok); | 3581 __ bind(&ok); |
| 3582 } | 3582 } |
| 3583 | 3583 |
| 3584 | 3584 |
| (...skipping 2182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5767 __ bind(&done); | 5767 __ bind(&done); |
| 5768 __ movq(rax, rdx); | 5768 __ movq(rax, rdx); |
| 5769 } | 5769 } |
| 5770 __ ret(0); | 5770 __ ret(0); |
| 5771 | 5771 |
| 5772 __ bind(&miss); | 5772 __ bind(&miss); |
| 5773 GenerateMiss(masm); | 5773 GenerateMiss(masm); |
| 5774 } | 5774 } |
| 5775 | 5775 |
| 5776 | 5776 |
| 5777 void ICCompareStub::GenerateHeapNumbers(MacroAssembler* masm) { | 5777 void ICCompareStub::GenerateNumbers(MacroAssembler* masm) { |
| 5778 ASSERT(state_ == CompareIC::HEAP_NUMBER); | 5778 ASSERT(state_ == CompareIC::NUMBER); |
| 5779 | 5779 |
| 5780 Label generic_stub; | 5780 Label generic_stub; |
| 5781 Label unordered, maybe_undefined1, maybe_undefined2; | 5781 Label unordered, maybe_undefined1, maybe_undefined2; |
| 5782 Label miss; | 5782 Label miss; |
| 5783 | 5783 |
| 5784 if (left_ == CompareIC::SMI) { | 5784 if (left_ == CompareIC::SMI) { |
| 5785 __ JumpIfNotSmi(rdx, &miss); | 5785 __ JumpIfNotSmi(rdx, &miss); |
| 5786 } | 5786 } |
| 5787 if (right_ == CompareIC::SMI) { | 5787 if (right_ == CompareIC::SMI) { |
| 5788 __ JumpIfNotSmi(rax, &miss); | 5788 __ JumpIfNotSmi(rax, &miss); |
| (...skipping 923 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6712 #endif | 6712 #endif |
| 6713 | 6713 |
| 6714 __ Ret(); | 6714 __ Ret(); |
| 6715 } | 6715 } |
| 6716 | 6716 |
| 6717 #undef __ | 6717 #undef __ |
| 6718 | 6718 |
| 6719 } } // namespace v8::internal | 6719 } } // namespace v8::internal |
| 6720 | 6720 |
| 6721 #endif // V8_TARGET_ARCH_X64 | 6721 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |