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

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

Issue 2581683003: Introduce {ConstantElementsPair} struct for type safety. (Closed)
Patch Set: Rebased. Created 4 years 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/factory.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/full-codegen/full-codegen.h" 7 #include "src/full-codegen/full-codegen.h"
8 #include "src/ast/compile-time-value.h" 8 #include "src/ast/compile-time-value.h"
9 #include "src/ast/scopes.h" 9 #include "src/ast/scopes.h"
10 #include "src/code-factory.h" 10 #include "src/code-factory.h"
(...skipping 1315 matching lines...) Expand 10 before | Expand all | Expand 10 after
1326 context()->PlugTOS(); 1326 context()->PlugTOS();
1327 } else { 1327 } else {
1328 context()->Plug(r0); 1328 context()->Plug(r0);
1329 } 1329 }
1330 } 1330 }
1331 1331
1332 1332
1333 void FullCodeGenerator::VisitArrayLiteral(ArrayLiteral* expr) { 1333 void FullCodeGenerator::VisitArrayLiteral(ArrayLiteral* expr) {
1334 Comment cmnt(masm_, "[ ArrayLiteral"); 1334 Comment cmnt(masm_, "[ ArrayLiteral");
1335 1335
1336 Handle<FixedArray> constant_elements = expr->constant_elements(); 1336 Handle<ConstantElementsPair> constant_elements = expr->constant_elements();
1337 bool has_fast_elements = 1337 bool has_fast_elements =
1338 IsFastObjectElementsKind(expr->constant_elements_kind()); 1338 IsFastObjectElementsKind(expr->constant_elements_kind());
1339 Handle<FixedArrayBase> constant_elements_values(
1340 FixedArrayBase::cast(constant_elements->get(1)));
1341 1339
1342 AllocationSiteMode allocation_site_mode = TRACK_ALLOCATION_SITE; 1340 AllocationSiteMode allocation_site_mode = TRACK_ALLOCATION_SITE;
1343 if (has_fast_elements && !FLAG_allocation_site_pretenuring) { 1341 if (has_fast_elements && !FLAG_allocation_site_pretenuring) {
1344 // If the only customer of allocation sites is transitioning, then 1342 // If the only customer of allocation sites is transitioning, then
1345 // we can turn it off if we don't have anywhere else to transition to. 1343 // we can turn it off if we don't have anywhere else to transition to.
1346 allocation_site_mode = DONT_TRACK_ALLOCATION_SITE; 1344 allocation_site_mode = DONT_TRACK_ALLOCATION_SITE;
1347 } 1345 }
1348 1346
1349 __ ldr(r3, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); 1347 __ ldr(r3, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset));
1350 __ mov(r2, Operand(Smi::FromInt(expr->literal_index()))); 1348 __ mov(r2, Operand(Smi::FromInt(expr->literal_index())));
(...skipping 1568 matching lines...) Expand 10 before | Expand all | Expand 10 after
2919 DCHECK(interrupt_address == 2917 DCHECK(interrupt_address ==
2920 isolate->builtins()->OnStackReplacement()->entry()); 2918 isolate->builtins()->OnStackReplacement()->entry());
2921 return ON_STACK_REPLACEMENT; 2919 return ON_STACK_REPLACEMENT;
2922 } 2920 }
2923 2921
2924 2922
2925 } // namespace internal 2923 } // namespace internal
2926 } // namespace v8 2924 } // namespace v8
2927 2925
2928 #endif // V8_TARGET_ARCH_ARM 2926 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/factory.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