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 3419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3430 __ sub(eax, edx); | 3430 __ sub(eax, edx); |
3431 __ ret(0); | 3431 __ ret(0); |
3432 | 3432 |
3433 __ bind(&miss); | 3433 __ bind(&miss); |
3434 GenerateMiss(masm); | 3434 GenerateMiss(masm); |
3435 } | 3435 } |
3436 | 3436 |
3437 | 3437 |
3438 void CompareICStub::GenerateKnownObjects(MacroAssembler* masm) { | 3438 void CompareICStub::GenerateKnownObjects(MacroAssembler* masm) { |
3439 Label miss; | 3439 Label miss; |
| 3440 Handle<WeakCell> cell = Map::WeakCellForMap(known_map_); |
3440 __ mov(ecx, edx); | 3441 __ mov(ecx, edx); |
3441 __ and_(ecx, eax); | 3442 __ and_(ecx, eax); |
3442 __ JumpIfSmi(ecx, &miss, Label::kNear); | 3443 __ JumpIfSmi(ecx, &miss, Label::kNear); |
3443 | 3444 |
| 3445 __ GetWeakValue(edi, cell); |
3444 __ mov(ecx, FieldOperand(eax, HeapObject::kMapOffset)); | 3446 __ mov(ecx, FieldOperand(eax, HeapObject::kMapOffset)); |
3445 __ mov(ebx, FieldOperand(edx, HeapObject::kMapOffset)); | 3447 __ mov(ebx, FieldOperand(edx, HeapObject::kMapOffset)); |
3446 __ cmp(ecx, known_map_); | 3448 __ cmp(ecx, edi); |
3447 __ j(not_equal, &miss, Label::kNear); | 3449 __ j(not_equal, &miss, Label::kNear); |
3448 __ cmp(ebx, known_map_); | 3450 __ cmp(ebx, edi); |
3449 __ j(not_equal, &miss, Label::kNear); | 3451 __ j(not_equal, &miss, Label::kNear); |
3450 | 3452 |
3451 __ sub(eax, edx); | 3453 __ sub(eax, edx); |
3452 __ ret(0); | 3454 __ ret(0); |
3453 | 3455 |
3454 __ bind(&miss); | 3456 __ bind(&miss); |
3455 GenerateMiss(masm); | 3457 GenerateMiss(masm); |
3456 } | 3458 } |
3457 | 3459 |
3458 | 3460 |
(...skipping 1260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4719 ApiParameterOperand(2), kStackSpace, nullptr, | 4721 ApiParameterOperand(2), kStackSpace, nullptr, |
4720 Operand(ebp, 7 * kPointerSize), NULL); | 4722 Operand(ebp, 7 * kPointerSize), NULL); |
4721 } | 4723 } |
4722 | 4724 |
4723 | 4725 |
4724 #undef __ | 4726 #undef __ |
4725 | 4727 |
4726 } } // namespace v8::internal | 4728 } } // namespace v8::internal |
4727 | 4729 |
4728 #endif // V8_TARGET_ARCH_X87 | 4730 #endif // V8_TARGET_ARCH_X87 |
OLD | NEW |