PutValue – correctly implemented by engines?

# Axel Rauschmayer (12 years ago)

(Hopefully not too off-topic for es-discuss.)

Are JavaScript engines correctly implementing the operation PutValue?

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 mode).

(function () { 'use strict'; var s=''; s.foo=3 }());

But it doesn’t (not on Firefox and V8).

# Yusuke SUZUKI (12 years ago)

JavaScriptCore implements it correctly.

# Axel Rauschmayer (12 years ago)

It does indeed. I just checked in Safari and got an exception.

# Mark S. Miller (12 years ago)

please file bugs against Firefox and V8.

# Axel Rauschmayer (12 years ago)

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)?

# Mark Miller (12 years ago)

[+allen]

code.google.com/p/v8/issues/list, bugzilla.mozilla.org/enter_bug.cgi?product=Core&component=JavaScript Engine

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.

Please still file the bugs in the meantime. Thanks.

# Domenic Denicola (12 years ago)

[+test262-discuss]

From: es-discuss [mailto:es-discuss-bounces at 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, not really informed by anyone but myself, is that you should write test-262 tests, then release them under a liberal license, and ask your favorite Ecma member to copy them into test-262.

If anyone thinks this won't work, I'd love to hear back before I start converting a lot of promise tests to test-262 form :)

# Allen Wirfs-Brock (12 years ago)

Sorry about the delay in responding.

The current expectation is that after the Ecma General Assembly meeting, Dec 10, that anyone will be able to make code contributions to test262 by filling out (only once, not once er contributed test) the Ecma software contribution form www.ecma-international.org/memento/TC39 exhibit B.pdf

This requires that the code be contributed using a BSD license. The contributor retains ownership of the copyright and the ability to license it using other licenses.

I'll provide an update after the meeting.