| Index: src/runtime.js
|
| diff --git a/src/runtime.js b/src/runtime.js
|
| index aaaa4fecba110c4e5e3edc0a88ea9f6a3e946e89..a4677da316d1cb28a3c96ce730e0fb1cc5926573 100644
|
| --- a/src/runtime.js
|
| +++ b/src/runtime.js
|
| @@ -199,6 +199,15 @@ function SUB(y) {
|
| }
|
|
|
|
|
| +// ECMA-262, section 11.6.2, page 50.
|
| +function SUB_STRONG(y) {
|
| + if (IS_NUMBER(this) && IS_NUMBER(y)) {
|
| + return %NumberSub(this, y);
|
| + }
|
| + throw %MakeTypeError('strong_implicit_cast');
|
| +}
|
| +
|
| +
|
| // ECMA-262, section 11.5.1, page 48.
|
| function MUL(y) {
|
| var x = IS_NUMBER(this) ? this : %NonNumberToNumber(this);
|
| @@ -207,6 +216,15 @@ function MUL(y) {
|
| }
|
|
|
|
|
| +// ECMA-262, section 11.5.1, page 48.
|
| +function MUL_STRONG(y) {
|
| + if (IS_NUMBER(this) && IS_NUMBER(y)) {
|
| + return %NumberMul(this, y);
|
| + }
|
| + throw %MakeTypeError('strong_implicit_cast');
|
| +}
|
| +
|
| +
|
| // ECMA-262, section 11.5.2, page 49.
|
| function DIV(y) {
|
| var x = IS_NUMBER(this) ? this : %NonNumberToNumber(this);
|
| @@ -215,6 +233,15 @@ function DIV(y) {
|
| }
|
|
|
|
|
| +// ECMA-262, section 11.5.2, page 49.
|
| +function DIV_STRONG(y) {
|
| + if (IS_NUMBER(this) && IS_NUMBER(y)) {
|
| + return %NumberDiv(this, y);
|
| + }
|
| + throw %MakeTypeError('strong_implicit_cast');
|
| +}
|
| +
|
| +
|
| // ECMA-262, section 11.5.3, page 49.
|
| function MOD(y) {
|
| var x = IS_NUMBER(this) ? this : %NonNumberToNumber(this);
|
| @@ -223,6 +250,14 @@ function MOD(y) {
|
| }
|
|
|
|
|
| +// ECMA-262, section 11.5.3, page 49.
|
| +function MOD_STRONG(y) {
|
| + if (IS_NUMBER(this) && IS_NUMBER(y)) {
|
| + return %NumberMod(this, y);
|
| + }
|
| + throw %MakeTypeError('strong_implicit_cast');
|
| +}
|
| +
|
|
|
| /* -------------------------------------------
|
| - - - B i t o p e r a t i o n s - - -
|
|
|