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

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

Issue 11028115: DoNumberTagD performance improvement (Closed) Base URL: git://github.com/v8/v8.git@master
Patch Set: Created 8 years, 2 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
« src/arm/macro-assembler-arm.h ('K') | « src/arm/macro-assembler-arm.h ('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 3104 matching lines...) Expand 10 before | Expand all | Expand 10 after
3115 failure); 3115 failure);
3116 } 3116 }
3117 3117
3118 3118
3119 // Allocates a heap number or jumps to the need_gc label if the young space 3119 // Allocates a heap number or jumps to the need_gc label if the young space
3120 // is full and a scavenge is needed. 3120 // is full and a scavenge is needed.
3121 void MacroAssembler::AllocateHeapNumber(Register result, 3121 void MacroAssembler::AllocateHeapNumber(Register result,
3122 Register scratch1, 3122 Register scratch1,
3123 Register scratch2, 3123 Register scratch2,
3124 Register heap_number_map, 3124 Register heap_number_map,
3125 Label* gc_required) { 3125 Label* gc_required,
3126 bool tagged) {
3126 // Allocate an object in the heap for the heap number and tag it as a heap 3127 // Allocate an object in the heap for the heap number and tag it as a heap
3127 // object. 3128 // object.
3128 AllocateInNewSpace(HeapNumber::kSize, 3129 AllocateInNewSpace(HeapNumber::kSize,
3129 result, 3130 result,
3130 scratch1, 3131 scratch1,
3131 scratch2, 3132 scratch2,
3132 gc_required, 3133 gc_required,
3133 TAG_OBJECT); 3134 tagged?TAG_OBJECT:NO_ALLOCATION_FLAGS);
danno 2012/10/10 12:27:53 Spaces between ? and :
aberent 2012/10/11 15:16:53 Done.
3134 3135
3135 // Store heap number map in the allocated object. 3136 // Store heap number map in the allocated object.
3136 AssertRegisterIsRoot(heap_number_map, Heap::kHeapNumberMapRootIndex); 3137 AssertRegisterIsRoot(heap_number_map, Heap::kHeapNumberMapRootIndex);
3137 str(heap_number_map, FieldMemOperand(result, HeapObject::kMapOffset)); 3138 if (tagged) {
3139 str(heap_number_map, FieldMemOperand(result, HeapObject::kMapOffset));
3140 } else {
3141 str(heap_number_map, MemOperand(result, HeapObject::kMapOffset));
3142 }
3138 } 3143 }
3139 3144
3140 3145
3141 void MacroAssembler::AllocateHeapNumberWithValue(Register result, 3146 void MacroAssembler::AllocateHeapNumberWithValue(Register result,
3142 DwVfpRegister value, 3147 DwVfpRegister value,
3143 Register scratch1, 3148 Register scratch1,
3144 Register scratch2, 3149 Register scratch2,
3145 Register heap_number_map, 3150 Register heap_number_map,
3146 Label* gc_required) { 3151 Label* gc_required) {
3147 AllocateHeapNumber(result, scratch1, scratch2, heap_number_map, gc_required); 3152 AllocateHeapNumber(result, scratch1, scratch2, heap_number_map, gc_required);
(...skipping 706 matching lines...) Expand 10 before | Expand all | Expand 10 after
3854 void CodePatcher::EmitCondition(Condition cond) { 3859 void CodePatcher::EmitCondition(Condition cond) {
3855 Instr instr = Assembler::instr_at(masm_.pc_); 3860 Instr instr = Assembler::instr_at(masm_.pc_);
3856 instr = (instr & ~kCondMask) | cond; 3861 instr = (instr & ~kCondMask) | cond;
3857 masm_.emit(instr); 3862 masm_.emit(instr);
3858 } 3863 }
3859 3864
3860 3865
3861 } } // namespace v8::internal 3866 } } // namespace v8::internal
3862 3867
3863 #endif // V8_TARGET_ARCH_ARM 3868 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« src/arm/macro-assembler-arm.h ('K') | « src/arm/macro-assembler-arm.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698