| Index: src/runtime.cc
|
| diff --git a/src/runtime.cc b/src/runtime.cc
|
| index 6213594155d909ff898f01daa5290065e1a6067c..2b7115eb018a4ed02664483e0864750b56dbb694 100644
|
| --- a/src/runtime.cc
|
| +++ b/src/runtime.cc
|
| @@ -4689,6 +4689,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) {
|
|
|