| Index: test/mjsunit/keyed-load-with-symbol-key.js
|
| diff --git a/test/mjsunit/keyed-load-with-string-key.js b/test/mjsunit/keyed-load-with-symbol-key.js
|
| similarity index 91%
|
| copy from test/mjsunit/keyed-load-with-string-key.js
|
| copy to test/mjsunit/keyed-load-with-symbol-key.js
|
| index 43889460f622209a1e56a92293ce7cff25c197ab..15562be6bde2eb50ac8b2ce4464c66555240bb50 100644
|
| --- a/test/mjsunit/keyed-load-with-string-key.js
|
| +++ b/test/mjsunit/keyed-load-with-symbol-key.js
|
| @@ -26,21 +26,24 @@
|
| // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
| // Flags: --allow-natives-syntax
|
| -
|
| +var s = Symbol("foo");
|
|
|
| var o = {
|
| - "foo": "bar",
|
| + [s]: "bar",
|
| }
|
|
|
| function get(obj, key) {
|
| return obj[key];
|
| }
|
|
|
| -get(o, "foo");
|
| -get(o, "foo");
|
| -get(o, "foo");
|
| +assertEquals("bar", get(o, s));
|
| +get(o, s);
|
| +get(o, s);
|
|
|
| %OptimizeFunctionOnNextCall(get);
|
| -get(o, "foo");
|
| +assertEquals("bar", get(o, s));
|
|
|
| assertOptimized(get);
|
| +
|
| +get(o, "funny");
|
| +assertUnoptimized(get);
|
|
|