| 658 | } |
| 659 | |
| 660 | ConstantValue eval(EvalContext& context, const Args& args, SourceRange, |
| 661 | const CallExpression::SystemCallInfo&) const final { |
| 662 | auto array = args[0]->eval(context); |
| 663 | auto index = args[1]->eval(context); |
| 664 | if (!array || !index) |
| 665 | return nullptr; |
| 666 | |
| 667 | bool exists = array.map()->count(index); |
| 668 | return SVInt(32, exists ? 1 : 0, true); |
| 669 | } |
| 670 | }; |
| 671 | |
| 672 | class AssocArrayTraversalMethod : public SystemSubroutine { |