Rune - Interpreter refactor ex_Run 2/n
authorMatthew Dillon <dillon@apollo.backplane.com>
Thu, 14 Apr 2016 17:31:29 +0000 (10:31 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Thu, 14 Apr 2016 18:18:30 +0000 (11:18 -0700)
commit6e6fd05b50825d82248836fea68c99ba11bd900c
treec70a7525144d9feb58218fb6e434c2b50ab9926d
parentd9ef85355eee6330f1234e0941ad8fc1885773b0
Rune - Interpreter refactor ex_Run 2/n

* Implement exp->ex_Run64() - A shortcut function which returns integral
  rvalues up to 64-bits.  This causes most expressions to self-optimize
  significantly, to the point where the interpreter is able to omit a great
  deal of locking in the critical path as well in some cases to omit nearly
  all procedure calls other than the primary recursion when evaluating an
  integral expression.

  Cuts loop-1billion test from 20 seconds to 7 seconds on a 3.4 GHz Haswell
  box.  This is far better than the previous pointer-return optimization
  which could only get it down to ~14 seconds or so.  A native Rune compile
  runs the same loop in 0.28 seconds.  25:1 is not bad for an interpreter
  running a tight loop verses a compiled tight loop!

* Implement for nearly all internal integral operators.

* Implement for integral Declaration access, and implied void casts.

* Implement for integer-integer casts.
libgen/defs.h
libgen/run_cast.c
libgen/run_exp.c
libgen/run_oper.c
libgen/run_refstor.c
libgen/run_stmt.c
librune/exp.c
librune/exp.h
librune/export.h
librune/resolve.c