Extension of ParsedListValueInterface which is also mutable. Accessing this like a normal list before all elements are finished being appended is a bug. This is primarily used by the runtime to efficiently implement comprehensions which accumulate results into a list. IMPORTANT: This type is only meant to be utilized by the runtime.
| 60 | // |
| 61 | // IMPORTANT: This type is only meant to be utilized by the runtime. |
| 62 | class MutableListValue : public CustomListValueInterface { |
| 63 | public: |
| 64 | virtual absl::Status Append(Value value) const = 0; |
| 65 | |
| 66 | virtual void Reserve(size_t capacity) const {} |
| 67 | |
| 68 | private: |
| 69 | NativeTypeId GetNativeTypeId() const override { |
| 70 | return NativeTypeId::For<MutableListValue>(); |
| 71 | } |
| 72 | }; |
| 73 | |
| 74 | // Special implementation of list which is both a modern list, legacy list, and |
| 75 | // mutable. |
no outgoing calls