Remove support for the set decoration.

This CL removes the set decoration support, it has been replaced by the
group decoration.

Change-Id: Ib9ca94872d39e5da9dbe18bba3cae6d64320e55d
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/38824
Auto-Submit: dan sinclair <dsinclair@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: dan sinclair <dsinclair@chromium.org>
This commit is contained in:
dan sinclair 2021-01-26 20:18:51 +00:00 committed by Commit Bot service account
parent 6e570a9360
commit 67beed1b94
2 changed files with 3 additions and 21 deletions

View File

@ -137,7 +137,6 @@ const char kBuiltinDecoration[] = "builtin";
const char kGroupDecoration[] = "group"; const char kGroupDecoration[] = "group";
const char kLocationDecoration[] = "location"; const char kLocationDecoration[] = "location";
const char kOffsetDecoration[] = "offset"; const char kOffsetDecoration[] = "offset";
const char kSetDecoration[] = "set";
const char kStageDecoration[] = "stage"; const char kStageDecoration[] = "stage";
const char kStrideDecoration[] = "stride"; const char kStrideDecoration[] = "stride";
const char kWorkgroupSizeDecoration[] = "workgroup_size"; const char kWorkgroupSizeDecoration[] = "workgroup_size";
@ -150,9 +149,8 @@ bool is_decoration(Token t) {
return s == kAccessDecoration || s == kBindingDecoration || return s == kAccessDecoration || s == kBindingDecoration ||
s == kBlockDecoration || s == kBuiltinDecoration || s == kBlockDecoration || s == kBuiltinDecoration ||
s == kLocationDecoration || s == kOffsetDecoration || s == kLocationDecoration || s == kOffsetDecoration ||
s == kSetDecoration || s == kGroupDecoration || s == kGroupDecoration || s == kStageDecoration ||
s == kStageDecoration || s == kStrideDecoration || s == kStrideDecoration || s == kWorkgroupSizeDecoration;
s == kWorkgroupSizeDecoration;
} }
/// Enter-exit counters for block token types. /// Enter-exit counters for block token types.
@ -2937,7 +2935,7 @@ Maybe<ast::Decoration*> ParserImpl::decoration() {
}); });
} }
if (s == kSetDecoration || s == kGroupDecoration) { if (s == kGroupDecoration) {
const char* use = "group decoration"; const char* use = "group decoration";
return expect_paren_block(use, [&]() -> Result { return expect_paren_block(use, [&]() -> Result {
auto val = expect_positive_sint(use); auto val = expect_positive_sint(use);

View File

@ -236,22 +236,6 @@ TEST_F(ParserImplTest, VariableDecoration_Binding_MissingInvalid) {
"1:9: expected signed integer literal for binding decoration"); "1:9: expected signed integer literal for binding decoration");
} }
// DEPRECATED
TEST_F(ParserImplTest, VariableDecoration_set) {
auto p = parser("set(4)");
auto deco = p->decoration();
EXPECT_TRUE(deco.matched);
EXPECT_FALSE(deco.errored);
ASSERT_NE(deco.value, nullptr);
auto* var_deco = deco.value->As<ast::VariableDecoration>();
ASSERT_FALSE(p->has_error());
ASSERT_NE(var_deco, nullptr);
ASSERT_TRUE(var_deco->Is<ast::GroupDecoration>());
auto* group = var_deco->As<ast::GroupDecoration>();
EXPECT_EQ(group->value(), 4u);
}
TEST_F(ParserImplTest, VariableDecoration_group) { TEST_F(ParserImplTest, VariableDecoration_group) {
auto p = parser("group(4)"); auto p = parser("group(4)");
auto deco = p->decoration(); auto deco = p->decoration();