Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Side by Side Diff: src/ia32/code-stubs-ia32.cc

Issue 1355113002: [ic] Also collect known map for relational comparison. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address Jakob's comment. Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/hydrogen.cc ('k') | src/ic/ic-state.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #if V8_TARGET_ARCH_IA32 5 #if V8_TARGET_ARCH_IA32
6 6
7 #include "src/base/bits.h" 7 #include "src/base/bits.h"
8 #include "src/bootstrapper.h" 8 #include "src/bootstrapper.h"
9 #include "src/code-stubs.h" 9 #include "src/code-stubs.h"
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 3726 matching lines...) Expand 10 before | Expand all | Expand 10 after
3737 3737
3738 3738
3739 void CompareICStub::GenerateKnownObjects(MacroAssembler* masm) { 3739 void CompareICStub::GenerateKnownObjects(MacroAssembler* masm) {
3740 Label miss; 3740 Label miss;
3741 Handle<WeakCell> cell = Map::WeakCellForMap(known_map_); 3741 Handle<WeakCell> cell = Map::WeakCellForMap(known_map_);
3742 __ mov(ecx, edx); 3742 __ mov(ecx, edx);
3743 __ and_(ecx, eax); 3743 __ and_(ecx, eax);
3744 __ JumpIfSmi(ecx, &miss, Label::kNear); 3744 __ JumpIfSmi(ecx, &miss, Label::kNear);
3745 3745
3746 __ GetWeakValue(edi, cell); 3746 __ GetWeakValue(edi, cell);
3747 __ mov(ecx, FieldOperand(eax, HeapObject::kMapOffset)); 3747 __ cmp(edi, FieldOperand(eax, HeapObject::kMapOffset));
3748 __ mov(ebx, FieldOperand(edx, HeapObject::kMapOffset));
3749 __ cmp(ecx, edi);
3750 __ j(not_equal, &miss, Label::kNear); 3748 __ j(not_equal, &miss, Label::kNear);
3751 __ cmp(ebx, edi); 3749 __ cmp(edi, FieldOperand(edx, HeapObject::kMapOffset));
3752 __ j(not_equal, &miss, Label::kNear); 3750 __ j(not_equal, &miss, Label::kNear);
3753 3751
3754 __ sub(eax, edx); 3752 if (Token::IsEqualityOp(op())) {
3755 __ ret(0); 3753 __ sub(eax, edx);
3754 __ ret(0);
3755 } else if (is_strong(strength())) {
3756 __ TailCallRuntime(Runtime::kThrowStrongModeImplicitConversion, 0, 1);
3757 } else {
3758 __ PopReturnAddressTo(ecx);
3759 __ Push(edx);
3760 __ Push(eax);
3761 __ Push(Immediate(Smi::FromInt(NegativeComparisonResult(GetCondition()))));
3762 __ PushReturnAddressFrom(ecx);
3763 __ TailCallRuntime(Runtime::kCompare, 3, 1);
3764 }
3756 3765
3757 __ bind(&miss); 3766 __ bind(&miss);
3758 GenerateMiss(masm); 3767 GenerateMiss(masm);
3759 } 3768 }
3760 3769
3761 3770
3762 void CompareICStub::GenerateMiss(MacroAssembler* masm) { 3771 void CompareICStub::GenerateMiss(MacroAssembler* masm) {
3763 { 3772 {
3764 // Call the runtime system in a fresh internal frame. 3773 // Call the runtime system in a fresh internal frame.
3765 FrameScope scope(masm, StackFrame::INTERNAL); 3774 FrameScope scope(masm, StackFrame::INTERNAL);
(...skipping 2030 matching lines...) Expand 10 before | Expand all | Expand 10 after
5796 Operand(ebp, 7 * kPointerSize), NULL); 5805 Operand(ebp, 7 * kPointerSize), NULL);
5797 } 5806 }
5798 5807
5799 5808
5800 #undef __ 5809 #undef __
5801 5810
5802 } // namespace internal 5811 } // namespace internal
5803 } // namespace v8 5812 } // namespace v8
5804 5813
5805 #endif // V8_TARGET_ARCH_IA32 5814 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/hydrogen.cc ('k') | src/ic/ic-state.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698