change vector assignment operator and remove unnecessary argument (expr)

This commit is contained in:
Bernhard Amann 2013-03-06 14:08:06 -08:00
parent a2556642e6
commit 8f259f866d
15 changed files with 63 additions and 69 deletions

View file

@ -968,18 +968,16 @@ public:
// Note: does NOT Ref() the element! Remember to do so unless
// the element was just created and thus has refcount 1.
//
bool Assign(unsigned int index, Val* element, const Expr* assigner,
Opcode op = OP_ASSIGN);
bool Assign(Val* index, Val* element, const Expr* assigner,
Opcode op = OP_ASSIGN)
bool Assign(unsigned int index, Val* element, Opcode op = OP_ASSIGN);
bool Assign(Val* index, Val* element, Opcode op = OP_ASSIGN)
{
return Assign(index->AsListVal()->Index(0)->CoerceToUnsigned(),
element, assigner, op);
element, op);
}
// Assigns the value to how_many locations starting at index.
bool AssignRepeat(unsigned int index, unsigned int how_many,
Val* element, const Expr* assigner);
Val* element);
// Returns nil if no element was at that value.
// Lookup does NOT grow the vector to this size.