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

Side by Side Diff: src/full-codegen/x64/full-codegen-x64.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, 7 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
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 #if V8_TARGET_ARCH_X64 5 #if V8_TARGET_ARCH_X64
6 6
7 #include "src/ast/scopes.h" 7 #include "src/ast/scopes.h"
8 #include "src/code-factory.h" 8 #include "src/code-factory.h"
9 #include "src/code-stubs.h" 9 #include "src/code-stubs.h"
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 1818 matching lines...) Expand 10 before | Expand all | Expand 10 after
1829 __ movp(rax, rbp); 1829 __ movp(rax, rbp);
1830 __ subp(rax, rsp); 1830 __ subp(rax, rsp);
1831 __ cmpp(rax, Immediate(expected_diff)); 1831 __ cmpp(rax, Immediate(expected_diff));
1832 __ Assert(equal, kUnexpectedStackDepth); 1832 __ Assert(equal, kUnexpectedStackDepth);
1833 } 1833 }
1834 } 1834 }
1835 1835
1836 void FullCodeGenerator::EmitCreateIteratorResult(bool done) { 1836 void FullCodeGenerator::EmitCreateIteratorResult(bool done) {
1837 Label allocate, done_allocate; 1837 Label allocate, done_allocate;
1838 1838
1839 __ Allocate(JSIteratorResult::kSize, rax, rcx, rdx, &allocate, TAG_OBJECT); 1839 __ Allocate(JSIteratorResult::kSize, rax, rcx, rdx, &allocate,
1840 NO_ALLOCATION_FLAGS);
1840 __ jmp(&done_allocate, Label::kNear); 1841 __ jmp(&done_allocate, Label::kNear);
1841 1842
1842 __ bind(&allocate); 1843 __ bind(&allocate);
1843 __ Push(Smi::FromInt(JSIteratorResult::kSize)); 1844 __ Push(Smi::FromInt(JSIteratorResult::kSize));
1844 __ CallRuntime(Runtime::kAllocateInNewSpace); 1845 __ CallRuntime(Runtime::kAllocateInNewSpace);
1845 1846
1846 __ bind(&done_allocate); 1847 __ bind(&done_allocate);
1847 __ LoadNativeContextSlot(Context::ITERATOR_RESULT_MAP_INDEX, rbx); 1848 __ LoadNativeContextSlot(Context::ITERATOR_RESULT_MAP_INDEX, rbx);
1848 __ movp(FieldOperand(rax, HeapObject::kMapOffset), rbx); 1849 __ movp(FieldOperand(rax, HeapObject::kMapOffset), rbx);
1849 __ LoadRoot(rbx, Heap::kEmptyFixedArrayRootIndex); 1850 __ LoadRoot(rbx, Heap::kEmptyFixedArrayRootIndex);
(...skipping 1226 matching lines...) Expand 10 before | Expand all | Expand 10 after
3076 3077
3077 3078
3078 void FullCodeGenerator::EmitCreateIterResultObject(CallRuntime* expr) { 3079 void FullCodeGenerator::EmitCreateIterResultObject(CallRuntime* expr) {
3079 ZoneList<Expression*>* args = expr->arguments(); 3080 ZoneList<Expression*>* args = expr->arguments();
3080 DCHECK_EQ(2, args->length()); 3081 DCHECK_EQ(2, args->length());
3081 VisitForStackValue(args->at(0)); 3082 VisitForStackValue(args->at(0));
3082 VisitForStackValue(args->at(1)); 3083 VisitForStackValue(args->at(1));
3083 3084
3084 Label runtime, done; 3085 Label runtime, done;
3085 3086
3086 __ Allocate(JSIteratorResult::kSize, rax, rcx, rdx, &runtime, TAG_OBJECT); 3087 __ Allocate(JSIteratorResult::kSize, rax, rcx, rdx, &runtime,
3088 NO_ALLOCATION_FLAGS);
3087 __ LoadNativeContextSlot(Context::ITERATOR_RESULT_MAP_INDEX, rbx); 3089 __ LoadNativeContextSlot(Context::ITERATOR_RESULT_MAP_INDEX, rbx);
3088 __ movp(FieldOperand(rax, HeapObject::kMapOffset), rbx); 3090 __ movp(FieldOperand(rax, HeapObject::kMapOffset), rbx);
3089 __ LoadRoot(rbx, Heap::kEmptyFixedArrayRootIndex); 3091 __ LoadRoot(rbx, Heap::kEmptyFixedArrayRootIndex);
3090 __ movp(FieldOperand(rax, JSObject::kPropertiesOffset), rbx); 3092 __ movp(FieldOperand(rax, JSObject::kPropertiesOffset), rbx);
3091 __ movp(FieldOperand(rax, JSObject::kElementsOffset), rbx); 3093 __ movp(FieldOperand(rax, JSObject::kElementsOffset), rbx);
3092 __ Pop(FieldOperand(rax, JSIteratorResult::kDoneOffset)); 3094 __ Pop(FieldOperand(rax, JSIteratorResult::kDoneOffset));
3093 __ Pop(FieldOperand(rax, JSIteratorResult::kValueOffset)); 3095 __ Pop(FieldOperand(rax, JSIteratorResult::kValueOffset));
3094 STATIC_ASSERT(JSIteratorResult::kSize == 5 * kPointerSize); 3096 STATIC_ASSERT(JSIteratorResult::kSize == 5 * kPointerSize);
3095 __ jmp(&done, Label::kNear); 3097 __ jmp(&done, Label::kNear);
3096 3098
(...skipping 758 matching lines...) Expand 10 before | Expand all | Expand 10 after
3855 DCHECK_EQ( 3857 DCHECK_EQ(
3856 isolate->builtins()->OnStackReplacement()->entry(), 3858 isolate->builtins()->OnStackReplacement()->entry(),
3857 Assembler::target_address_at(call_target_address, unoptimized_code)); 3859 Assembler::target_address_at(call_target_address, unoptimized_code));
3858 return ON_STACK_REPLACEMENT; 3860 return ON_STACK_REPLACEMENT;
3859 } 3861 }
3860 3862
3861 } // namespace internal 3863 } // namespace internal
3862 } // namespace v8 3864 } // namespace v8
3863 3865
3864 #endif // V8_TARGET_ARCH_X64 3866 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/full-codegen/mips64/full-codegen-mips64.cc ('k') | src/full-codegen/x87/full-codegen-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698