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

Unified Diff: test/cctest/compiler/test-run-jsbranches.cc

Issue 2679913004: [turbofan] Remove for-in support from the AstGraphBuilder. (Closed)
Patch Set: Created 3 years, 10 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
« src/compiler/ast-graph-builder.cc ('K') | « src/compiler/ast-graph-builder.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/compiler/test-run-jsbranches.cc
diff --git a/test/cctest/compiler/test-run-jsbranches.cc b/test/cctest/compiler/test-run-jsbranches.cc
index 502295e471965d72fff295ace1155b6bee948814..76cb9a28436b0e29dc7bcd8663b1029c40c154a7 100644
--- a/test/cctest/compiler/test-run-jsbranches.cc
+++ b/test/cctest/compiler/test-run-jsbranches.cc
@@ -104,70 +104,6 @@ TEST(ForStatement) {
T.CheckCall(T.Val("str"), T.Val("str"), T.Val("str"));
}
-
-static void TestForIn(const char* code) {
- FunctionTester T(code);
- T.CheckCall(T.undefined(), T.undefined());
- T.CheckCall(T.undefined(), T.null());
- T.CheckCall(T.undefined(), T.NewObject("({})"));
- T.CheckCall(T.undefined(), T.Val(1));
- T.CheckCall(T.Val("2"), T.Val("str"));
- T.CheckCall(T.Val("a"), T.NewObject("({'a' : 1})"));
- T.CheckCall(T.Val("2"), T.NewObject("([1, 2, 3])"));
- T.CheckCall(T.Val("a"), T.NewObject("({'a' : 1, 'b' : 1})"), T.Val("b"));
- T.CheckCall(T.Val("1"), T.NewObject("([1, 2, 3])"), T.Val("2"));
-}
-
-
-TEST(ForInStatement) {
- // Variable assignment.
- TestForIn(
- "(function(a, b) {"
- "var last;"
- "for (var x in a) {"
- " if (b) { delete a[b]; b = undefined; }"
- " last = x;"
- "}"
- "return last;})");
- // Indexed assignment.
- TestForIn(
- "(function(a, b) {"
- "var array = [0, 1, undefined];"
- "for (array[2] in a) {"
- " if (b) { delete a[b]; b = undefined; }"
- "}"
- "return array[2];})");
- // Named assignment.
- TestForIn(
- "(function(a, b) {"
- "var obj = {'a' : undefined};"
- "for (obj.a in a) {"
- " if (b) { delete a[b]; b = undefined; }"
- "}"
- "return obj.a;})");
-}
-
-
-TEST(ForInContinueStatement) {
- const char* src =
- "(function(a,b) {"
- " var r = '-';"
- " for (var x in a) {"
- " r += 'A-';"
- " if (b) continue;"
- " r += 'B-';"
- " }"
- " return r;"
- "})";
- FunctionTester T(src);
-
- T.CheckCall(T.Val("-A-B-"), T.NewObject("({x:1})"), T.false_value());
- T.CheckCall(T.Val("-A-B-A-B-"), T.NewObject("({x:1,y:2})"), T.false_value());
- T.CheckCall(T.Val("-A-"), T.NewObject("({x:1})"), T.true_value());
- T.CheckCall(T.Val("-A-A-"), T.NewObject("({x:1,y:2})"), T.true_value());
-}
-
-
TEST(ForOfContinueStatement) {
const char* src =
"(function(a,b) {"
« src/compiler/ast-graph-builder.cc ('K') | « src/compiler/ast-graph-builder.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698