Lines Matching defs:variable
33 void CheckerContext::SetSmartCast(varbinder::Variable const *const variable, checker::Type *const smartType) noexcept
36 if (!variable->HasFlag(varbinder::VariableFlags::CAPTURED_MODIFIED)) {
37 smartCasts_.insert_or_assign(variable, smartType);
50 for (auto [variable, types] : testSmartCasts_) {
52 smartCasts.emplace_back(variable, types.first, types.second);
70 for (auto const [variable, type] : smartCasts_) {
71 smartCasts.emplace_back(variable, type);
86 for (auto [variable, type] : otherSmartCasts) {
87 smartCasts_.emplace(variable, type);
126 for (auto [variable, type] : otherSmartCasts) {
127 auto const it = smartCasts_.find(variable);
160 for (auto const *variable : changedVariables) {
161 smartCasts_.erase(variable);
208 auto const *variable = ident->Variable();
209 if (variable == nullptr) {
211 variable = parent_->AsETSChecker()->FindVariableInFunctionScope(
215 if (variable != nullptr) {
216 changedVariables.insert(variable);
234 for (auto const [variable, type] : smartCasts_) {
235 if (changedVariables.find(variable) == changedVariables.end()) {
236 smartCasts.emplace_back(variable, type);
273 auto const *const variable = identifier->Variable();
274 ASSERT(variable != nullptr);
277 if (auto const *const variableType = variable->TsType(); !variableType->IsETSReferenceType()) {
285 ASSERT(testCondition_.variable == nullptr);
287 testCondition_ = {variable, parent_->AsETSChecker()->GlobalETSNullType(), true, false};
306 if (testCondition_.variable != nullptr) {
318 ASSERT(testCondition_.variable == nullptr);
327 ASSERT(testCondition_.variable == nullptr);
335 varbinder::Variable const *variable = nullptr;
343 auto const getTestedType = [&variable, &testedType, &strict](ir::Identifier const *const identifier,
346 variable = identifier->Variable();
368 testCondition_ = {variable, testedType, negate, strict};
380 checker::Type *CheckerContext::GetSmartCast(varbinder::Variable const *const variable) const noexcept
384 if (auto const it = testSmartCasts_.find(variable);
389 if (auto const it = testSmartCasts_.find(variable);
396 auto const it = smartCasts_.find(variable);
428 for (auto const [variable, type] : smartCasts_) {
429 if (!inInnerScope(variable->AsLocalVariable()->GetScope(), breakStatement)) {
430 smartCasts.emplace_back(variable, type);