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

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

Issue 879333005: Use weak cell to embed known map in CompareIC (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 10 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/arm64/code-stubs-arm64.cc ('k') | src/x64/code-stubs-x64.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 #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 3758 matching lines...) Expand 10 before | Expand all | Expand 10 after
3769 __ sub(eax, edx); 3769 __ sub(eax, edx);
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 __ mov(ecx, edx); 3780 __ mov(ecx, edx);
3780 __ and_(ecx, eax); 3781 __ and_(ecx, eax);
3781 __ JumpIfSmi(ecx, &miss, Label::kNear); 3782 __ JumpIfSmi(ecx, &miss, Label::kNear);
3782 3783
3784 __ GetWeakValue(edi, cell);
3783 __ mov(ecx, FieldOperand(eax, HeapObject::kMapOffset)); 3785 __ mov(ecx, FieldOperand(eax, HeapObject::kMapOffset));
3784 __ mov(ebx, FieldOperand(edx, HeapObject::kMapOffset)); 3786 __ mov(ebx, FieldOperand(edx, HeapObject::kMapOffset));
3785 __ cmp(ecx, known_map_); 3787 __ cmp(ecx, edi);
3786 __ j(not_equal, &miss, Label::kNear); 3788 __ j(not_equal, &miss, Label::kNear);
3787 __ cmp(ebx, known_map_); 3789 __ cmp(ebx, edi);
3788 __ j(not_equal, &miss, Label::kNear); 3790 __ j(not_equal, &miss, Label::kNear);
3789 3791
3790 __ sub(eax, edx); 3792 __ sub(eax, edx);
3791 __ ret(0); 3793 __ ret(0);
3792 3794
3793 __ bind(&miss); 3795 __ bind(&miss);
3794 GenerateMiss(masm); 3796 GenerateMiss(masm);
3795 } 3797 }
3796 3798
3797 3799
(...skipping 1283 matching lines...) Expand 10 before | Expand all | Expand 10 after
5081 ApiParameterOperand(2), kStackSpace, nullptr, 5083 ApiParameterOperand(2), kStackSpace, nullptr,
5082 Operand(ebp, 7 * kPointerSize), NULL); 5084 Operand(ebp, 7 * kPointerSize), NULL);
5083 } 5085 }
5084 5086
5085 5087
5086 #undef __ 5088 #undef __
5087 5089
5088 } } // namespace v8::internal 5090 } } // namespace v8::internal
5089 5091
5090 #endif // V8_TARGET_ARCH_IA32 5092 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/arm64/code-stubs-arm64.cc ('k') | src/x64/code-stubs-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698