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

Side by Side Diff: src/arm64/macro-assembler-arm64.cc

Issue 1818923002: [stubs] Split ToNumberStub into reusable subparts. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: REBASE Created 4 years, 9 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/arm64/macro-assembler-arm64.h ('k') | src/bailout-reason.h » ('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/base/bits.h" 7 #include "src/base/bits.h"
8 #include "src/base/division-by-constant.h" 8 #include "src/base/division-by-constant.h"
9 #include "src/bootstrapper.h" 9 #include "src/bootstrapper.h"
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 1672 matching lines...) Expand 10 before | Expand all | Expand 10 after
1683 void MacroAssembler::AssertPositiveOrZero(Register value) { 1683 void MacroAssembler::AssertPositiveOrZero(Register value) {
1684 if (emit_debug_code()) { 1684 if (emit_debug_code()) {
1685 Label done; 1685 Label done;
1686 int sign_bit = value.Is64Bits() ? kXSignBit : kWSignBit; 1686 int sign_bit = value.Is64Bits() ? kXSignBit : kWSignBit;
1687 Tbz(value, sign_bit, &done); 1687 Tbz(value, sign_bit, &done);
1688 Abort(kUnexpectedNegativeValue); 1688 Abort(kUnexpectedNegativeValue);
1689 Bind(&done); 1689 Bind(&done);
1690 } 1690 }
1691 } 1691 }
1692 1692
1693 void MacroAssembler::AssertNotNumber(Register value) {
1694 if (emit_debug_code()) {
1695 STATIC_ASSERT(kSmiTag == 0);
1696 Tst(value, kSmiTagMask);
1697 Check(ne, kOperandIsANumber);
1698 Label done;
1699 JumpIfNotHeapNumber(value, &done);
1700 Abort(kOperandIsANumber);
1701 Bind(&done);
1702 }
1703 }
1704
1693 void MacroAssembler::AssertNumber(Register value) { 1705 void MacroAssembler::AssertNumber(Register value) {
1694 if (emit_debug_code()) { 1706 if (emit_debug_code()) {
1695 Label done; 1707 Label done;
1696 JumpIfSmi(value, &done); 1708 JumpIfSmi(value, &done);
1697 JumpIfHeapNumber(value, &done); 1709 JumpIfHeapNumber(value, &done);
1698 Abort(kOperandIsNotANumber); 1710 Abort(kOperandIsNotANumber);
1699 Bind(&done); 1711 Bind(&done);
1700 } 1712 }
1701 } 1713 }
1702 1714
(...skipping 3356 matching lines...) Expand 10 before | Expand all | Expand 10 after
5059 } 5071 }
5060 5072
5061 5073
5062 #undef __ 5074 #undef __
5063 5075
5064 5076
5065 } // namespace internal 5077 } // namespace internal
5066 } // namespace v8 5078 } // namespace v8
5067 5079
5068 #endif // V8_TARGET_ARCH_ARM64 5080 #endif // V8_TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « src/arm64/macro-assembler-arm64.h ('k') | src/bailout-reason.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698