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 5105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5116 if (emit_debug_code()) { | 5116 if (emit_debug_code()) { |
5117 STATIC_ASSERT(kSmiTag == 0); | 5117 STATIC_ASSERT(kSmiTag == 0); |
5118 SmiTst(object, t8); | 5118 SmiTst(object, t8); |
5119 Check(ne, kOperandIsASmiAndNotAFunction, t8, Operand(zero_reg)); | 5119 Check(ne, kOperandIsASmiAndNotAFunction, t8, Operand(zero_reg)); |
5120 GetObjectType(object, t8, t8); | 5120 GetObjectType(object, t8, t8); |
5121 Check(eq, kOperandIsNotAFunction, t8, Operand(JS_FUNCTION_TYPE)); | 5121 Check(eq, kOperandIsNotAFunction, t8, Operand(JS_FUNCTION_TYPE)); |
5122 } | 5122 } |
5123 } | 5123 } |
5124 | 5124 |
5125 | 5125 |
| 5126 void MacroAssembler::AssertBoundFunction(Register object) { |
| 5127 if (emit_debug_code()) { |
| 5128 STATIC_ASSERT(kSmiTag == 0); |
| 5129 SmiTst(object, t8); |
| 5130 Check(ne, kOperandIsASmiAndNotABoundFunction, t8, Operand(zero_reg)); |
| 5131 GetObjectType(object, t8, t8); |
| 5132 Check(eq, kOperandIsNotABoundFunction, t8, Operand(JS_BOUND_FUNCTION_TYPE)); |
| 5133 } |
| 5134 } |
| 5135 |
| 5136 |
5126 void MacroAssembler::AssertUndefinedOrAllocationSite(Register object, | 5137 void MacroAssembler::AssertUndefinedOrAllocationSite(Register object, |
5127 Register scratch) { | 5138 Register scratch) { |
5128 if (emit_debug_code()) { | 5139 if (emit_debug_code()) { |
5129 Label done_checking; | 5140 Label done_checking; |
5130 AssertNotSmi(object); | 5141 AssertNotSmi(object); |
5131 LoadRoot(scratch, Heap::kUndefinedValueRootIndex); | 5142 LoadRoot(scratch, Heap::kUndefinedValueRootIndex); |
5132 Branch(&done_checking, eq, object, Operand(scratch)); | 5143 Branch(&done_checking, eq, object, Operand(scratch)); |
5133 lw(t8, FieldMemOperand(object, HeapObject::kMapOffset)); | 5144 lw(t8, FieldMemOperand(object, HeapObject::kMapOffset)); |
5134 LoadRoot(scratch, Heap::kAllocationSiteMapRootIndex); | 5145 LoadRoot(scratch, Heap::kAllocationSiteMapRootIndex); |
5135 Assert(eq, kExpectedUndefinedOrCell, t8, Operand(scratch)); | 5146 Assert(eq, kExpectedUndefinedOrCell, t8, Operand(scratch)); |
(...skipping 617 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5753 if (mag.shift > 0) sra(result, result, mag.shift); | 5764 if (mag.shift > 0) sra(result, result, mag.shift); |
5754 srl(at, dividend, 31); | 5765 srl(at, dividend, 31); |
5755 Addu(result, result, Operand(at)); | 5766 Addu(result, result, Operand(at)); |
5756 } | 5767 } |
5757 | 5768 |
5758 | 5769 |
5759 } // namespace internal | 5770 } // namespace internal |
5760 } // namespace v8 | 5771 } // namespace v8 |
5761 | 5772 |
5762 #endif // V8_TARGET_ARCH_MIPS | 5773 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |