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_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 Loading... |
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 Loading... |
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 |
OLD | NEW |