| Index: src/runtime.js
|
| diff --git a/src/runtime.js b/src/runtime.js
|
| index a49a3bdfa991279df019c6d944cb6d3e2c08bf82..9ace6ff821db13e977c9c1d387ef433f787805c3 100644
|
| --- a/src/runtime.js
|
| +++ b/src/runtime.js
|
| @@ -38,57 +38,6 @@ var isConcatSpreadableSymbol =
|
|
|
| // ----------------------------------------------------------------------------
|
|
|
| -/* -----------------------------------
|
| -- - - C o m p a r i s o n - - -
|
| ------------------------------------
|
| -*/
|
| -
|
| -// ECMA-262, section 11.8.5, page 53. The 'ncr' parameter is used as
|
| -// the result when either (or both) the operands are NaN.
|
| -function COMPARE(x, ncr) {
|
| - var left;
|
| - var right;
|
| - // Fast cases for string, numbers and undefined compares.
|
| - if (IS_STRING(this)) {
|
| - if (IS_STRING(x)) return %_StringCompare(this, x);
|
| - if (IS_UNDEFINED(x)) return ncr;
|
| - left = this;
|
| - } else if (IS_NUMBER(this)) {
|
| - if (IS_NUMBER(x)) return %NumberCompare(this, x, ncr);
|
| - if (IS_UNDEFINED(x)) return ncr;
|
| - left = this;
|
| - } else if (IS_UNDEFINED(this)) {
|
| - if (!IS_UNDEFINED(x)) {
|
| - %to_primitive(x, NUMBER_HINT);
|
| - }
|
| - return ncr;
|
| - } else if (IS_UNDEFINED(x)) {
|
| - %to_primitive(this, NUMBER_HINT);
|
| - return ncr;
|
| - } else {
|
| - left = %to_primitive(this, NUMBER_HINT);
|
| - }
|
| -
|
| - right = %to_primitive(x, NUMBER_HINT);
|
| - if (IS_STRING(left) && IS_STRING(right)) {
|
| - return %_StringCompare(left, right);
|
| - } else {
|
| - var left_number = %to_number_fun(left);
|
| - var right_number = %to_number_fun(right);
|
| - if (NUMBER_IS_NAN(left_number) || NUMBER_IS_NAN(right_number)) return ncr;
|
| - return %NumberCompare(left_number, right_number, ncr);
|
| - }
|
| -}
|
| -
|
| -// Strong mode COMPARE throws if an implicit conversion would be performed
|
| -function COMPARE_STRONG(x, ncr) {
|
| - if (IS_STRING(this) && IS_STRING(x)) return %_StringCompare(this, x);
|
| - if (IS_NUMBER(this) && IS_NUMBER(x)) return %NumberCompare(this, x, ncr);
|
| -
|
| - throw %make_type_error(kStrongImplicitConversion);
|
| -}
|
| -
|
| -
|
| /* -----------------------------
|
| - - - H e l p e r s - - -
|
| -----------------------------
|
| @@ -433,8 +382,6 @@ $toString = ToString;
|
|
|
| %InstallToContext([
|
| "apply_prepare_builtin", APPLY_PREPARE,
|
| - "compare_builtin", COMPARE,
|
| - "compare_strong_builtin", COMPARE_STRONG,
|
| "concat_iterable_to_array_builtin", CONCAT_ITERABLE_TO_ARRAY,
|
| "reflect_apply_prepare_builtin", REFLECT_APPLY_PREPARE,
|
| "reflect_construct_prepare_builtin", REFLECT_CONSTRUCT_PREPARE,
|
|
|