Index: test/mjsunit/harmony/empty-for.js |
diff --git a/test/mjsunit/regress/regress-354433.js b/test/mjsunit/harmony/empty-for.js |
similarity index 74% |
copy from test/mjsunit/regress/regress-354433.js |
copy to test/mjsunit/harmony/empty-for.js |
index 80ea28623021bafc8ab291cc2bdd1078424610fb..02211260ff5d1bd2cd50feb16c6b09b1984f69ea 100644 |
--- a/test/mjsunit/regress/regress-354433.js |
+++ b/test/mjsunit/harmony/empty-for.js |
@@ -25,30 +25,48 @@ |
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
-// Flags: --allow-natives-syntax |
- |
-var __v_0 = {}; |
-var __v_5 = {}; |
-function __f_2() { |
- this.__defineGetter__('str', function() { return __f_2(this); }); |
- this.str = "1"; |
- this.toString = function() { |
- return this.str; |
- }; |
-}; |
- |
-__v_5 = new __f_2(); |
-__v_0 = new __f_2(); |
- |
-function __f_5(fun,a,b) { |
- __v_5.str = a; |
- __v_0.str = b; |
- fun(__v_5, __v_0); |
+// Flags: --harmony-scoping |
+ |
+"use strict"; |
+ |
+function for_const() { |
+ for (const x = 1;;) { |
+ if (x == 1) break; |
+ } |
+ for (const x = 1; x < 2;) { |
+ if (x == 1) break; |
+ } |
+ for (const x = 1;; 0) { |
+ if (x == 1) break; |
+ } |
} |
-function __f_8(a,b) { return a%b }; |
+for_const(); |
+ |
+function for_let() { |
+ for (let x;;) { |
+ if (!x) break; |
+ } |
+ for (let x; x < 2;) { |
+ if (!x) break; |
+ } |
+ for (let x = 1;; x++) { |
+ if (x == 2) break; |
+ } |
+} |
+ |
+for_let(); |
+ |
+function for_var() { |
+ for (var x;;) { |
+ if (!x) break; |
+ } |
+ for (var x; x < 2;) { |
+ if (!x) break; |
+ } |
+ for (var x = 1;; x++) { |
+ if (x == 2) break; |
+ } |
+} |
-__f_5(__f_8, 1 << 30, 1); |
-__f_5(__f_8, 1, 1 << 30); |
-%OptimizeFunctionOnNextCall(__f_8); |
-__f_5(__f_8, 1, 1 << 30); |
+for_var(); |