Index: src/runtime.js |
diff --git a/src/runtime.js b/src/runtime.js |
index 231763cbcabf6c2d3e392b509d25376fcd2c62f3..e9d98487721a07a1abe004fbde6377b0710b5c64 100644 |
--- a/src/runtime.js |
+++ b/src/runtime.js |
@@ -529,6 +529,13 @@ function ToString(x) { |
return (IS_NULL(x)) ? 'null' : %ToString(%DefaultString(x)); |
} |
+function NonStringToString(x) { |
+ if (IS_NUMBER(x)) return %NumberToString(x); |
+ if (IS_BOOLEAN(x)) return x ? 'true' : 'false'; |
+ if (IS_UNDEFINED(x)) return 'undefined'; |
+ return (IS_NULL(x)) ? 'null' : %ToString(%DefaultString(x)); |
+} |
+ |
// ECMA-262, section 9.9, page 36. |
function ToObject(x) { |