Track the arguments and witnesses on values indirectly. (#1335)

This avoids the need to make copies of potentially large maps when
the same bindings are used in multiple values, such as when forming
a bound method value.
This commit is contained in:
Richard Smith authored and GitHub committed 2022-06-21 08:48:48 -07:00
1 parent 8705e29d9f
commit a1be2a8a38
9 files changed
+203 -108

No files matched your search

+14
View File
@@ -0,0 +1,14 @@
// Part of the Carbon Language project, under the Apache License v2.0 with LLVM
// Exceptions. See /LICENSE for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
#include "explorer/ast/bindings.h"
namespace Carbon {
auto Bindings::None() -> Nonnull<const Bindings*> {
static Nonnull<const Bindings*> bindings = new Bindings({}, {});
return bindings;
}
} // namespace Carbon