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

Side by Side Diff: src/full-codegen/arm64/full-codegen-arm64.cc

Issue 2655853010: [TypeFeedbackVector] Combine the literals array and the feedback vector. (Closed)
Patch Set: partial serializer todo Created 3 years, 10 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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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_ARM64 5 #if V8_TARGET_ARCH_ARM64
6 6
7 #include "src/ast/compile-time-value.h" 7 #include "src/ast/compile-time-value.h"
8 #include "src/ast/scopes.h" 8 #include "src/ast/scopes.h"
9 #include "src/builtins/builtins-constructor.h" 9 #include "src/builtins/builtins-constructor.h"
10 #include "src/code-factory.h" 10 #include "src/code-factory.h"
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 // This call emits the following sequence in a way that can be patched for 129 // This call emits the following sequence in a way that can be patched for
130 // code ageing support: 130 // code ageing support:
131 // Push(lr, fp, cp, x1); 131 // Push(lr, fp, cp, x1);
132 // Add(fp, jssp, 2 * kPointerSize); 132 // Add(fp, jssp, 2 * kPointerSize);
133 info->set_prologue_offset(masm_->pc_offset()); 133 info->set_prologue_offset(masm_->pc_offset());
134 __ Prologue(info->GeneratePreagedPrologue()); 134 __ Prologue(info->GeneratePreagedPrologue());
135 135
136 // Increment invocation count for the function. 136 // Increment invocation count for the function.
137 { 137 {
138 Comment cmnt(masm_, "[ Increment invocation count"); 138 Comment cmnt(masm_, "[ Increment invocation count");
139 __ Ldr(x11, FieldMemOperand(x1, JSFunction::kLiteralsOffset)); 139 __ Ldr(x11, FieldMemOperand(x1, JSFunction::kFeedbackVectorOffset));
140 __ Ldr(x11, FieldMemOperand(x11, LiteralsArray::kFeedbackVectorOffset));
141 __ Ldr(x10, FieldMemOperand(x11, TypeFeedbackVector::kInvocationCountIndex * 140 __ Ldr(x10, FieldMemOperand(x11, TypeFeedbackVector::kInvocationCountIndex *
142 kPointerSize + 141 kPointerSize +
143 TypeFeedbackVector::kHeaderSize)); 142 TypeFeedbackVector::kHeaderSize));
144 __ Add(x10, x10, Operand(Smi::FromInt(1))); 143 __ Add(x10, x10, Operand(Smi::FromInt(1)));
145 __ Str(x10, FieldMemOperand(x11, TypeFeedbackVector::kInvocationCountIndex * 144 __ Str(x10, FieldMemOperand(x11, TypeFeedbackVector::kInvocationCountIndex *
146 kPointerSize + 145 kPointerSize +
147 TypeFeedbackVector::kHeaderSize)); 146 TypeFeedbackVector::kHeaderSize));
148 } 147 }
149 148
150 // Reserve space on the stack for locals. 149 // Reserve space on the stack for locals.
(...skipping 1045 matching lines...) Expand 10 before | Expand all | Expand 10 after
1196 } 1195 }
1197 } 1196 }
1198 1197
1199 1198
1200 void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) { 1199 void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) {
1201 Comment cmnt(masm_, "[ ObjectLiteral"); 1200 Comment cmnt(masm_, "[ ObjectLiteral");
1202 1201
1203 Handle<FixedArray> constant_properties = 1202 Handle<FixedArray> constant_properties =
1204 expr->GetOrBuildConstantProperties(isolate()); 1203 expr->GetOrBuildConstantProperties(isolate());
1205 __ Ldr(x3, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); 1204 __ Ldr(x3, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset));
1206 __ Mov(x2, Smi::FromInt(expr->literal_index())); 1205 __ Mov(x2, SmiFromSlot(expr->literal_slot()));
1207 __ Mov(x1, Operand(constant_properties)); 1206 __ Mov(x1, Operand(constant_properties));
1208 int flags = expr->ComputeFlags(); 1207 int flags = expr->ComputeFlags();
1209 __ Mov(x0, Smi::FromInt(flags)); 1208 __ Mov(x0, Smi::FromInt(flags));
1210 if (MustCreateObjectLiteralWithRuntime(expr)) { 1209 if (MustCreateObjectLiteralWithRuntime(expr)) {
1211 __ Push(x3, x2, x1, x0); 1210 __ Push(x3, x2, x1, x0);
1212 __ CallRuntime(Runtime::kCreateObjectLiteral); 1211 __ CallRuntime(Runtime::kCreateObjectLiteral);
1213 } else { 1212 } else {
1214 Callable callable = CodeFactory::FastCloneShallowObject( 1213 Callable callable = CodeFactory::FastCloneShallowObject(
1215 isolate(), expr->properties_count()); 1214 isolate(), expr->properties_count());
1216 __ Call(callable.code(), RelocInfo::CODE_TARGET); 1215 __ Call(callable.code(), RelocInfo::CODE_TARGET);
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
1336 IsFastObjectElementsKind(expr->constant_elements_kind()); 1335 IsFastObjectElementsKind(expr->constant_elements_kind());
1337 1336
1338 AllocationSiteMode allocation_site_mode = TRACK_ALLOCATION_SITE; 1337 AllocationSiteMode allocation_site_mode = TRACK_ALLOCATION_SITE;
1339 if (has_fast_elements && !FLAG_allocation_site_pretenuring) { 1338 if (has_fast_elements && !FLAG_allocation_site_pretenuring) {
1340 // If the only customer of allocation sites is transitioning, then 1339 // If the only customer of allocation sites is transitioning, then
1341 // we can turn it off if we don't have anywhere else to transition to. 1340 // we can turn it off if we don't have anywhere else to transition to.
1342 allocation_site_mode = DONT_TRACK_ALLOCATION_SITE; 1341 allocation_site_mode = DONT_TRACK_ALLOCATION_SITE;
1343 } 1342 }
1344 1343
1345 __ Ldr(x3, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); 1344 __ Ldr(x3, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset));
1346 __ Mov(x2, Smi::FromInt(expr->literal_index())); 1345 __ Mov(x2, SmiFromSlot(expr->literal_slot()));
1347 __ Mov(x1, Operand(constant_elements)); 1346 __ Mov(x1, Operand(constant_elements));
1348 if (MustCreateArrayLiteralWithRuntime(expr)) { 1347 if (MustCreateArrayLiteralWithRuntime(expr)) {
1349 __ Mov(x0, Smi::FromInt(expr->ComputeFlags())); 1348 __ Mov(x0, Smi::FromInt(expr->ComputeFlags()));
1350 __ Push(x3, x2, x1, x0); 1349 __ Push(x3, x2, x1, x0);
1351 __ CallRuntime(Runtime::kCreateArrayLiteral); 1350 __ CallRuntime(Runtime::kCreateArrayLiteral);
1352 } else { 1351 } else {
1353 Callable callable = 1352 Callable callable =
1354 CodeFactory::FastCloneShallowArray(isolate(), allocation_site_mode); 1353 CodeFactory::FastCloneShallowArray(isolate(), allocation_site_mode);
1355 __ Call(callable.code(), RelocInfo::CODE_TARGET); 1354 __ Call(callable.code(), RelocInfo::CODE_TARGET);
1356 RestoreContext(); 1355 RestoreContext();
(...skipping 1553 matching lines...) Expand 10 before | Expand all | Expand 10 after
2910 } 2909 }
2911 2910
2912 return INTERRUPT; 2911 return INTERRUPT;
2913 } 2912 }
2914 2913
2915 2914
2916 } // namespace internal 2915 } // namespace internal
2917 } // namespace v8 2916 } // namespace v8
2918 2917
2919 #endif // V8_TARGET_ARCH_ARM64 2918 #endif // V8_TARGET_ARCH_ARM64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698