Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 3 additions & 9 deletions gen/toir.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1578,15 +1578,9 @@ class ToElemVisitor : public Visitor {
// get dim
assert(e->arguments);
assert(e->arguments->length >= 1);
if (e->arguments->length == 1) {
DValue *sz = toElem((*e->arguments)[0]);
// allocate & init
result = DtoNewDynArray(e->loc, e->newtype, sz, true);
} else {
assert(e->lowering);
LLValue *pair = DtoRVal(e->lowering);
result = new DSliceValue(e->type, pair);
}
assert(e->lowering);
LLValue *pair = DtoRVal(e->lowering);
result = new DSliceValue(e->type, pair);
}
// new static array
else if (ntype->ty == TY::Tsarray) {
Expand Down
Loading