OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 1585 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1596 // Set the map. The other fields are left uninitialized. | 1596 // Set the map. The other fields are left uninitialized. |
1597 mov(FieldOperand(result, HeapObject::kMapOffset), | 1597 mov(FieldOperand(result, HeapObject::kMapOffset), |
1598 Immediate(isolate()->factory()->cons_string_map())); | 1598 Immediate(isolate()->factory()->cons_string_map())); |
1599 } | 1599 } |
1600 | 1600 |
1601 | 1601 |
1602 void MacroAssembler::AllocateAsciiConsString(Register result, | 1602 void MacroAssembler::AllocateAsciiConsString(Register result, |
1603 Register scratch1, | 1603 Register scratch1, |
1604 Register scratch2, | 1604 Register scratch2, |
1605 Label* gc_required) { | 1605 Label* gc_required) { |
1606 // Allocate heap number in new space. | 1606 Label allocate_new_space, install_map; |
1607 Allocate(ConsString::kSize, result, scratch1, scratch2, gc_required, | 1607 AllocationFlags flags = TAG_OBJECT; |
1608 TAG_OBJECT); | |
1609 | 1608 |
| 1609 ExternalReference high_promotion_mode = ExternalReference:: |
| 1610 new_space_high_promotion_mode_active_address(isolate()); |
| 1611 |
| 1612 test(Operand::StaticVariable(high_promotion_mode), Immediate(1)); |
| 1613 j(zero, &allocate_new_space); |
| 1614 |
| 1615 Allocate(ConsString::kSize, |
| 1616 result, |
| 1617 scratch1, |
| 1618 scratch2, |
| 1619 gc_required, |
| 1620 static_cast<AllocationFlags>(flags | PRETENURE_OLD_POINTER_SPACE)); |
| 1621 jmp(&install_map); |
| 1622 |
| 1623 bind(&allocate_new_space); |
| 1624 Allocate(ConsString::kSize, |
| 1625 result, |
| 1626 scratch1, |
| 1627 scratch2, |
| 1628 gc_required, |
| 1629 flags); |
| 1630 |
| 1631 bind(&install_map); |
1610 // Set the map. The other fields are left uninitialized. | 1632 // Set the map. The other fields are left uninitialized. |
1611 mov(FieldOperand(result, HeapObject::kMapOffset), | 1633 mov(FieldOperand(result, HeapObject::kMapOffset), |
1612 Immediate(isolate()->factory()->cons_ascii_string_map())); | 1634 Immediate(isolate()->factory()->cons_ascii_string_map())); |
1613 } | 1635 } |
1614 | 1636 |
1615 | 1637 |
1616 void MacroAssembler::AllocateTwoByteSlicedString(Register result, | 1638 void MacroAssembler::AllocateTwoByteSlicedString(Register result, |
1617 Register scratch1, | 1639 Register scratch1, |
1618 Register scratch2, | 1640 Register scratch2, |
1619 Label* gc_required) { | 1641 Label* gc_required) { |
(...skipping 1511 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3131 j(greater, &no_info_available); | 3153 j(greater, &no_info_available); |
3132 cmp(MemOperand(scratch_reg, -AllocationSiteInfo::kSize), | 3154 cmp(MemOperand(scratch_reg, -AllocationSiteInfo::kSize), |
3133 Immediate(Handle<Map>(isolate()->heap()->allocation_site_info_map()))); | 3155 Immediate(Handle<Map>(isolate()->heap()->allocation_site_info_map()))); |
3134 bind(&no_info_available); | 3156 bind(&no_info_available); |
3135 } | 3157 } |
3136 | 3158 |
3137 | 3159 |
3138 } } // namespace v8::internal | 3160 } } // namespace v8::internal |
3139 | 3161 |
3140 #endif // V8_TARGET_ARCH_IA32 | 3162 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |