| 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_IA32 | 7 #if V8_TARGET_ARCH_IA32 |
| 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 3759 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3770 __ ret(0); | 3770 __ ret(0); |
| 3771 | 3771 |
| 3772 __ bind(&miss); | 3772 __ bind(&miss); |
| 3773 GenerateMiss(masm); | 3773 GenerateMiss(masm); |
| 3774 } | 3774 } |
| 3775 | 3775 |
| 3776 | 3776 |
| 3777 void CompareICStub::GenerateKnownObjects(MacroAssembler* masm) { | 3777 void CompareICStub::GenerateKnownObjects(MacroAssembler* masm) { |
| 3778 Label miss; | 3778 Label miss; |
| 3779 Handle<WeakCell> cell = Map::WeakCellForMap(known_map_); | 3779 Handle<WeakCell> cell = Map::WeakCellForMap(known_map_); |
| 3780 // Combine two Smi tests into one with bitwise and. |
| 3780 __ mov(ecx, edx); | 3781 __ mov(ecx, edx); |
| 3781 __ and_(ecx, eax); | 3782 __ and_(ecx, eax); |
| 3782 __ JumpIfSmi(ecx, &miss, Label::kNear); | 3783 __ JumpIfSmi(ecx, &miss, Label::kNear); |
| 3783 | 3784 |
| 3784 __ GetWeakValue(edi, cell); | 3785 __ GetWeakValueNoReadBarrier(edi, cell); |
| 3785 __ mov(ecx, FieldOperand(eax, HeapObject::kMapOffset)); | 3786 __ mov(ecx, FieldOperand(eax, HeapObject::kMapOffset)); |
| 3786 __ mov(ebx, FieldOperand(edx, HeapObject::kMapOffset)); | 3787 __ mov(ebx, FieldOperand(edx, HeapObject::kMapOffset)); |
| 3787 __ cmp(ecx, edi); | 3788 __ cmp(ecx, edi); |
| 3788 __ j(not_equal, &miss, Label::kNear); | 3789 __ j(not_equal, &miss, Label::kNear); |
| 3789 __ cmp(ebx, edi); | 3790 __ cmp(ebx, edi); |
| 3790 __ j(not_equal, &miss, Label::kNear); | 3791 __ j(not_equal, &miss, Label::kNear); |
| 3791 | 3792 |
| 3792 __ sub(eax, edx); | 3793 __ sub(eax, edx); |
| 3793 __ ret(0); | 3794 __ ret(0); |
| 3794 | 3795 |
| (...skipping 1288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5083 ApiParameterOperand(2), kStackSpace, nullptr, | 5084 ApiParameterOperand(2), kStackSpace, nullptr, |
| 5084 Operand(ebp, 7 * kPointerSize), NULL); | 5085 Operand(ebp, 7 * kPointerSize), NULL); |
| 5085 } | 5086 } |
| 5086 | 5087 |
| 5087 | 5088 |
| 5088 #undef __ | 5089 #undef __ |
| 5089 | 5090 |
| 5090 } } // namespace v8::internal | 5091 } } // namespace v8::internal |
| 5091 | 5092 |
| 5092 #endif // V8_TARGET_ARCH_IA32 | 5093 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |