Index: src/runtime/runtime-numbers.cc |
diff --git a/src/runtime/runtime-numbers.cc b/src/runtime/runtime-numbers.cc |
index ae2633c234496785b1bd1ca10793f6e968da88ba..7e6712ad230614f648304c41bd63540d30ce2caa 100644 |
--- a/src/runtime/runtime-numbers.cc |
+++ b/src/runtime/runtime-numbers.cc |
@@ -548,6 +548,15 @@ |
} |
+RUNTIME_FUNCTION(Runtime_IsNonNegativeSmi) { |
+ SealHandleScope shs(isolate); |
+ DCHECK(args.length() == 1); |
+ CONVERT_ARG_CHECKED(Object, obj, 0); |
+ return isolate->heap()->ToBoolean(obj->IsSmi() && |
+ Smi::cast(obj)->value() >= 0); |
+} |
+ |
+ |
RUNTIME_FUNCTION(Runtime_GetRootNaN) { |
SealHandleScope shs(isolate); |
DCHECK(args.length() == 0); |