Add support for Sets
ethanblake4 opened this issue ยท 4 comments
This will need:
Support in the parser (parser.dart)
A new EvalSet type in primitives.dart
A new DartSetLiteral class in literals.dart
???
Hi, are the points above still applicable? I'm planning to contribute and think that sets would be a good start.
Ah not really, this issue is quite old.
For Sets, you'd probably need to:
- edit collection/set_map.dart in the compiler,
- add a $Set wrapper class in
shared
similar to the $Map and $List wrappers, - add
PushSet
,SetSet
, andIndexSet
bytecode ops similar to the Map equivalents in the runtime, - and generate code to get/set values from the Set in IndexedReference.
To be frank this is slightly complicated for a first issue at this point since it touches all three parts of dart_eval (compiler, standard library, and runtime). It is doable but I might suggest #4 or #91 first. (Thanks for your interest in contributing btw!)
You're right, I thought that it'll be easier to do (somehow) ๐ Thanks for the explanation!
Hi, @ethanblake4 i can do the 2 and 3 points you said.
The 1st and 4th are just beyond me. If you could elaborate just on them ๐๐ it would be big help.