Index: src/arm64/macro-assembler-arm64.cc |
diff --git a/src/arm64/macro-assembler-arm64.cc b/src/arm64/macro-assembler-arm64.cc |
index 05753ffab945d05abecf554a71f48f9230ff04eb..8fab9d91d7d5fc366892c02d37b7d505cfd2a5a9 100644 |
--- a/src/arm64/macro-assembler-arm64.cc |
+++ b/src/arm64/macro-assembler-arm64.cc |
@@ -1677,6 +1677,15 @@ void MacroAssembler::AssertPositiveOrZero(Register value) { |
} |
} |
+void MacroAssembler::AssertNumber(Register value) { |
+ if (emit_debug_code()) { |
+ Label done; |
+ JumpIfSmi(value, &done); |
+ JumpIfHeapNumber(value, &done); |
+ Abort(kOperandIsNotANumber); |
+ Bind(&done); |
+ } |
+} |
void MacroAssembler::CallStub(CodeStub* stub, TypeFeedbackId ast_id) { |
DCHECK(AllowThisStubCall(stub)); // Stub calls are not allowed in some stubs. |