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

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

Issue 2381843002: Add Smi::Zero and replace all Smi::FromInt(0) calls (Closed)
Patch Set: Mark Smi::kZero as V8_EXPORT_PRIVATE Created 4 years, 2 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/full-codegen.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/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 339 matching lines...) Expand 10 before | Expand all | Expand 10 after
350 __ LoadRoot(x0, Heap::kUndefinedValueRootIndex); 350 __ LoadRoot(x0, Heap::kUndefinedValueRootIndex);
351 } 351 }
352 EmitReturnSequence(); 352 EmitReturnSequence();
353 353
354 // Force emission of the pools, so they don't get emitted in the middle 354 // Force emission of the pools, so they don't get emitted in the middle
355 // of the back edge table. 355 // of the back edge table.
356 masm()->CheckVeneerPool(true, false); 356 masm()->CheckVeneerPool(true, false);
357 masm()->CheckConstPool(true, false); 357 masm()->CheckConstPool(true, false);
358 } 358 }
359 359
360 360 void FullCodeGenerator::ClearAccumulator() { __ Mov(x0, Smi::kZero); }
361 void FullCodeGenerator::ClearAccumulator() {
362 __ Mov(x0, Smi::FromInt(0));
363 }
364
365 361
366 void FullCodeGenerator::EmitProfilingCounterDecrement(int delta) { 362 void FullCodeGenerator::EmitProfilingCounterDecrement(int delta) {
367 __ Mov(x2, Operand(profiling_counter_)); 363 __ Mov(x2, Operand(profiling_counter_));
368 __ Ldr(x3, FieldMemOperand(x2, Cell::kValueOffset)); 364 __ Ldr(x3, FieldMemOperand(x2, Cell::kValueOffset));
369 __ Subs(x3, x3, Smi::FromInt(delta)); 365 __ Subs(x3, x3, Smi::FromInt(delta));
370 __ Str(x3, FieldMemOperand(x2, Cell::kValueOffset)); 366 __ Str(x3, FieldMemOperand(x2, Cell::kValueOffset));
371 } 367 }
372 368
373 369
374 void FullCodeGenerator::EmitProfilingCounterReset() { 370 void FullCodeGenerator::EmitProfilingCounterReset() {
(...skipping 3363 matching lines...) Expand 10 before | Expand all | Expand 10 after
3738 } 3734 }
3739 3735
3740 return INTERRUPT; 3736 return INTERRUPT;
3741 } 3737 }
3742 3738
3743 3739
3744 } // namespace internal 3740 } // namespace internal
3745 } // namespace v8 3741 } // namespace v8
3746 3742
3747 #endif // V8_TARGET_ARCH_ARM64 3743 #endif // V8_TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « src/full-codegen/arm/full-codegen-arm.cc ('k') | src/full-codegen/full-codegen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698