| 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 "v8.h" | 5 #include "v8.h" |
| 6 | 6 |
| 7 #if V8_TARGET_ARCH_X87 | 7 #if V8_TARGET_ARCH_X87 |
| 8 | 8 |
| 9 #include "bootstrapper.h" | 9 #include "bootstrapper.h" |
| 10 #include "codegen.h" | 10 #include "codegen.h" |
| (...skipping 1671 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1682 // Set the map. The other fields are left uninitialized. | 1682 // Set the map. The other fields are left uninitialized. |
| 1683 mov(FieldOperand(result, HeapObject::kMapOffset), | 1683 mov(FieldOperand(result, HeapObject::kMapOffset), |
| 1684 Immediate(isolate()->factory()->cons_string_map())); | 1684 Immediate(isolate()->factory()->cons_string_map())); |
| 1685 } | 1685 } |
| 1686 | 1686 |
| 1687 | 1687 |
| 1688 void MacroAssembler::AllocateAsciiConsString(Register result, | 1688 void MacroAssembler::AllocateAsciiConsString(Register result, |
| 1689 Register scratch1, | 1689 Register scratch1, |
| 1690 Register scratch2, | 1690 Register scratch2, |
| 1691 Label* gc_required) { | 1691 Label* gc_required) { |
| 1692 Label allocate_new_space, install_map; | |
| 1693 AllocationFlags flags = TAG_OBJECT; | |
| 1694 | |
| 1695 ExternalReference high_promotion_mode = ExternalReference:: | |
| 1696 new_space_high_promotion_mode_active_address(isolate()); | |
| 1697 | |
| 1698 test(Operand::StaticVariable(high_promotion_mode), Immediate(1)); | |
| 1699 j(zero, &allocate_new_space); | |
| 1700 | |
| 1701 Allocate(ConsString::kSize, | 1692 Allocate(ConsString::kSize, |
| 1702 result, | 1693 result, |
| 1703 scratch1, | 1694 scratch1, |
| 1704 scratch2, | 1695 scratch2, |
| 1705 gc_required, | 1696 gc_required, |
| 1706 static_cast<AllocationFlags>(flags | PRETENURE_OLD_POINTER_SPACE)); | 1697 TAG_OBJECT); |
| 1707 jmp(&install_map); | |
| 1708 | 1698 |
| 1709 bind(&allocate_new_space); | |
| 1710 Allocate(ConsString::kSize, | |
| 1711 result, | |
| 1712 scratch1, | |
| 1713 scratch2, | |
| 1714 gc_required, | |
| 1715 flags); | |
| 1716 | |
| 1717 bind(&install_map); | |
| 1718 // Set the map. The other fields are left uninitialized. | 1699 // Set the map. The other fields are left uninitialized. |
| 1719 mov(FieldOperand(result, HeapObject::kMapOffset), | 1700 mov(FieldOperand(result, HeapObject::kMapOffset), |
| 1720 Immediate(isolate()->factory()->cons_ascii_string_map())); | 1701 Immediate(isolate()->factory()->cons_ascii_string_map())); |
| 1721 } | 1702 } |
| 1722 | 1703 |
| 1723 | 1704 |
| 1724 void MacroAssembler::AllocateTwoByteSlicedString(Register result, | 1705 void MacroAssembler::AllocateTwoByteSlicedString(Register result, |
| 1725 Register scratch1, | 1706 Register scratch1, |
| 1726 Register scratch2, | 1707 Register scratch2, |
| 1727 Label* gc_required) { | 1708 Label* gc_required) { |
| (...skipping 1616 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3344 if (ms.shift() > 0) sar(edx, ms.shift()); | 3325 if (ms.shift() > 0) sar(edx, ms.shift()); |
| 3345 mov(eax, dividend); | 3326 mov(eax, dividend); |
| 3346 shr(eax, 31); | 3327 shr(eax, 31); |
| 3347 add(edx, eax); | 3328 add(edx, eax); |
| 3348 } | 3329 } |
| 3349 | 3330 |
| 3350 | 3331 |
| 3351 } } // namespace v8::internal | 3332 } } // namespace v8::internal |
| 3352 | 3333 |
| 3353 #endif // V8_TARGET_ARCH_X87 | 3334 #endif // V8_TARGET_ARCH_X87 |
| OLD | NEW |