| Index: src/runtime.js
|
| diff --git a/src/runtime.js b/src/runtime.js
|
| index 89a3f2241dd9e95beefe7733fc282b42a1b5fd83..18efec36f5ee4703d03555d94d92ac1442539446 100644
|
| --- a/src/runtime.js
|
| +++ b/src/runtime.js
|
| @@ -165,7 +165,7 @@ function ADD(x) {
|
| var b = %to_primitive(x, NO_HINT);
|
|
|
| if (IS_STRING(a)) {
|
| - return %_StringAdd(a, %to_string_fun(b));
|
| + return %_StringAdd(a, TO_STRING(b));
|
| } else if (IS_STRING(b)) {
|
| return %_StringAdd(%non_string_to_string(a), b);
|
| } else {
|
| @@ -191,7 +191,7 @@ function STRING_ADD_LEFT(y) {
|
| } else {
|
| y = IS_NUMBER(y)
|
| ? %_NumberToString(y)
|
| - : %to_string_fun(%to_primitive(y, NO_HINT));
|
| + : TO_STRING(%to_primitive(y, NO_HINT));
|
| }
|
| }
|
| return %_StringAdd(this, y);
|
| @@ -207,7 +207,7 @@ function STRING_ADD_RIGHT(y) {
|
| } else {
|
| x = IS_NUMBER(x)
|
| ? %_NumberToString(x)
|
| - : %to_string_fun(%to_primitive(x, NO_HINT));
|
| + : TO_STRING(%to_primitive(x, NO_HINT));
|
| }
|
| }
|
| return %_StringAdd(x, y);
|
| @@ -495,7 +495,7 @@ function APPLY_PREPARE(args) {
|
| if (length > kSafeArgumentsLength) throw %make_range_error(kStackOverflow);
|
|
|
| if (!IS_SPEC_FUNCTION(this)) {
|
| - throw %make_type_error(kApplyNonFunction, %to_string_fun(this), typeof this);
|
| + throw %make_type_error(kApplyNonFunction, TO_STRING(this), typeof this);
|
| }
|
|
|
| // Make sure the arguments list has the right type.
|
| @@ -523,7 +523,7 @@ function REFLECT_APPLY_PREPARE(args) {
|
| }
|
|
|
| if (!IS_SPEC_FUNCTION(this)) {
|
| - throw %make_type_error(kCalledNonCallable, %to_string_fun(this));
|
| + throw %make_type_error(kCalledNonCallable, TO_STRING(this));
|
| }
|
|
|
| if (!IS_SPEC_OBJECT(args)) {
|
| @@ -562,17 +562,17 @@ function REFLECT_CONSTRUCT_PREPARE(
|
|
|
| if (!ctorOk) {
|
| if (!IS_SPEC_FUNCTION(this)) {
|
| - throw %make_type_error(kCalledNonCallable, %to_string_fun(this));
|
| + throw %make_type_error(kCalledNonCallable, TO_STRING(this));
|
| } else {
|
| - throw %make_type_error(kNotConstructor, %to_string_fun(this));
|
| + throw %make_type_error(kNotConstructor, TO_STRING(this));
|
| }
|
| }
|
|
|
| if (!newTargetOk) {
|
| if (!IS_SPEC_FUNCTION(newTarget)) {
|
| - throw %make_type_error(kCalledNonCallable, %to_string_fun(newTarget));
|
| + throw %make_type_error(kCalledNonCallable, TO_STRING(newTarget));
|
| } else {
|
| - throw %make_type_error(kNotConstructor, %to_string_fun(newTarget));
|
| + throw %make_type_error(kNotConstructor, TO_STRING(newTarget));
|
| }
|
| }
|
|
|
| @@ -609,12 +609,6 @@ function TO_NUMBER() {
|
| }
|
|
|
|
|
| -// Convert the receiver to a string - forward to ToString.
|
| -function TO_STRING() {
|
| - return %to_string_fun(this);
|
| -}
|
| -
|
| -
|
| /* -------------------------------------
|
| - - - C o n v e r s i o n s - - -
|
| -------------------------------------
|
| @@ -873,7 +867,6 @@ $toString = ToString;
|
| "to_length_fun", ToLength,
|
| "to_number_fun", ToNumber,
|
| "to_primitive", ToPrimitive,
|
| - "to_string_fun", ToString,
|
| ]);
|
|
|
| utils.Export(function(to) {
|
|
|