mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 13:21:05 +01:00
Clean up Context API (#4969)
- Add a better class comment. - Remove the obsolete `type_ids_for_type_constants_` and `TypeNode`. - For `bind_name_map`, fix declaration order and move comment to be consistent with other members. - Reorder accessors to better match order of data members. - This is how I noticed `type_ids_for_type_constants_` - Put a bigger notice so that `sem_ir` helper functions don't end up in the middle of other members again.
This commit is contained in:
@@ -62,15 +62,6 @@ Context::Context(DiagnosticEmitter* emitter,
|
||||
import_ir_constant_values_.reserve(imported_ir_count);
|
||||
check_ir_map_.resize(total_ir_count, SemIR::ImportIRId::None);
|
||||
|
||||
// Map the builtin `<error>` and `type` type constants to their corresponding
|
||||
// special `TypeId` values.
|
||||
type_ids_for_type_constants_.Insert(
|
||||
SemIR::ConstantId::ForConcreteConstant(SemIR::ErrorInst::SingletonInstId),
|
||||
SemIR::ErrorInst::SingletonTypeId);
|
||||
type_ids_for_type_constants_.Insert(
|
||||
SemIR::ConstantId::ForConcreteConstant(SemIR::TypeType::SingletonInstId),
|
||||
SemIR::TypeType::SingletonTypeId);
|
||||
|
||||
// TODO: Remove this and add a `VerifyOnFinish` once we properly push and pop
|
||||
// in the right places.
|
||||
generic_region_stack().Push();
|
||||
|
||||
Reference in New Issue
Block a user