| 794 | } |
| 795 | |
| 796 | ConstantValue eval(EvalContext& context, const Args& args, SourceRange, |
| 797 | const CallExpression::SystemCallInfo&) const final { |
| 798 | auto lval = args[0]->evalLValue(context); |
| 799 | auto cv = args[1]->eval(context); |
| 800 | if (!lval || !cv) |
| 801 | return nullptr; |
| 802 | |
| 803 | auto target = lval.resolve(); |
| 804 | SLANG_ASSERT(target && target->isQueue()); |
| 805 | |
| 806 | auto& q = *target->queue(); |
| 807 | if (front) |
| 808 | q.push_front(std::move(cv)); |
| 809 | else |
| 810 | q.push_back(std::move(cv)); |
| 811 | |
| 812 | q.resizeToBound(); |
| 813 | |
| 814 | if (!context.checkMaxValue(*target, args[0]->sourceRange)) |
| 815 | return nullptr; |
| 816 | |
| 817 | return NullConstant; |
| 818 | } |
| 819 | |
| 820 | private: |
| 821 | bool front; |
nothing calls this directly
no test coverage detected