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

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

Issue 2625873009: [ast] Remove heap accesses from AST numbering (Closed)
Patch Set: Address nits Created 3 years, 11 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
« no previous file with comments | « src/full-codegen/arm/full-codegen-arm.cc ('k') | src/full-codegen/ia32/full-codegen-ia32.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1148 matching lines...) Expand 10 before | Expand all | Expand 10 after
1159 int offset = property->kind() == ObjectLiteral::Property::GETTER ? 2 : 3; 1159 int offset = property->kind() == ObjectLiteral::Property::GETTER ? 2 : 3;
1160 EmitSetHomeObject(expression, offset, property->GetSlot()); 1160 EmitSetHomeObject(expression, offset, property->GetSlot());
1161 } 1161 }
1162 } 1162 }
1163 } 1163 }
1164 1164
1165 1165
1166 void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) { 1166 void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) {
1167 Comment cmnt(masm_, "[ ObjectLiteral"); 1167 Comment cmnt(masm_, "[ ObjectLiteral");
1168 1168
1169 Handle<FixedArray> constant_properties = expr->constant_properties(); 1169 Handle<FixedArray> constant_properties =
1170 expr->GetOrBuildConstantProperties(isolate());
1170 __ Ldr(x3, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); 1171 __ Ldr(x3, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset));
1171 __ Mov(x2, Smi::FromInt(expr->literal_index())); 1172 __ Mov(x2, Smi::FromInt(expr->literal_index()));
1172 __ Mov(x1, Operand(constant_properties)); 1173 __ Mov(x1, Operand(constant_properties));
1173 int flags = expr->ComputeFlags(); 1174 int flags = expr->ComputeFlags();
1174 __ Mov(x0, Smi::FromInt(flags)); 1175 __ Mov(x0, Smi::FromInt(flags));
1175 if (MustCreateObjectLiteralWithRuntime(expr)) { 1176 if (MustCreateObjectLiteralWithRuntime(expr)) {
1176 __ Push(x3, x2, x1, x0); 1177 __ Push(x3, x2, x1, x0);
1177 __ CallRuntime(Runtime::kCreateObjectLiteral); 1178 __ CallRuntime(Runtime::kCreateObjectLiteral);
1178 } else { 1179 } else {
1179 Callable callable = CodeFactory::FastCloneShallowObject( 1180 Callable callable = CodeFactory::FastCloneShallowObject(
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
1288 context()->PlugTOS(); 1289 context()->PlugTOS();
1289 } else { 1290 } else {
1290 context()->Plug(x0); 1291 context()->Plug(x0);
1291 } 1292 }
1292 } 1293 }
1293 1294
1294 1295
1295 void FullCodeGenerator::VisitArrayLiteral(ArrayLiteral* expr) { 1296 void FullCodeGenerator::VisitArrayLiteral(ArrayLiteral* expr) {
1296 Comment cmnt(masm_, "[ ArrayLiteral"); 1297 Comment cmnt(masm_, "[ ArrayLiteral");
1297 1298
1298 Handle<ConstantElementsPair> constant_elements = expr->constant_elements(); 1299 Handle<ConstantElementsPair> constant_elements =
1300 expr->GetOrBuildConstantElements(isolate());
1299 bool has_fast_elements = 1301 bool has_fast_elements =
1300 IsFastObjectElementsKind(expr->constant_elements_kind()); 1302 IsFastObjectElementsKind(expr->constant_elements_kind());
1301 1303
1302 AllocationSiteMode allocation_site_mode = TRACK_ALLOCATION_SITE; 1304 AllocationSiteMode allocation_site_mode = TRACK_ALLOCATION_SITE;
1303 if (has_fast_elements && !FLAG_allocation_site_pretenuring) { 1305 if (has_fast_elements && !FLAG_allocation_site_pretenuring) {
1304 // If the only customer of allocation sites is transitioning, then 1306 // If the only customer of allocation sites is transitioning, then
1305 // we can turn it off if we don't have anywhere else to transition to. 1307 // we can turn it off if we don't have anywhere else to transition to.
1306 allocation_site_mode = DONT_TRACK_ALLOCATION_SITE; 1308 allocation_site_mode = DONT_TRACK_ALLOCATION_SITE;
1307 } 1309 }
1308 1310
(...skipping 1527 matching lines...) Expand 10 before | Expand all | Expand 10 after
2836 } 2838 }
2837 2839
2838 return INTERRUPT; 2840 return INTERRUPT;
2839 } 2841 }
2840 2842
2841 2843
2842 } // namespace internal 2844 } // namespace internal
2843 } // namespace v8 2845 } // namespace v8
2844 2846
2845 #endif // V8_TARGET_ARCH_ARM64 2847 #endif // V8_TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « src/full-codegen/arm/full-codegen-arm.cc ('k') | src/full-codegen/ia32/full-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698