Commit 66caee74 authored by Sathya Gunasekaran's avatar Sathya Gunasekaran Committed by Commit Bot

[ESNext] Ship optional catch binding

Bug: v8:6889
Change-Id: Id79989b5ea65fa4a622205769e961a6e200641b7
Reviewed-on: https://chromium-review.googlesource.com/874996
Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
Reviewed-by: 's avatarAdam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50700}
parent 982c3164
......@@ -218,8 +218,7 @@ DEFINE_IMPLICATION(harmony_class_fields, harmony_private_fields)
"harmony disallow non undefined primitive return value from class " \
"constructor") \
V(harmony_dynamic_import, "harmony dynamic import") \
V(harmony_public_fields, "harmony public fields in class literals") \
V(harmony_optional_catch_binding, "allow omitting binding in catch blocks")
V(harmony_public_fields, "harmony public fields in class literals")
// Features that are shipping (turned on by default, but internal flag remains).
#define HARMONY_SHIPPING_BASE(V) \
......@@ -227,7 +226,8 @@ DEFINE_IMPLICATION(harmony_class_fields, harmony_private_fields)
V(harmony_regexp_named_captures, "harmony regexp named captures") \
V(harmony_regexp_property, "harmony Unicode regexp property classes") \
V(harmony_function_tostring, "harmony Function.prototype.toString") \
V(harmony_promise_finally, "harmony Promise.prototype.finally")
V(harmony_promise_finally, "harmony Promise.prototype.finally") \
V(harmony_optional_catch_binding, "allow omitting binding in catch blocks")
#ifdef V8_INTL_SUPPORT
#define HARMONY_SHIPPING(V) \
......
......@@ -497,8 +497,8 @@ PASS Invalid: "try {} finally {} catch(e) {}"
PASS Invalid: "function f() { try {} finally {} catch(e) {} }"
PASS Invalid: "try {} catch (...) {}"
PASS Invalid: "function f() { try {} catch (...) {} }"
PASS Invalid: "try {} catch {}"
PASS Invalid: "function f() { try {} catch {} }"
PASS Valid: "try {} catch {}"
PASS Valid: "function f() { try {} catch {} }"
PASS Valid: "if (a) try {} finally {} else b;"
PASS Valid: "function f() { if (a) try {} finally {} else b; }"
PASS Valid: "if (--a()) do with(1) try {} catch(ke) { f() ; g() } while (a in b) else {}"
......
......@@ -331,7 +331,7 @@ invalid("try {} catch(e)");
invalid("try {} finally");
invalid("try {} finally {} catch(e) {}");
invalid("try {} catch (...) {}");
invalid("try {} catch {}");
valid ("try {} catch {}");
valid ("if (a) try {} finally {} else b;");
valid ("if (--a()) do with(1) try {} catch(ke) { f() ; g() } while (a in b) else {}");
invalid("if (a) try {} else b; catch (e) { }");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment