| Index: src/runtime.cc
|
| diff --git a/src/runtime.cc b/src/runtime.cc
|
| index a9121ce851d578c650e45d2083bbbdd857bcb489..27ab6ec0d22847e2af8514f9aa67d06aaa52b639 100644
|
| --- a/src/runtime.cc
|
| +++ b/src/runtime.cc
|
| @@ -4688,6 +4688,19 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_NumberToPrecision) {
|
| }
|
|
|
|
|
| +RUNTIME_FUNCTION(MaybeObject*, Runtime_IsValidSmi) {
|
| + HandleScope shs(isolate);
|
| + ASSERT(args.length() == 1);
|
| +
|
| + CONVERT_NUMBER_CHECKED(int32_t, number, Int32, args[0]);
|
| + if (Smi::IsValid(number)) {
|
| + return isolate->heap()->true_value();
|
| + } else {
|
| + return isolate->heap()->false_value();
|
| + }
|
| +}
|
| +
|
| +
|
| // Returns a single character string where first character equals
|
| // string->Get(index).
|
| static Handle<Object> GetCharAt(Handle<String> string, uint32_t index) {
|
|
|