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

Side by Side Diff: src/full-codegen/arm/full-codegen-arm.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/crankshaft/hydrogen.cc ('k') | src/full-codegen/arm64/full-codegen-arm64.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 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_ARM 5 #if V8_TARGET_ARCH_ARM
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 1160 matching lines...) Expand 10 before | Expand all | Expand 10 after
1171 int offset = property->kind() == ObjectLiteral::Property::GETTER ? 2 : 3; 1171 int offset = property->kind() == ObjectLiteral::Property::GETTER ? 2 : 3;
1172 EmitSetHomeObject(expression, offset, property->GetSlot()); 1172 EmitSetHomeObject(expression, offset, property->GetSlot());
1173 } 1173 }
1174 } 1174 }
1175 } 1175 }
1176 1176
1177 1177
1178 void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) { 1178 void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) {
1179 Comment cmnt(masm_, "[ ObjectLiteral"); 1179 Comment cmnt(masm_, "[ ObjectLiteral");
1180 1180
1181 Handle<FixedArray> constant_properties = expr->constant_properties(); 1181 Handle<FixedArray> constant_properties =
1182 expr->GetOrBuildConstantProperties(isolate());
1182 __ ldr(r3, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); 1183 __ ldr(r3, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset));
1183 __ mov(r2, Operand(Smi::FromInt(expr->literal_index()))); 1184 __ mov(r2, Operand(Smi::FromInt(expr->literal_index())));
1184 __ mov(r1, Operand(constant_properties)); 1185 __ mov(r1, Operand(constant_properties));
1185 int flags = expr->ComputeFlags(); 1186 int flags = expr->ComputeFlags();
1186 __ mov(r0, Operand(Smi::FromInt(flags))); 1187 __ mov(r0, Operand(Smi::FromInt(flags)));
1187 if (MustCreateObjectLiteralWithRuntime(expr)) { 1188 if (MustCreateObjectLiteralWithRuntime(expr)) {
1188 __ Push(r3, r2, r1, r0); 1189 __ Push(r3, r2, r1, r0);
1189 __ CallRuntime(Runtime::kCreateObjectLiteral); 1190 __ CallRuntime(Runtime::kCreateObjectLiteral);
1190 } else { 1191 } else {
1191 Callable callable = CodeFactory::FastCloneShallowObject( 1192 Callable callable = CodeFactory::FastCloneShallowObject(
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
1302 context()->PlugTOS(); 1303 context()->PlugTOS();
1303 } else { 1304 } else {
1304 context()->Plug(r0); 1305 context()->Plug(r0);
1305 } 1306 }
1306 } 1307 }
1307 1308
1308 1309
1309 void FullCodeGenerator::VisitArrayLiteral(ArrayLiteral* expr) { 1310 void FullCodeGenerator::VisitArrayLiteral(ArrayLiteral* expr) {
1310 Comment cmnt(masm_, "[ ArrayLiteral"); 1311 Comment cmnt(masm_, "[ ArrayLiteral");
1311 1312
1312 Handle<ConstantElementsPair> constant_elements = expr->constant_elements(); 1313 Handle<ConstantElementsPair> constant_elements =
1314 expr->GetOrBuildConstantElements(isolate());
1313 bool has_fast_elements = 1315 bool has_fast_elements =
1314 IsFastObjectElementsKind(expr->constant_elements_kind()); 1316 IsFastObjectElementsKind(expr->constant_elements_kind());
1315 1317
1316 AllocationSiteMode allocation_site_mode = TRACK_ALLOCATION_SITE; 1318 AllocationSiteMode allocation_site_mode = TRACK_ALLOCATION_SITE;
1317 if (has_fast_elements && !FLAG_allocation_site_pretenuring) { 1319 if (has_fast_elements && !FLAG_allocation_site_pretenuring) {
1318 // If the only customer of allocation sites is transitioning, then 1320 // If the only customer of allocation sites is transitioning, then
1319 // we can turn it off if we don't have anywhere else to transition to. 1321 // we can turn it off if we don't have anywhere else to transition to.
1320 allocation_site_mode = DONT_TRACK_ALLOCATION_SITE; 1322 allocation_site_mode = DONT_TRACK_ALLOCATION_SITE;
1321 } 1323 }
1322 1324
(...skipping 1508 matching lines...) Expand 10 before | Expand all | Expand 10 after
2831 DCHECK(interrupt_address == 2833 DCHECK(interrupt_address ==
2832 isolate->builtins()->OnStackReplacement()->entry()); 2834 isolate->builtins()->OnStackReplacement()->entry());
2833 return ON_STACK_REPLACEMENT; 2835 return ON_STACK_REPLACEMENT;
2834 } 2836 }
2835 2837
2836 2838
2837 } // namespace internal 2839 } // namespace internal
2838 } // namespace v8 2840 } // namespace v8
2839 2841
2840 #endif // V8_TARGET_ARCH_ARM 2842 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/crankshaft/hydrogen.cc ('k') | src/full-codegen/arm64/full-codegen-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698