https://codereview.chromium.org/103743004/diff/1/src/types.h
File src/types.h (right):
https://codereview.chromium.org/103743004/diff/1/src/types.h#newcode404
src/types.h:404: static Unioned* union_shrink(Unioned* unioned, int
size, Zone* zone) {
On 2013/12/19 13:44:41, titzer wrote:
So this one mutates, but the heap one creates a new one? Hmm...
Was able to remove that with the Shrink method.
https://codereview.chromium.org/103743004/diff/1/src/types.h#newcode407
src/types.h:407: for (; size < length; --length) unioned->RemoveLast();
On 2013/12/19 13:44:41, titzer wrote:
I think you can use Rewind() here.
Done.
https://codereview.chromium.org/103743004/diff/1/src/types.h#newcode412
src/types.h:412: ASSERT(!is_union(type));
On 2013/12/19 13:44:41, titzer wrote:
Asserting a union isn't a member of a union when getting...i suppose
that's ok,
but how could that happen otherwise? someone monkeying with the fixed
array
behind your back?
It's a representational invariant, checked here just to assert that the
Union algorithm can't mess things up.
https://codereview.chromium.org/103743004/diff/1/src/types.h#newcode481
src/types.h:481: i::Handle<Unioned> result = union_create(size,
isolate);
On 2013/12/19 13:44:41, titzer wrote:
You actually can chop a FixedArray with set_length() here.
It's a bit more complicated than that. I introduced a suitable Shrink
method on typed arrays.
https://codereview.chromium.org/103743004/
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.