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

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

Issue 1929673002: S390: Get rid of AllocationFlags::TAG_OBJECT (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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/full-codegen/s390/full-codegen-s390.cc ('k') | src/s390/codegen-s390.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/s390/code-stubs-s390.cc
diff --git a/src/s390/code-stubs-s390.cc b/src/s390/code-stubs-s390.cc
index 91c92fbc49ca333246fe2a370776da67ab731bbe..d75788716d241f4096c2e733bea3c226bb50e7a9 100644
--- a/src/s390/code-stubs-s390.cc
+++ b/src/s390/code-stubs-s390.cc
@@ -4626,15 +4626,15 @@ void FastNewObjectStub::Generate(MacroAssembler* masm) {
__ bind(&done_allocate);
// Initialize the JSObject fields.
- __ StoreP(r4, MemOperand(r2, JSObject::kMapOffset));
+ __ StoreP(r4, FieldMemOperand(r2, JSObject::kMapOffset));
__ LoadRoot(r5, Heap::kEmptyFixedArrayRootIndex);
- __ StoreP(r5, MemOperand(r2, JSObject::kPropertiesOffset));
- __ StoreP(r5, MemOperand(r2, JSObject::kElementsOffset));
+ __ StoreP(r5, FieldMemOperand(r2, JSObject::kPropertiesOffset));
+ __ StoreP(r5, FieldMemOperand(r2, JSObject::kElementsOffset));
STATIC_ASSERT(JSObject::kHeaderSize == 3 * kPointerSize);
- __ AddP(r3, r2, Operand(JSObject::kHeaderSize));
+ __ AddP(r3, r2, Operand(JSObject::kHeaderSize - kHeapObjectTag));
// ----------- S t a t e -------------
- // -- r2 : result (untagged)
+ // -- r2 : result (tagged)
// -- r3 : result fields (untagged)
// -- r7 : result end (untagged)
// -- r4 : initial map
@@ -4654,8 +4654,6 @@ void FastNewObjectStub::Generate(MacroAssembler* masm) {
// Initialize all in-object fields with undefined.
__ InitializeFieldsWithFiller(r3, r7, r8);
- // Add the object tag to make the JSObject real.
- __ AddP(r2, r2, Operand(kHeapObjectTag));
__ Ret();
}
__ bind(&slack_tracking);
@@ -4675,9 +4673,6 @@ void FastNewObjectStub::Generate(MacroAssembler* masm) {
__ LoadRoot(r8, Heap::kOnePointerFillerMapRootIndex);
__ InitializeFieldsWithFiller(r3, r7, r8);
- // Add the object tag to make the JSObject real.
- __ AddP(r2, r2, Operand(kHeapObjectTag));
-
// Check if we can finalize the instance size.
__ CmpP(r9, Operand(Map::kSlackTrackingCounterEnd));
__ Ret(ne);
@@ -4703,10 +4698,10 @@ void FastNewObjectStub::Generate(MacroAssembler* masm) {
__ CallRuntime(Runtime::kAllocateInNewSpace);
__ Pop(r4);
}
- __ SubP(r2, r2, Operand(kHeapObjectTag));
__ LoadlB(r7, FieldMemOperand(r4, Map::kInstanceSizeOffset));
__ ShiftLeftP(r7, r7, Operand(kPointerSizeLog2));
__ AddP(r7, r2, r7);
+ __ SubP(r7, r7, Operand(kHeapObjectTag));
__ b(&done_allocate);
// Fall back to %NewObject.
@@ -4771,7 +4766,7 @@ void FastNewRestParameterStub::Generate(MacroAssembler* masm) {
// Allocate an empty rest parameter array.
Label allocate, done_allocate;
- __ Allocate(JSArray::kSize, r2, r3, r4, &allocate, TAG_OBJECT);
+ __ Allocate(JSArray::kSize, r2, r3, r4, &allocate, NO_ALLOCATION_FLAGS);
__ bind(&done_allocate);
// Setup the rest parameter array in r0.
@@ -4814,7 +4809,7 @@ void FastNewRestParameterStub::Generate(MacroAssembler* masm) {
Label allocate, done_allocate;
__ mov(r3, Operand(JSArray::kSize + FixedArray::kHeaderSize));
__ AddP(r3, r3, r8);
- __ Allocate(r3, r5, r6, r7, &allocate, TAG_OBJECT);
+ __ Allocate(r3, r5, r6, r7, &allocate, NO_ALLOCATION_FLAGS);
__ bind(&done_allocate);
// Setup the elements array in r5.
@@ -4961,7 +4956,7 @@ void FastNewSloppyArgumentsStub::Generate(MacroAssembler* masm) {
__ AddP(r1, r1, Operand(JSSloppyArgumentsObject::kSize));
// Do the allocation of all three objects in one go.
- __ Allocate(r1, r2, r1, r6, &runtime, TAG_OBJECT);
+ __ Allocate(r1, r2, r1, r6, &runtime, NO_ALLOCATION_FLAGS);
// r2 = address of new object(s) (tagged)
// r4 = argument count (smi-tagged)
@@ -5179,7 +5174,7 @@ void FastNewStrictArgumentsStub::Generate(MacroAssembler* masm) {
Label allocate, done_allocate;
__ mov(r3, Operand(JSStrictArgumentsObject::kSize + FixedArray::kHeaderSize));
__ AddP(r3, r3, r8);
- __ Allocate(r3, r5, r6, r7, &allocate, TAG_OBJECT);
+ __ Allocate(r3, r5, r6, r7, &allocate, NO_ALLOCATION_FLAGS);
__ bind(&done_allocate);
// Setup the elements array in r5.
« no previous file with comments | « src/full-codegen/s390/full-codegen-s390.cc ('k') | src/s390/codegen-s390.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698