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

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

Issue 334323003: Reland r22082 "Replace HeapNumber as doublebox with an explicit MutableHeapNumber." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Migrations test fixed Created 6 years, 5 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/arm/macro-assembler-arm.h ('k') | src/arm/stub-cache-arm.cc » ('j') | 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 // 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 <limits.h> // For LONG_MIN, LONG_MAX. 5 #include <limits.h> // For LONG_MIN, LONG_MAX.
6 6
7 #include "src/v8.h" 7 #include "src/v8.h"
8 8
9 #if V8_TARGET_ARCH_ARM 9 #if V8_TARGET_ARCH_ARM
10 10
(...skipping 3256 matching lines...) Expand 10 before | Expand all | Expand 10 after
3267 } 3267 }
3268 3268
3269 3269
3270 // Allocates a heap number or jumps to the need_gc label if the young space 3270 // Allocates a heap number or jumps to the need_gc label if the young space
3271 // is full and a scavenge is needed. 3271 // is full and a scavenge is needed.
3272 void MacroAssembler::AllocateHeapNumber(Register result, 3272 void MacroAssembler::AllocateHeapNumber(Register result,
3273 Register scratch1, 3273 Register scratch1,
3274 Register scratch2, 3274 Register scratch2,
3275 Register heap_number_map, 3275 Register heap_number_map,
3276 Label* gc_required, 3276 Label* gc_required,
3277 TaggingMode tagging_mode) { 3277 TaggingMode tagging_mode,
3278 MutableMode mode) {
3278 // Allocate an object in the heap for the heap number and tag it as a heap 3279 // Allocate an object in the heap for the heap number and tag it as a heap
3279 // object. 3280 // object.
3280 Allocate(HeapNumber::kSize, result, scratch1, scratch2, gc_required, 3281 Allocate(HeapNumber::kSize, result, scratch1, scratch2, gc_required,
3281 tagging_mode == TAG_RESULT ? TAG_OBJECT : NO_ALLOCATION_FLAGS); 3282 tagging_mode == TAG_RESULT ? TAG_OBJECT : NO_ALLOCATION_FLAGS);
3282 3283
3284 Heap::RootListIndex map_index = mode == MUTABLE
3285 ? Heap::kMutableHeapNumberMapRootIndex
3286 : Heap::kHeapNumberMapRootIndex;
3287 AssertIsRoot(heap_number_map, map_index);
3288
3283 // Store heap number map in the allocated object. 3289 // Store heap number map in the allocated object.
3284 AssertIsRoot(heap_number_map, Heap::kHeapNumberMapRootIndex);
3285 if (tagging_mode == TAG_RESULT) { 3290 if (tagging_mode == TAG_RESULT) {
3286 str(heap_number_map, FieldMemOperand(result, HeapObject::kMapOffset)); 3291 str(heap_number_map, FieldMemOperand(result, HeapObject::kMapOffset));
3287 } else { 3292 } else {
3288 str(heap_number_map, MemOperand(result, HeapObject::kMapOffset)); 3293 str(heap_number_map, MemOperand(result, HeapObject::kMapOffset));
3289 } 3294 }
3290 } 3295 }
3291 3296
3292 3297
3293 void MacroAssembler::AllocateHeapNumberWithValue(Register result, 3298 void MacroAssembler::AllocateHeapNumberWithValue(Register result,
3294 DwVfpRegister value, 3299 DwVfpRegister value,
(...skipping 787 matching lines...) Expand 10 before | Expand all | Expand 10 after
4082 sub(result, result, Operand(dividend)); 4087 sub(result, result, Operand(dividend));
4083 } 4088 }
4084 if (ms.shift() > 0) mov(result, Operand(result, ASR, ms.shift())); 4089 if (ms.shift() > 0) mov(result, Operand(result, ASR, ms.shift()));
4085 add(result, result, Operand(dividend, LSR, 31)); 4090 add(result, result, Operand(dividend, LSR, 31));
4086 } 4091 }
4087 4092
4088 4093
4089 } } // namespace v8::internal 4094 } } // namespace v8::internal
4090 4095
4091 #endif // V8_TARGET_ARCH_ARM 4096 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/macro-assembler-arm.h ('k') | src/arm/stub-cache-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698