Merge remote-tracking branch 'origin/topic/jsiwek/val_mgr'

* origin/topic/jsiwek/val_mgr:
  Pre-allocate and re-use Vals for bool, int, count, enum and empty string
  Preallocate booleans and small counts

I added a tiny change to CompHash to make sure that nothing messes this
up in the future.
This commit is contained in:
Johanna Amann 2019-01-18 15:17:34 -08:00
commit d4f7dae768
136 changed files with 1924 additions and 1776 deletions

View file

@ -1479,7 +1479,7 @@ Val* ForStmt::DoExec(Frame* f, Val* v, stmt_flow_type& flow) const
// Set the loop variable to the current index, and make
// another pass over the loop body.
f->SetElement((*loop_vars)[0]->Offset(),
new Val(i, TYPE_COUNT));
val_mgr->GetCount(i));
flow = FLOW_NEXT;
ret = body->Exec(f, flow);