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

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: Fix review comments and implement further cases. 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
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 TaggingMode tagging_mode) {
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 tagging_mode == TAG_RESULT ? TAG_OBJECT :
3135 NO_ALLOCATION_FLAGS);
3134 3136
3135 // Store heap number map in the allocated object. 3137 // Store heap number map in the allocated object.
3136 AssertRegisterIsRoot(heap_number_map, Heap::kHeapNumberMapRootIndex); 3138 AssertRegisterIsRoot(heap_number_map, Heap::kHeapNumberMapRootIndex);
3137 str(heap_number_map, FieldMemOperand(result, HeapObject::kMapOffset)); 3139 if (tagging_mode == TAG_RESULT) {
3140 str(heap_number_map, FieldMemOperand(result, HeapObject::kMapOffset));
3141 } else {
3142 str(heap_number_map, MemOperand(result, HeapObject::kMapOffset));
3143 }
3138 } 3144 }
3139 3145
3140 3146
3141 void MacroAssembler::AllocateHeapNumberWithValue(Register result, 3147 void MacroAssembler::AllocateHeapNumberWithValue(Register result,
3142 DwVfpRegister value, 3148 DwVfpRegister value,
3143 Register scratch1, 3149 Register scratch1,
3144 Register scratch2, 3150 Register scratch2,
3145 Register heap_number_map, 3151 Register heap_number_map,
3146 Label* gc_required) { 3152 Label* gc_required) {
3147 AllocateHeapNumber(result, scratch1, scratch2, heap_number_map, gc_required); 3153 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) { 3860 void CodePatcher::EmitCondition(Condition cond) {
3855 Instr instr = Assembler::instr_at(masm_.pc_); 3861 Instr instr = Assembler::instr_at(masm_.pc_);
3856 instr = (instr & ~kCondMask) | cond; 3862 instr = (instr & ~kCondMask) | cond;
3857 masm_.emit(instr); 3863 masm_.emit(instr);
3858 } 3864 }
3859 3865
3860 3866
3861 } } // namespace v8::internal 3867 } } // namespace v8::internal
3862 3868
3863 #endif // V8_TARGET_ARCH_ARM 3869 #endif // V8_TARGET_ARCH_ARM
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698