mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-07-15 17:45:58 +00:00
tint/resolver: Reduce small-vector sizes
The vector sizes for expression traversal were excessive. Reduce. Change-Id: I3a2b7e7ba4cd82310565b883f85322834275ea8a Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/98082 Reviewed-by: Dan Sinclair <dsinclair@chromium.org> Commit-Queue: Ben Clayton <bclayton@google.com>
This commit is contained in:
parent
04e68a7032
commit
6d66921053
@ -68,7 +68,7 @@ bool TraverseExpressions(const ast::Expression* root, diag::List& diags, CALLBAC
|
|||||||
size_t depth;
|
size_t depth;
|
||||||
};
|
};
|
||||||
|
|
||||||
utils::Vector<Pending, 64> to_visit{{root, 0}};
|
utils::Vector<Pending, 32> to_visit{{root, 0}};
|
||||||
|
|
||||||
auto push_single = [&](const ast::Expression* expr, size_t depth) {
|
auto push_single = [&](const ast::Expression* expr, size_t depth) {
|
||||||
to_visit.Push({expr, depth});
|
to_visit.Push({expr, depth});
|
||||||
|
@ -1276,7 +1276,7 @@ sem::WhileStatement* Resolver::WhileStatement(const ast::WhileStatement* stmt) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
sem::Expression* Resolver::Expression(const ast::Expression* root) {
|
sem::Expression* Resolver::Expression(const ast::Expression* root) {
|
||||||
utils::Vector<const ast::Expression*, 128> sorted;
|
utils::Vector<const ast::Expression*, 64> sorted;
|
||||||
constexpr size_t kMaxExpressionDepth = 512U;
|
constexpr size_t kMaxExpressionDepth = 512U;
|
||||||
bool failed = false;
|
bool failed = false;
|
||||||
if (!ast::TraverseExpressions<ast::TraverseOrder::RightToLeft>(
|
if (!ast::TraverseExpressions<ast::TraverseOrder::RightToLeft>(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user