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

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

Issue 881533004: MIPS: 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 | « no previous file | src/mips64/code-stubs-mips64.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_MIPS 7 #if V8_TARGET_ARCH_MIPS
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 3838 matching lines...) Expand 10 before | Expand all | Expand 10 after
3849 __ Ret(USE_DELAY_SLOT); 3849 __ Ret(USE_DELAY_SLOT);
3850 __ subu(v0, a0, a1); 3850 __ subu(v0, a0, a1);
3851 3851
3852 __ bind(&miss); 3852 __ bind(&miss);
3853 GenerateMiss(masm); 3853 GenerateMiss(masm);
3854 } 3854 }
3855 3855
3856 3856
3857 void CompareICStub::GenerateKnownObjects(MacroAssembler* masm) { 3857 void CompareICStub::GenerateKnownObjects(MacroAssembler* masm) {
3858 Label miss; 3858 Label miss;
3859 Handle<WeakCell> cell = Map::WeakCellForMap(known_map_);
3859 __ And(a2, a1, a0); 3860 __ And(a2, a1, a0);
3860 __ JumpIfSmi(a2, &miss); 3861 __ JumpIfSmi(a2, &miss);
3862 __ GetWeakValue(t0, cell);
3861 __ lw(a2, FieldMemOperand(a0, HeapObject::kMapOffset)); 3863 __ lw(a2, FieldMemOperand(a0, HeapObject::kMapOffset));
3862 __ lw(a3, FieldMemOperand(a1, HeapObject::kMapOffset)); 3864 __ lw(a3, FieldMemOperand(a1, HeapObject::kMapOffset));
3863 __ Branch(&miss, ne, a2, Operand(known_map_)); 3865 __ Branch(&miss, ne, a2, Operand(t0));
3864 __ Branch(&miss, ne, a3, Operand(known_map_)); 3866 __ Branch(&miss, ne, a3, Operand(t0));
3865 3867
3866 __ Ret(USE_DELAY_SLOT); 3868 __ Ret(USE_DELAY_SLOT);
3867 __ subu(v0, a0, a1); 3869 __ subu(v0, a0, a1);
3868 3870
3869 __ bind(&miss); 3871 __ bind(&miss);
3870 GenerateMiss(masm); 3872 GenerateMiss(masm);
3871 } 3873 }
3872 3874
3873 3875
3874 void CompareICStub::GenerateMiss(MacroAssembler* masm) { 3876 void CompareICStub::GenerateMiss(MacroAssembler* masm) {
(...skipping 1275 matching lines...) Expand 10 before | Expand all | Expand 10 after
5150 kStackUnwindSpace, kInvalidStackOffset, 5152 kStackUnwindSpace, kInvalidStackOffset,
5151 MemOperand(fp, 6 * kPointerSize), NULL); 5153 MemOperand(fp, 6 * kPointerSize), NULL);
5152 } 5154 }
5153 5155
5154 5156
5155 #undef __ 5157 #undef __
5156 5158
5157 } } // namespace v8::internal 5159 } } // namespace v8::internal
5158 5160
5159 #endif // V8_TARGET_ARCH_MIPS 5161 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « no previous file | src/mips64/code-stubs-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698