mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-04 22:02:52 +01:00
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:
@@ -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
|
||||
Reference in New Issue
Block a user