// Copyright 2017 the V8 project authors. All rights reserved.// Use of this source code is governed by a BSD-style license that can be// found in the LICENSE file.// Flags: --predictableconststr='2016-01-02';functiontestToUint32InSplit(){varre;functiontoDictMode(){re.x=42;deletere.x;return"def";}re=/./g;// Needs to be global to trigger lastIndex accesses.returnre[Symbol.replace]("abc",{valueOf:toDictMode});}functiontestToStringInReplace(){varre;functiontoDictMode(){re.x=42;deletere.x;return42;}re=/./g;// Needs to be global to trigger lastIndex accesses.returnre[Symbol.split]("abc",{valueOf:toDictMode});}testToUint32InSplit();testToStringInReplace();