Reviewers: Paul Lind, akos.palfi.imgtec, palfia, balazs.kilvady,
gergely.kis.imgtec,
Message:
PTAL.
Description:
MIPS64: Reland r22082 "Replace HeapNumber as doublebox with an explicit
MutableHeapNumber.
Port r22129 (676bb14).
TEST=
BUG=
Please review this at https://codereview.chromium.org/395803002/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files (+13, -5 lines):
M src/mips64/macro-assembler-mips64.h
M src/mips64/macro-assembler-mips64.cc
M src/mips64/stub-cache-mips64.cc
Index: src/mips64/macro-assembler-mips64.cc
diff --git a/src/mips64/macro-assembler-mips64.cc
b/src/mips64/macro-assembler-mips64.cc
index
7b9683fba27ede46abe4b0b0fd9925779beac6d8..3d59b3949351afbfd4d494ae542a03ce4d5b634f
100644
--- a/src/mips64/macro-assembler-mips64.cc
+++ b/src/mips64/macro-assembler-mips64.cc
@@ -3385,14 +3385,19 @@ void MacroAssembler::AllocateHeapNumber(Register
result,
Register scratch2,
Register heap_number_map,
Label* need_gc,
- TaggingMode tagging_mode) {
+ TaggingMode tagging_mode,
+ MutableMode mode) {
// Allocate an object in the heap for the heap number and tag it as a
heap
// object.
Allocate(HeapNumber::kSize, result, scratch1, scratch2, need_gc,
tagging_mode == TAG_RESULT ? TAG_OBJECT : NO_ALLOCATION_FLAGS);
+ Heap::RootListIndex map_index = mode == MUTABLE
+ ? Heap::kMutableHeapNumberMapRootIndex
+ : Heap::kHeapNumberMapRootIndex;
+ AssertIsRoot(heap_number_map, map_index);
+
// Store heap number map in the allocated object.
- AssertIsRoot(heap_number_map, Heap::kHeapNumberMapRootIndex);
if (tagging_mode == TAG_RESULT) {
sd(heap_number_map, FieldMemOperand(result, HeapObject::kMapOffset));
} else {
Index: src/mips64/macro-assembler-mips64.h
diff --git a/src/mips64/macro-assembler-mips64.h
b/src/mips64/macro-assembler-mips64.h
index
04a37230b82a14d6ea003c99ee8ed0e79e15c15f..88cf773daa63091e48a2d5237a3684707252e20a
100644
--- a/src/mips64/macro-assembler-mips64.h
+++ b/src/mips64/macro-assembler-mips64.h
@@ -574,7 +574,9 @@ class MacroAssembler: public Assembler {
Register scratch2,
Register heap_number_map,
Label* gc_required,
- TaggingMode tagging_mode = TAG_RESULT);
+ TaggingMode tagging_mode = TAG_RESULT,
+ MutableMode mode = IMMUTABLE);
+
void AllocateHeapNumberWithValue(Register result,
FPURegister value,
Register scratch1,
Index: src/mips64/stub-cache-mips64.cc
diff --git a/src/mips64/stub-cache-mips64.cc
b/src/mips64/stub-cache-mips64.cc
index
5260eb3e95a724aaa0a85499da2e5bfd75a2f348..8a6b02eece79e02c037c1cea77a858acfc4848d7
100644
--- a/src/mips64/stub-cache-mips64.cc
+++ b/src/mips64/stub-cache-mips64.cc
@@ -414,8 +414,9 @@ void
StoreStubCompiler::GenerateStoreTransition(MacroAssembler* masm,
}
} else if (representation.IsDouble()) {
Label do_store, heap_number;
- __ LoadRoot(scratch3, Heap::kHeapNumberMapRootIndex);
- __ AllocateHeapNumber(storage_reg, scratch1, scratch2, scratch3, slow);
+ __ LoadRoot(scratch3, Heap::kMutableHeapNumberMapRootIndex);
+ __ AllocateHeapNumber(storage_reg, scratch1, scratch2, scratch3, slow,
+ TAG_RESULT, MUTABLE);
__ JumpIfNotSmi(value_reg, &heap_number);
__ SmiUntag(scratch1, value_reg);
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.