PutValue – correctly implemented by engines?

2013-11-23 Thread Axel Rauschmayer
(Hopefully not too off-topic for es-discuss.) Are JavaScript engines correctly implementing the operation PutValue [1]? I’d expect the following code to throw an exception. Reason: Due to the second part ([[Put]] internal method), step #7 (Throw is true, because the assignment happens in strict

Re: PutValue – correctly implemented by engines?

2013-11-23 Thread Yusuke SUZUKI
JavaScriptCore implements it correctly. --- Regards, Yusuke Suzuki On Sat, Nov 23, 2013 at 6:24 PM, Axel Rauschmayer a...@rauschma.de wrote: (Hopefully not too off-topic for es-discuss.) Are JavaScript engines correctly implementing the operation PutValue [1]? I’d expect the following

Re: PutValue – correctly implemented by engines?

2013-11-23 Thread Axel Rauschmayer
It does indeed. I just checked in Safari and got an exception. Thanks, Axel On Nov 23, 2013, at 11:00 , Yusuke SUZUKI utatane@gmail.com wrote: JavaScriptCore implements it correctly. --- Regards, Yusuke Suzuki On Sat, Nov 23, 2013 at 6:24 PM, Axel Rauschmayer a...@rauschma.de

Error.name

2013-11-23 Thread Kevin Smith
I see that the Error constructor is designed to be subclassable. I can create simple error types like so: class ZenError extends Error {} let err = new ZenError(abc); However, I would expect that: err.name === ZenError; Such an expectation would be useful when determining how to

Re: Using Unicode code point escape sequences in regular expressions without the `u` flag

2013-11-23 Thread Allen Wirfs-Brock
On Nov 22, 2013, at 11:02 PM, Mathias Bynens wrote: It’s pretty clear that (1) is equivalent to (2). I guess (3) is equivalent to (1) and (2) because of the following: RegExpUnicodeEscapeSequence[U] :: [+U] LeadSurrogate \u TrailSurrogate …but I was looking for confirmation.

Re: PutValue – correctly implemented by engines?

2013-11-23 Thread Mark S. Miller
Hi Axel, please file bugs against Firefox and V8. On Sat, Nov 23, 2013 at 2:24 AM, Axel Rauschmayer a...@rauschma.de wrote: It does indeed. I just checked in Safari and got an exception. Thanks, Axel On Nov 23, 2013, at 11:00 , Yusuke SUZUKI utatane@gmail.com wrote: JavaScriptCore

Re: PutValue – correctly implemented by engines?

2013-11-23 Thread Axel Rauschmayer
Can you tell me where to do that? Or is test262 a better way to fix this (assuming that it is run regularly on V8 and SpiderMonkey)? On Nov 23, 2013, at 17:15 , Mark S. Miller erig...@google.com wrote: Hi Axel, please file bugs against Firefox and V8. On Sat, Nov 23, 2013 at 2:24 AM,

Re: PutValue – correctly implemented by engines?

2013-11-23 Thread Mark Miller
[+allen] https://code.google.com/p/v8/issues/list https://bugzilla.mozilla.org/enter_bug.cgi?product=Corecomponent=JavaScript%20Engine Adding a test262 test would be awesome! But I am no longer sure of the weird ECMA procedure needed to do so while avoiding IPR issues. Can someone else advise?

RE: Error.name

2013-11-23 Thread Domenic Denicola
+1 to making this work seamlessly, if possible. But I am not sure it is possible... From: es-discuss [mailto:es-discuss-boun...@mozilla.org] On Behalf Of Kevin Smith I could, of course, do this manually:     class ZenError extends Error {         constructor(msg) { super(msg); this.name =

RE: PutValue – correctly implemented by engines?

2013-11-23 Thread Domenic Denicola
[+test262-discuss] From: es-discuss [mailto:es-discuss-boun...@mozilla.org] On Behalf Of Mark Miller Adding a test262 test would be awesome! But I am no longer sure of the weird ECMA procedure needed to do so while avoiding IPR issues. Can someone else advise? Thanks. My stance on this,

Re: Error.name

2013-11-23 Thread Andrea Giammarchi
the way I've solved that a while ago ( https://code.google.com/p/formaldehyde/source/browse/trunk/formaldehyde.js ) `(ServerError.prototype = new Error).name = ServerError;` Today I would do ```javascript function ServerError(message) { this.message = '' + message; } ServerError.prototype =