OLD | NEW |
1 | 1 |
2 // Copyright 2012 the V8 project authors. All rights reserved. | 2 // Copyright 2012 the V8 project authors. All rights reserved. |
3 // Use of this source code is governed by a BSD-style license that can be | 3 // Use of this source code is governed by a BSD-style license that can be |
4 // found in the LICENSE file. | 4 // found in the LICENSE file. |
5 | 5 |
6 #include <limits.h> // For LONG_MIN, LONG_MAX. | 6 #include <limits.h> // For LONG_MIN, LONG_MAX. |
7 | 7 |
8 #if V8_TARGET_ARCH_MIPS | 8 #if V8_TARGET_ARCH_MIPS |
9 | 9 |
10 #include "src/base/bits.h" | 10 #include "src/base/bits.h" |
(...skipping 5222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5233 if (emit_debug_code()) { | 5233 if (emit_debug_code()) { |
5234 STATIC_ASSERT(kSmiTag == 0); | 5234 STATIC_ASSERT(kSmiTag == 0); |
5235 SmiTst(object, t8); | 5235 SmiTst(object, t8); |
5236 Check(ne, kOperandIsASmiAndNotABoundFunction, t8, Operand(zero_reg)); | 5236 Check(ne, kOperandIsASmiAndNotABoundFunction, t8, Operand(zero_reg)); |
5237 GetObjectType(object, t8, t8); | 5237 GetObjectType(object, t8, t8); |
5238 Check(eq, kOperandIsNotABoundFunction, t8, Operand(JS_BOUND_FUNCTION_TYPE)); | 5238 Check(eq, kOperandIsNotABoundFunction, t8, Operand(JS_BOUND_FUNCTION_TYPE)); |
5239 } | 5239 } |
5240 } | 5240 } |
5241 | 5241 |
5242 | 5242 |
| 5243 void MacroAssembler::AssertReceiver(Register object) { |
| 5244 if (emit_debug_code()) { |
| 5245 STATIC_ASSERT(kSmiTag == 0); |
| 5246 SmiTst(object, t8); |
| 5247 Check(ne, kOperandIsASmiAndNotAReceiver, t8, Operand(zero_reg)); |
| 5248 GetObjectType(object, t8, t8); |
| 5249 Check(ge, kOperandIsNotAReceiver, t8, Operand(FIRST_JS_RECEIVER_TYPE)); |
| 5250 } |
| 5251 } |
| 5252 |
| 5253 |
5243 void MacroAssembler::AssertUndefinedOrAllocationSite(Register object, | 5254 void MacroAssembler::AssertUndefinedOrAllocationSite(Register object, |
5244 Register scratch) { | 5255 Register scratch) { |
5245 if (emit_debug_code()) { | 5256 if (emit_debug_code()) { |
5246 Label done_checking; | 5257 Label done_checking; |
5247 AssertNotSmi(object); | 5258 AssertNotSmi(object); |
5248 LoadRoot(scratch, Heap::kUndefinedValueRootIndex); | 5259 LoadRoot(scratch, Heap::kUndefinedValueRootIndex); |
5249 Branch(&done_checking, eq, object, Operand(scratch)); | 5260 Branch(&done_checking, eq, object, Operand(scratch)); |
5250 lw(t8, FieldMemOperand(object, HeapObject::kMapOffset)); | 5261 lw(t8, FieldMemOperand(object, HeapObject::kMapOffset)); |
5251 LoadRoot(scratch, Heap::kAllocationSiteMapRootIndex); | 5262 LoadRoot(scratch, Heap::kAllocationSiteMapRootIndex); |
5252 Assert(eq, kExpectedUndefinedOrCell, t8, Operand(scratch)); | 5263 Assert(eq, kExpectedUndefinedOrCell, t8, Operand(scratch)); |
(...skipping 616 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5869 if (mag.shift > 0) sra(result, result, mag.shift); | 5880 if (mag.shift > 0) sra(result, result, mag.shift); |
5870 srl(at, dividend, 31); | 5881 srl(at, dividend, 31); |
5871 Addu(result, result, Operand(at)); | 5882 Addu(result, result, Operand(at)); |
5872 } | 5883 } |
5873 | 5884 |
5874 | 5885 |
5875 } // namespace internal | 5886 } // namespace internal |
5876 } // namespace v8 | 5887 } // namespace v8 |
5877 | 5888 |
5878 #endif // V8_TARGET_ARCH_MIPS | 5889 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |