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

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

Issue 355793003: Replace HeapNumber as doublebox with an explicit MutableHeapNumber. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: 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/mips/macro-assembler-mips.h ('k') | src/mips/stub-cache-mips.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_MIPS 9 #if V8_TARGET_ARCH_MIPS
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 label if the young space is full and 3270 // Allocates a heap number or jumps to the label if the young space is full and
3271 // a scavenge is needed. 3271 // 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* need_gc, 3276 Label* need_gc,
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, need_gc, 3281 Allocate(HeapNumber::kSize, result, scratch1, scratch2, need_gc,
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 sw(heap_number_map, FieldMemOperand(result, HeapObject::kMapOffset)); 3291 sw(heap_number_map, FieldMemOperand(result, HeapObject::kMapOffset));
3287 } else { 3292 } else {
3288 sw(heap_number_map, MemOperand(result, HeapObject::kMapOffset)); 3293 sw(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 FPURegister value, 3299 FPURegister value,
(...skipping 2461 matching lines...) Expand 10 before | Expand all | Expand 10 after
5756 } 5761 }
5757 if (ms.shift() > 0) sra(result, result, ms.shift()); 5762 if (ms.shift() > 0) sra(result, result, ms.shift());
5758 srl(at, dividend, 31); 5763 srl(at, dividend, 31);
5759 Addu(result, result, Operand(at)); 5764 Addu(result, result, Operand(at));
5760 } 5765 }
5761 5766
5762 5767
5763 } } // namespace v8::internal 5768 } } // namespace v8::internal
5764 5769
5765 #endif // V8_TARGET_ARCH_MIPS 5770 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/mips/macro-assembler-mips.h ('k') | src/mips/stub-cache-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698