attila@1981: /* attila@1981: * Copyright (c) 2016 Oracle and/or its affiliates. All rights reserved. attila@1981: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. attila@1981: * attila@1981: * This code is free software; you can redistribute it and/or modify it attila@1981: * under the terms of the GNU General Public License version 2 only, as attila@1981: * published by the Free Software Foundation. attila@1981: * attila@1981: * This code is distributed in the hope that it will be useful, but WITHOUT attila@1981: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or attila@1981: * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License attila@1981: * version 2 for more details (a copy is included in the LICENSE file that attila@1981: * accompanied this code). attila@1981: * attila@1981: * You should have received a copy of the GNU General Public License version attila@1981: * 2 along with this work; if not, write to the Free Software Foundation, attila@1981: * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. attila@1981: * attila@1981: * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA attila@1981: * or visit www.oracle.com if you need additional information or have any attila@1981: * questions. attila@1981: */ attila@1981: attila@1981: /** attila@1981: * JDK-8170594: >>>=0 generates invalid bytecode for BaseNode LHS attila@1981: * attila@1981: * @test attila@1981: * @run attila@1981: */ attila@1981: attila@1981: var obj1 = {x: "100"}; attila@1981: (function (o, p) { attila@1981: if (p) { attila@1981: o.x >>>= 0; attila@1981: } attila@1981: })(obj1, true) attila@1981: Assert.assertTrue(obj1.x === 100) attila@1981: attila@1981: var obj2 = ["100"]; attila@1981: (function (o, p) { attila@1981: if (p) { attila@1981: o[0] >>>= 0; attila@1981: } attila@1981: })(obj2, true) attila@1981: Assert.assertTrue(obj2[0] === 100)