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

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

Issue 395803002: MIPS64: Reland r22082 "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/mips64/macro-assembler-mips64.h ('k') | src/mips64/stub-cache-mips64.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_MIPS64 9 #if V8_TARGET_ARCH_MIPS64
10 10
(...skipping 3367 matching lines...) Expand 10 before | Expand all | Expand 10 after
3378 } 3378 }
3379 3379
3380 3380
3381 // Allocates a heap number or jumps to the label if the young space is full and 3381 // Allocates a heap number or jumps to the label if the young space is full and
3382 // a scavenge is needed. 3382 // a scavenge is needed.
3383 void MacroAssembler::AllocateHeapNumber(Register result, 3383 void MacroAssembler::AllocateHeapNumber(Register result,
3384 Register scratch1, 3384 Register scratch1,
3385 Register scratch2, 3385 Register scratch2,
3386 Register heap_number_map, 3386 Register heap_number_map,
3387 Label* need_gc, 3387 Label* need_gc,
3388 TaggingMode tagging_mode) { 3388 TaggingMode tagging_mode,
3389 MutableMode mode) {
3389 // Allocate an object in the heap for the heap number and tag it as a heap 3390 // Allocate an object in the heap for the heap number and tag it as a heap
3390 // object. 3391 // object.
3391 Allocate(HeapNumber::kSize, result, scratch1, scratch2, need_gc, 3392 Allocate(HeapNumber::kSize, result, scratch1, scratch2, need_gc,
3392 tagging_mode == TAG_RESULT ? TAG_OBJECT : NO_ALLOCATION_FLAGS); 3393 tagging_mode == TAG_RESULT ? TAG_OBJECT : NO_ALLOCATION_FLAGS);
3393 3394
3395 Heap::RootListIndex map_index = mode == MUTABLE
3396 ? Heap::kMutableHeapNumberMapRootIndex
3397 : Heap::kHeapNumberMapRootIndex;
3398 AssertIsRoot(heap_number_map, map_index);
3399
3394 // Store heap number map in the allocated object. 3400 // Store heap number map in the allocated object.
3395 AssertIsRoot(heap_number_map, Heap::kHeapNumberMapRootIndex);
3396 if (tagging_mode == TAG_RESULT) { 3401 if (tagging_mode == TAG_RESULT) {
3397 sd(heap_number_map, FieldMemOperand(result, HeapObject::kMapOffset)); 3402 sd(heap_number_map, FieldMemOperand(result, HeapObject::kMapOffset));
3398 } else { 3403 } else {
3399 sd(heap_number_map, MemOperand(result, HeapObject::kMapOffset)); 3404 sd(heap_number_map, MemOperand(result, HeapObject::kMapOffset));
3400 } 3405 }
3401 } 3406 }
3402 3407
3403 3408
3404 void MacroAssembler::AllocateHeapNumberWithValue(Register result, 3409 void MacroAssembler::AllocateHeapNumberWithValue(Register result,
3405 FPURegister value, 3410 FPURegister value,
(...skipping 2558 matching lines...) Expand 10 before | Expand all | Expand 10 after
5964 } 5969 }
5965 if (ms.shift() > 0) sra(result, result, ms.shift()); 5970 if (ms.shift() > 0) sra(result, result, ms.shift());
5966 srl(at, dividend, 31); 5971 srl(at, dividend, 31);
5967 Addu(result, result, Operand(at)); 5972 Addu(result, result, Operand(at));
5968 } 5973 }
5969 5974
5970 5975
5971 } } // namespace v8::internal 5976 } } // namespace v8::internal
5972 5977
5973 #endif // V8_TARGET_ARCH_MIPS64 5978 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW
« no previous file with comments | « src/mips64/macro-assembler-mips64.h ('k') | src/mips64/stub-cache-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698