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 | 5 |
6 | 6 |
7 #include "src/v8.h" | 7 #include "src/v8.h" |
8 | 8 |
9 #if V8_TARGET_ARCH_MIPS64 | 9 #if V8_TARGET_ARCH_MIPS64 |
10 | 10 |
(...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
476 __ LoadRoot(t3, Heap::kUndefinedValueRootIndex); | 476 __ LoadRoot(t3, Heap::kUndefinedValueRootIndex); |
477 | 477 |
478 if (!is_api_function) { | 478 if (!is_api_function) { |
479 Label no_inobject_slack_tracking; | 479 Label no_inobject_slack_tracking; |
480 | 480 |
481 // Check if slack tracking is enabled. | 481 // Check if slack tracking is enabled. |
482 __ Branch(&no_inobject_slack_tracking, lt, a6, | 482 __ Branch(&no_inobject_slack_tracking, lt, a6, |
483 Operand(static_cast<int64_t>(Map::kSlackTrackingCounterEnd))); | 483 Operand(static_cast<int64_t>(Map::kSlackTrackingCounterEnd))); |
484 | 484 |
485 // Allocate object with a slack. | 485 // Allocate object with a slack. |
486 __ lwu(a0, FieldMemOperand(a2, Map::kInstanceSizesOffset)); | 486 __ lbu(a0, FieldMemOperand(a2, Map::kInObjectPropertiesOffset)); |
487 __ Ext(a0, a0, Map::kInObjectPropertiesByte * kBitsPerByte, | 487 __ lbu(a2, FieldMemOperand(a2, Map::kUnusedPropertyFieldsOffset)); |
488 kBitsPerByte); | |
489 __ lwu(a2, FieldMemOperand(a2, Map::kInstanceAttributesOffset)); | |
490 __ Ext(a2, a2, Map::kUnusedPropertyFieldsByte * kBitsPerByte, | |
491 kBitsPerByte); | |
492 __ dsubu(a0, a0, a2); | 488 __ dsubu(a0, a0, a2); |
493 __ dsll(at, a0, kPointerSizeLog2); | 489 __ dsll(at, a0, kPointerSizeLog2); |
494 __ daddu(a0, t1, at); | 490 __ daddu(a0, t1, at); |
495 // a0: offset of first field after pre-allocated fields | 491 // a0: offset of first field after pre-allocated fields |
496 if (FLAG_debug_code) { | 492 if (FLAG_debug_code) { |
497 __ dsll(at, a3, kPointerSizeLog2); | 493 __ dsll(at, a3, kPointerSizeLog2); |
498 __ Daddu(t2, t0, Operand(at)); // End of object. | 494 __ Daddu(t2, t0, Operand(at)); // End of object. |
499 __ Assert(le, kUnexpectedNumberOfPreAllocatedPropertyFields, | 495 __ Assert(le, kUnexpectedNumberOfPreAllocatedPropertyFields, |
500 a0, Operand(t2)); | 496 a0, Operand(t2)); |
501 } | 497 } |
(...skipping 1256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1758 } | 1754 } |
1759 } | 1755 } |
1760 | 1756 |
1761 | 1757 |
1762 #undef __ | 1758 #undef __ |
1763 | 1759 |
1764 } // namespace internal | 1760 } // namespace internal |
1765 } // namespace v8 | 1761 } // namespace v8 |
1766 | 1762 |
1767 #endif // V8_TARGET_ARCH_MIPS64 | 1763 #endif // V8_TARGET_ARCH_MIPS64 |
OLD | NEW |