Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(137)

Side by Side Diff: src/x64/macro-assembler-x64.cc

Issue 14451003: Pretenure ASCII cons string in high promotion mode. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/x64/code-stubs-x64.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 4048 matching lines...) Expand 10 before | Expand all | Expand 10 after
4059 // Set the map. The other fields are left uninitialized. 4059 // Set the map. The other fields are left uninitialized.
4060 LoadRoot(kScratchRegister, Heap::kConsStringMapRootIndex); 4060 LoadRoot(kScratchRegister, Heap::kConsStringMapRootIndex);
4061 movq(FieldOperand(result, HeapObject::kMapOffset), kScratchRegister); 4061 movq(FieldOperand(result, HeapObject::kMapOffset), kScratchRegister);
4062 } 4062 }
4063 4063
4064 4064
4065 void MacroAssembler::AllocateAsciiConsString(Register result, 4065 void MacroAssembler::AllocateAsciiConsString(Register result,
4066 Register scratch1, 4066 Register scratch1,
4067 Register scratch2, 4067 Register scratch2,
4068 Label* gc_required) { 4068 Label* gc_required) {
4069 // Allocate heap number in new space. 4069 Label allocate_new_space, install_map;
4070 Allocate(ConsString::kSize, result, scratch1, scratch2, gc_required, 4070 AllocationFlags flags = TAG_OBJECT;
4071 TAG_OBJECT); 4071
4072 ExternalReference high_promotion_mode = ExternalReference::
4073 new_space_high_promotion_mode_active_address(isolate());
4074
4075 Load(scratch1, high_promotion_mode);
4076 testb(scratch1, Immediate(1));
4077 j(zero, &allocate_new_space);
4078 Allocate(ConsString::kSize,
4079 result,
4080 scratch1,
4081 scratch2,
4082 gc_required,
4083 static_cast<AllocationFlags>(flags | PRETENURE_OLD_POINTER_SPACE));
4084
4085 jmp(&install_map);
4086
4087 bind(&allocate_new_space);
4088 Allocate(ConsString::kSize,
4089 result,
4090 scratch1,
4091 scratch2,
4092 gc_required,
4093 flags);
4094
4095 bind(&install_map);
4072 4096
4073 // Set the map. The other fields are left uninitialized. 4097 // Set the map. The other fields are left uninitialized.
4074 LoadRoot(kScratchRegister, Heap::kConsAsciiStringMapRootIndex); 4098 LoadRoot(kScratchRegister, Heap::kConsAsciiStringMapRootIndex);
4075 movq(FieldOperand(result, HeapObject::kMapOffset), kScratchRegister); 4099 movq(FieldOperand(result, HeapObject::kMapOffset), kScratchRegister);
4076 } 4100 }
4077 4101
4078 4102
4079 void MacroAssembler::AllocateTwoByteSlicedString(Register result, 4103 void MacroAssembler::AllocateTwoByteSlicedString(Register result,
4080 Register scratch1, 4104 Register scratch1,
4081 Register scratch2, 4105 Register scratch2,
(...skipping 566 matching lines...) Expand 10 before | Expand all | Expand 10 after
4648 j(greater, &no_info_available); 4672 j(greater, &no_info_available);
4649 CompareRoot(MemOperand(scratch_reg, -AllocationSiteInfo::kSize), 4673 CompareRoot(MemOperand(scratch_reg, -AllocationSiteInfo::kSize),
4650 Heap::kAllocationSiteInfoMapRootIndex); 4674 Heap::kAllocationSiteInfoMapRootIndex);
4651 bind(&no_info_available); 4675 bind(&no_info_available);
4652 } 4676 }
4653 4677
4654 4678
4655 } } // namespace v8::internal 4679 } } // namespace v8::internal
4656 4680
4657 #endif // V8_TARGET_ARCH_X64 4681 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/code-stubs-x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698