Index: test/cctest/test-ast-expression-visitor.cc |
diff --git a/test/cctest/test-ast-expression-visitor.cc b/test/cctest/test-ast-expression-visitor.cc |
index b6cca6ac386f2f50483f23e78934933d7097f099..a40f87ccfeb5541fe4c6aa12a0e5b8876dfe3b08 100644 |
--- a/test/cctest/test-ast-expression-visitor.cc |
+++ b/test/cctest/test-ast-expression-visitor.cc |
@@ -343,7 +343,6 @@ TEST(VisitThrow) { |
v8::V8::Initialize(); |
HandleAndZoneScope handles; |
ZoneVector<ExpressionTypeEntry> types(handles.main_zone()); |
- // Check that traversing an empty for statement works. |
const char test_function[] = |
"function foo() {\n" |
" throw 123;\n" |
@@ -364,7 +363,6 @@ TEST(VisitYield) { |
v8::V8::Initialize(); |
HandleAndZoneScope handles; |
ZoneVector<ExpressionTypeEntry> types(handles.main_zone()); |
- // Check that traversing an empty for statement works. |
const char test_function[] = |
"function* foo() {\n" |
" yield 123;\n" |
@@ -372,7 +370,7 @@ TEST(VisitYield) { |
CollectTypes(&handles, test_function, &types); |
CHECK_TYPES_BEGIN { |
CHECK_EXPR(FunctionLiteral, Bounds::Unbounded()) { |
- // Generator function yields generator on entry. |
+ // Implicit initial yield |
CHECK_EXPR(Yield, Bounds::Unbounded()) { |
CHECK_VAR(.generator_object, Bounds::Unbounded()); |
CHECK_EXPR(Assignment, Bounds::Unbounded()) { |
@@ -380,16 +378,20 @@ TEST(VisitYield) { |
CHECK_EXPR(CallRuntime, Bounds::Unbounded()); |
} |
} |
- // Then yields undefined. |
+ // Explicit yield |
CHECK_EXPR(Yield, Bounds::Unbounded()) { |
CHECK_VAR(.generator_object, Bounds::Unbounded()); |
CHECK_EXPR(Literal, Bounds::Unbounded()); |
} |
- // Then yields 123. |
+ // Implicit final yield |
CHECK_EXPR(Yield, Bounds::Unbounded()) { |
CHECK_VAR(.generator_object, Bounds::Unbounded()); |
CHECK_EXPR(Literal, Bounds::Unbounded()); |
} |
+ // Implicit finally clause |
+ CHECK_EXPR(CallRuntime, Bounds::Unbounded()) { |
+ CHECK_VAR(.generator_object, Bounds::Unbounded()); |
+ } |
} |
} |
CHECK_TYPES_END |
@@ -400,7 +402,6 @@ TEST(VisitSkipping) { |
v8::V8::Initialize(); |
HandleAndZoneScope handles; |
ZoneVector<ExpressionTypeEntry> types(handles.main_zone()); |
- // Check that traversing an empty for statement works. |
const char test_function[] = |
"function foo(x) {\n" |
" return (x + x) + 1;\n" |