Skip to content

Commit 2390989

Browse files
committedOct 26, 2024·
refactor: make EvaluatedDictionary a POD
1 parent 0aa804d commit 2390989

File tree

1 file changed

+0
-22
lines changed

1 file changed

+0
-22
lines changed
 

‎src/expression.h

-22
Original file line numberDiff line numberDiff line change
@@ -203,29 +203,7 @@ struct Dictionary {
203203
size_t definition_count;
204204
};
205205

206-
// TODO: make cheaper to copy.
207-
// Bottleneck.
208-
// Use index range for definitions.
209-
// But then need to know all members of the dictionary before it is evaluated.
210-
// so that they are all added together, at least the first time.
211-
// Alternatively, use unordered_map for fast lookup of all names
212-
// and not just definitions.
213-
// Bottleneck.
214-
/*
215206
struct EvaluatedDictionary {
216-
Expression environment;
217-
size_t name_first; // Index to constant names/keys. Could possibly be shared across instances.
218-
size_t name_last; // Index to constant names/keys. Could possibly be shared across instances.
219-
size_t value_first; // Index to values/expression that can change during the evaluation.
220-
size_t value_last; // Index to values/expression that can change during the evaluation.
221-
};
222-
*/
223-
struct EvaluatedDictionary {
224-
EvaluatedDictionary(const EvaluatedDictionary&) = delete;
225-
EvaluatedDictionary(EvaluatedDictionary&&) = default;
226-
EvaluatedDictionary& operator=(const EvaluatedDictionary&) = delete;
227-
EvaluatedDictionary& operator=(EvaluatedDictionary&&) = default;
228-
229207
Expression environment;
230208
Indices definitions;
231209

0 commit comments

Comments
 (0)
Please sign in to comment.