OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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_X64 | 7 #if V8_TARGET_ARCH_X64 |
8 | 8 |
9 #include "src/bootstrapper.h" | 9 #include "src/bootstrapper.h" |
10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
(...skipping 3700 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3711 __ subp(rax, rdx); | 3711 __ subp(rax, rdx); |
3712 __ ret(0); | 3712 __ ret(0); |
3713 | 3713 |
3714 __ bind(&miss); | 3714 __ bind(&miss); |
3715 GenerateMiss(masm); | 3715 GenerateMiss(masm); |
3716 } | 3716 } |
3717 | 3717 |
3718 | 3718 |
3719 void CompareICStub::GenerateKnownObjects(MacroAssembler* masm) { | 3719 void CompareICStub::GenerateKnownObjects(MacroAssembler* masm) { |
3720 Label miss; | 3720 Label miss; |
| 3721 Handle<WeakCell> cell = Map::WeakCellForMap(known_map_); |
3721 Condition either_smi = masm->CheckEitherSmi(rdx, rax); | 3722 Condition either_smi = masm->CheckEitherSmi(rdx, rax); |
3722 __ j(either_smi, &miss, Label::kNear); | 3723 __ j(either_smi, &miss, Label::kNear); |
3723 | 3724 |
| 3725 __ GetWeakValue(rdi, cell); |
3724 __ movp(rcx, FieldOperand(rax, HeapObject::kMapOffset)); | 3726 __ movp(rcx, FieldOperand(rax, HeapObject::kMapOffset)); |
3725 __ movp(rbx, FieldOperand(rdx, HeapObject::kMapOffset)); | 3727 __ movp(rbx, FieldOperand(rdx, HeapObject::kMapOffset)); |
3726 __ Cmp(rcx, known_map_); | 3728 __ cmpp(rcx, rdi); |
3727 __ j(not_equal, &miss, Label::kNear); | 3729 __ j(not_equal, &miss, Label::kNear); |
3728 __ Cmp(rbx, known_map_); | 3730 __ cmpp(rbx, rdi); |
3729 __ j(not_equal, &miss, Label::kNear); | 3731 __ j(not_equal, &miss, Label::kNear); |
3730 | 3732 |
3731 __ subp(rax, rdx); | 3733 __ subp(rax, rdx); |
3732 __ ret(0); | 3734 __ ret(0); |
3733 | 3735 |
3734 __ bind(&miss); | 3736 __ bind(&miss); |
3735 GenerateMiss(masm); | 3737 GenerateMiss(masm); |
3736 } | 3738 } |
3737 | 3739 |
3738 | 3740 |
(...skipping 1295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5034 CallApiFunctionAndReturn(masm, api_function_address, thunk_ref, getter_arg, | 5036 CallApiFunctionAndReturn(masm, api_function_address, thunk_ref, getter_arg, |
5035 kStackSpace, nullptr, return_value_operand, NULL); | 5037 kStackSpace, nullptr, return_value_operand, NULL); |
5036 } | 5038 } |
5037 | 5039 |
5038 | 5040 |
5039 #undef __ | 5041 #undef __ |
5040 | 5042 |
5041 } } // namespace v8::internal | 5043 } } // namespace v8::internal |
5042 | 5044 |
5043 #endif // V8_TARGET_ARCH_X64 | 5045 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |