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

Unified Diff: src/mips64/code-stubs-mips64.cc

Issue 1922553002: Get rid of AllocationFlags::TAG_OBJECT (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Remove TAG_OBJECT from AllocationFlags Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/mips/macro-assembler-mips.cc ('k') | src/mips64/codegen-mips64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/mips64/code-stubs-mips64.cc
diff --git a/src/mips64/code-stubs-mips64.cc b/src/mips64/code-stubs-mips64.cc
index 048bdb9944dfa05b92c961edd50a22b186a0d437..89b7bab20eadfa322518450ba36c2720cd449f6d 100644
--- a/src/mips64/code-stubs-mips64.cc
+++ b/src/mips64/code-stubs-mips64.cc
@@ -4758,15 +4758,15 @@ void FastNewObjectStub::Generate(MacroAssembler* masm) {
__ bind(&done_allocate);
// Initialize the JSObject fields.
- __ sd(a2, MemOperand(v0, JSObject::kMapOffset));
+ __ sd(a2, FieldMemOperand(v0, JSObject::kMapOffset));
__ LoadRoot(a3, Heap::kEmptyFixedArrayRootIndex);
- __ sd(a3, MemOperand(v0, JSObject::kPropertiesOffset));
- __ sd(a3, MemOperand(v0, JSObject::kElementsOffset));
+ __ sd(a3, FieldMemOperand(v0, JSObject::kPropertiesOffset));
+ __ sd(a3, FieldMemOperand(v0, JSObject::kElementsOffset));
STATIC_ASSERT(JSObject::kHeaderSize == 3 * kPointerSize);
- __ Daddu(a1, v0, Operand(JSObject::kHeaderSize));
+ __ Daddu(a1, v0, Operand(JSObject::kHeaderSize - kHeapObjectTag));
// ----------- S t a t e -------------
- // -- v0 : result (untagged)
+ // -- v0 : result (tagged)
// -- a1 : result fields (untagged)
// -- a5 : result end (untagged)
// -- a2 : initial map
@@ -4784,11 +4784,7 @@ void FastNewObjectStub::Generate(MacroAssembler* masm) {
{
// Initialize all in-object fields with undefined.
__ InitializeFieldsWithFiller(a1, a5, a0);
-
- // Add the object tag to make the JSObject real.
- STATIC_ASSERT(kHeapObjectTag == 1);
- __ Ret(USE_DELAY_SLOT);
- __ Daddu(v0, v0, Operand(kHeapObjectTag)); // In delay slot.
+ __ Ret();
}
__ bind(&slack_tracking);
{
@@ -4811,9 +4807,7 @@ void FastNewObjectStub::Generate(MacroAssembler* masm) {
Label finalize;
STATIC_ASSERT(Map::kSlackTrackingCounterEnd == 1);
__ And(a3, a3, Operand(Map::ConstructionCounter::kMask));
- __ Branch(USE_DELAY_SLOT, &finalize, eq, a3, Operand(zero_reg));
- STATIC_ASSERT(kHeapObjectTag == 1);
- __ Daddu(v0, v0, Operand(kHeapObjectTag)); // In delay slot.
+ __ Branch(&finalize, eq, a3, Operand(zero_reg));
__ Ret();
// Finalize the instance size.
@@ -4839,10 +4833,10 @@ void FastNewObjectStub::Generate(MacroAssembler* masm) {
__ CallRuntime(Runtime::kAllocateInNewSpace);
__ Pop(a2);
}
- STATIC_ASSERT(kHeapObjectTag == 1);
- __ Dsubu(v0, v0, Operand(kHeapObjectTag));
__ lbu(a5, FieldMemOperand(a2, Map::kInstanceSizeOffset));
__ Dlsa(a5, v0, a5, kPointerSizeLog2);
+ STATIC_ASSERT(kHeapObjectTag == 1);
+ __ Dsubu(a5, a5, Operand(kHeapObjectTag));
__ jmp(&done_allocate);
// Fall back to %NewObject.
@@ -4905,7 +4899,7 @@ void FastNewRestParameterStub::Generate(MacroAssembler* masm) {
// Allocate an empty rest parameter array.
Label allocate, done_allocate;
- __ Allocate(JSArray::kSize, v0, a0, a1, &allocate, TAG_OBJECT);
+ __ Allocate(JSArray::kSize, v0, a0, a1, &allocate, NO_ALLOCATION_FLAGS);
__ bind(&done_allocate);
// Setup the rest parameter array in v0.
@@ -4947,7 +4941,7 @@ void FastNewRestParameterStub::Generate(MacroAssembler* masm) {
Label allocate, done_allocate;
__ li(a1, Operand(JSArray::kSize + FixedArray::kHeaderSize));
__ Dlsa(a1, a1, a0, kPointerSizeLog2);
- __ Allocate(a1, v0, a3, a4, &allocate, TAG_OBJECT);
+ __ Allocate(a1, v0, a3, a4, &allocate, NO_ALLOCATION_FLAGS);
__ bind(&done_allocate);
// Compute arguments.length in a4.
@@ -5088,7 +5082,7 @@ void FastNewSloppyArgumentsStub::Generate(MacroAssembler* masm) {
__ Daddu(t1, t1, Operand(JSSloppyArgumentsObject::kSize));
// Do the allocation of all three objects in one go.
- __ Allocate(t1, v0, t1, a4, &runtime, TAG_OBJECT);
+ __ Allocate(t1, v0, t1, a4, &runtime, NO_ALLOCATION_FLAGS);
// v0 = address of new object(s) (tagged)
// a2 = argument count (smi-tagged)
@@ -5294,7 +5288,7 @@ void FastNewStrictArgumentsStub::Generate(MacroAssembler* masm) {
Label allocate, done_allocate;
__ li(a1, Operand(JSStrictArgumentsObject::kSize + FixedArray::kHeaderSize));
__ Dlsa(a1, a1, a0, kPointerSizeLog2);
- __ Allocate(a1, v0, a3, a4, &allocate, TAG_OBJECT);
+ __ Allocate(a1, v0, a3, a4, &allocate, NO_ALLOCATION_FLAGS);
__ bind(&done_allocate);
// Compute arguments.length in a4.
« no previous file with comments | « src/mips/macro-assembler-mips.cc ('k') | src/mips64/codegen-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698