Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(32)

Unified Diff: test/mjsunit/fixed-context-shapes-when-recompiling.js

Issue 2388183003: PreParsing inner functions: Fix declaration-only variables. (Closed)
Patch Set: flag off Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/parsing/preparser.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/fixed-context-shapes-when-recompiling.js
diff --git a/test/mjsunit/fixed-context-shapes-when-recompiling.js b/test/mjsunit/fixed-context-shapes-when-recompiling.js
index acfa22e51aa35008f8fa9838784c06b1a4e83222..bd64e3d1680de3d1b217ee790764e6fa8d5e5e01 100644
--- a/test/mjsunit/fixed-context-shapes-when-recompiling.js
+++ b/test/mjsunit/fixed-context-shapes-when-recompiling.js
@@ -251,3 +251,112 @@
assertEquals(3, c);
}
})();
+
+// A cluster of similar tests where the inner function only declares a variable
+// whose name clashes with an outer function variable name, but doesn't use it.
+(function TestRegress650969_1() {
+ for (var i = 0; i < 3; ++i) {
+ if (i == 1) {
+ %OptimizeOsr();
+ }
+ var a;
+ function inner() {
+ var a;
+ }
+ }
+})();
+
+(function TestRegress650969_2() {
+ for (var i = 0; i < 3; ++i) {
+ if (i == 1) {
+ %OptimizeOsr();
+ }
+ var a;
+ function inner() {
+ var a = 6;
+ }
+ }
+})();
+
+(function TestRegress650969_3() {
+ for (var i = 0; i < 3; ++i) {
+ if (i == 1) {
+ %OptimizeOsr();
+ }
+ var a;
+ function inner() {
+ var a, b;
+ }
+ }
+})();
+
+(function TestRegress650969_4() {
+ for (var i = 0; i < 3; ++i) {
+ if (i == 1) {
+ %OptimizeOsr();
+ }
+ var a;
+ function inner() {
+ var a = 6, b;
+ }
+ }
+})();
+
+(function TestRegress650969_5() {
+ for (var i = 0; i < 3; ++i) {
+ if (i == 1) {
+ %OptimizeOsr();
+ }
+ var a;
+ function inner() {
+ let a;
+ }
+ }
+})();
+
+(function TestRegress650969_6() {
+ for (var i = 0; i < 3; ++i) {
+ if (i == 1) {
+ %OptimizeOsr();
+ }
+ var a;
+ function inner() {
+ let a = 6;
+ }
+ }
+})();
+
+(function TestRegress650969_7() {
+ for (var i = 0; i < 3; ++i) {
+ if (i == 1) {
+ %OptimizeOsr();
+ }
+ var a;
+ function inner() {
+ let a, b;
+ }
+ }
+})();
+
+(function TestRegress650969_8() {
+ for (var i = 0; i < 3; ++i) {
+ if (i == 1) {
+ %OptimizeOsr();
+ }
+ var a;
+ function inner() {
+ let a = 6, b;
+ }
+ }
+})();
+
+(function TestRegress650969_9() {
+ for (var i = 0; i < 3; ++i) {
+ if (i == 1) {
+ %OptimizeOsr();
+ }
+ var a;
+ function inner(a) {
+ }
+ }
+})();
« no previous file with comments | « src/parsing/preparser.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698