You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 14, 2022. It is now read-only.
While working on arrow functions patch, I found two problems with how strict mode currently works in Rhino.
First, strict mode declared inside body function, should influence function arguments too. For example, eval and arguments are explicitly described as not valid arguments names in strict mode (see Appendix C of ES5, or section 14.1.2 of ES6)
Second, in strict mode, when this is resolved, it should not be coerced to object, thus inside primitive wrapper's method this is primitive itself, not an object (again, see Appendix C of ES5 or Appendix C of ES6)
but right now it's "object", like in non-strict mode.
Although I know that these issues and a lot more were addressed (and fixed) in PR about ES5 compliance by @anba, it's overwhelming huge for me (+5,849 −2,256!) and I don't think I will be able to port it any time soon. But, maybe, we could try to split it and apply in chunks.
The text was updated successfully, but these errors were encountered:
I can go back and look at the history, but I believe that anba split the
original PR into two smaller ones that didn't change the public API, and I
already merged the changes in this one:
So that would leave whatever was left in that original PR, which
unfortunately might be hard to work out -- but if you can find commits in
there that you can fix then we can certainly pull those fixes as well.
On Wed, Jan 14, 2015 at 9:13 PM, Ivan Vyshnevskyi [email protected]
wrote:
While working on arrow functions patch, I found two problems with how
strict mode currently works in Rhino.
Number.prototype.foo = function () { "use strict"; return this; };for (var i = 0; i < 10; i++) {
assertEquals(typeof i.foo(), "number");
assertEquals(i.foo(), i);
}
but right now it's "object", like in non-strict mode.
Although I know that these issues and a lot more were addressed (and
fixed) in PR about ES5 compliance mozilla#39 by @anba https://github.com/anba, it's overwhelming huge for me (+5,849 −2,256!)
and I don't think I will be able to port it any time soon. But, maybe, we
could try to split it and apply in chunks.
—
Reply to this email directly or view it on GitHub #32.
While working on arrow functions patch, I found two problems with how strict mode currently works in Rhino.
First, strict mode declared inside body function, should influence function arguments too. For example,
eval
andarguments
are explicitly described as not valid arguments names in strict mode (see Appendix C of ES5, or section 14.1.2 of ES6)but it doesn't.
Second, in strict mode, when
this
is resolved, it should not be coerced to object, thus inside primitive wrapper's methodthis
is primitive itself, not an object (again, see Appendix C of ES5 or Appendix C of ES6)but right now it's "object", like in non-strict mode.
Although I know that these issues and a lot more were addressed (and fixed) in PR about ES5 compliance by @anba, it's overwhelming huge for me (+5,849 −2,256!) and I don't think I will be able to port it any time soon. But, maybe, we could try to split it and apply in chunks.
The text was updated successfully, but these errors were encountered: