JS: remove locking from the getSimTicks/getSimSeconds accessors

This is only called from running Process obects on their own EventManager, and as
such, _must_ already hold the lock (from executeEvents).  Remove the extra locking here.

Signed-off-by: Harvey Harrison <harvey.harrison@ausenco.com>
JS: add static threadlocal accessors for the current simulation time

This is only safe to call from a Process today, make that more
obvious with the static EventManager methods similar to EventManager.current()

This doesmake the event tracing interface rather ugly, but deal with that in a
future patchset.

Signed-off-by: Harvey Harrison <harvey.harrison@ausenco.com>
JS: fix the equality test for multiplicative units

Signed-off-by: Harvey Harrison <harvey.harrison@ausenco.com>
JS: Set 'this' object for ExpressionThreshold properly

Signed-off-by: Matt Chudleigh <matt.chudleigh@ausenco.com>
Signed-off-by: Harvey Harrison <harvey.harrison@ausenco.com>
JS: Stop dropping exceptions during expression evaluation

Signed-off-by: Matt Chudleigh <matt.chudleigh@ausenco.com>
Signed-off-by: Harvey Harrison <harvey.harrison@ausenco.com>
JS: Optimize expressions, avoid re-evaluating constants

Signed-off-by: Matt Chudleigh <matt.chudleigh@ausenco.com>
Signed-off-by: Harvey Harrison <harvey.harrison@ausenco.com>
JS: consistently use isOpen and remove the isClosed method

Signed-off-by: Harvey Harrison <harvey.harrison@ausenco.com>
JS: ensure the ExpressionThreshold is evaluated every time

Do not rely on the cached value for expressionthreshold, evaluate it each time is isOpen.

Signed-off-by: Harvey Harrison <harvey.harrison@ausenco.com>
JS: no point in a wrapper function for static EventManager method

Signed-off-by: Harvey Harrison <harvey.harrison@ausenco.com>
JS: use a try/catch approach instead of instanceof for getting the current Process

This is expected to be true always, doing an unconditional cast+return is ever so
margianlly faster in this case, where we don't care about how slow the failure case is.

Signed-off-by: Harvey Harrison <harvey.harrison@ausenco.com>
JS: add an API to schedule conditional events

This allows a purely event based approach to conditional events by providing a
direct ProcessTarget-based API.

Signed-off-by: Harvey Harrison <harvey.harrison@ausenco.com>
JS: Always intern expression variable names

Signed-off-by: Matt Chudleigh <matt.chudleigh@ausenco.com>
Signed-off-by: Harvey Harrison <harvey.harrison@ausenco.com>
JS: Optimize output handles

There are two optimizations:

-cache output annotation information, this was oddly slow at runtime
-expose faster calls for looking up outputs with known to be interned
strings

Signed-off-by: Matt Chudleigh <matt.chudleigh@ausenco.com>
Signed-off-by: Harvey Harrison <harvey.harrison@ausenco.com>
JS: Have expression evaluator use optimized output lookup

Signed-off-by: Matt Chudleigh <matt.chudleigh@ausenco.com>
Signed-off-by: Harvey Harrison <harvey.harrison@ausenco.com>
JS: Rename OutputPair helper class in OutputHandle

This class was always a container for all the static (per class)
information about an output, now it is named to match.

This patch is purely renaming.

Signed-off-by: Matt Chudleigh <matt.chudleigh@ausenco.com>
Signed-off-by: Harvey Harrison <harvey.harrison@ausenco.com>
JS: set the rateLimiter to be statically accessible from GUIFrame

This avoids the GUIFrame instance lock when looking up the ratelimiter object.

Signed-off-by: Harvey Harrison <harvey.harrison@ausenco.com>
JS: move testing the RateLimiter wake condition outside the timingLock

Use an AtomicLong to avoid taking the timeingLock.

Signed-off-by: Harvey Harrison <harvey.harrison@ausenco.com>
JS: update version to 2014-35

Signed-off-by: Harvey Harrison <harvey.harrison@ausenco.com>