Add Iterator.deterministic method
Add Iterator.deterministic method

By default, this will return True, but it should return False for
iterators that produce values in a non-determnistic way, such as
iterators that operate on hashes.

Why do we need this?  While working on the full implementation of
multidim slices on hashes (including all the possible adverb
combinations), it became clear to me that the use of * as a slice
used as a left-value, will have non-deterministic results.  In a
simpler context:

    my %h = a => 42, b => 666, c => 314;
    %h{%h.keys} = 777,888,999;
    dd %h; # Hash %h = {:a(777), :b(999), :c(888)}
    %h{%h.keys} = 777,888,999;
    dd %h; # Hash %h = {:a(999), :b(777), :c(888)}

Having a "deterministic" attribute on the iterator, would allow us
to either emit a warning on such an assignment, or disallow such an
assignment altogether.

Adding this method to the base Iterator role increases the size of
the CORE.c.setting.moarvm file from 25417728 to 25453112 bytes, aka
in increase of 0.14 %.

This commit *only* adds the method to the Iterator role: setting
explicit False values for affected iterator classes is a separate
job that only makes sense to do if this PR is merged.

tbrowder/rakudo,rakudo/rakudo,salortiz/rakudo,salortiz/rakudo,tbrowder/rakudo,tony-o/rakudo,MasterDuke17/rakudo,salortiz/rakudo,tbrowder/rakudo,MasterDuke17/rakudo,tony-o/rakudo,rakudo/rakudo,salortiz/rakudo,rakudo/rakudo,rakudo/rakudo,labster/rakudo,tony-o/rakudo,tbrowder/rakudo,labster/rakudo,rakudo/rakudo,labster/rakudo,labster/rakudo,tony-o/rakudo,MasterDuke17/rakudo,tbrowder/rakudo,MasterDuke17/rakudo,labster/rakudo,tony-o/rakudo,MasterDuke17/rakudo,rakudo/rakudo,salortiz/rakudo,tony-o/rakudo,labster/rakudo,salortiz/rakudo,tbrowder/rakudo,MasterDuke17/rakudo