Attribute "opt_layername" lets you arrange to optimize only one layer.
Improve debug info when dumping symbols
Fix subtle optimizer bug -- add_constant and replace_param_value type issues

Both of these methods took void*'s and assumed that the types of the
blind data had to match the known type where it was to be
copied. Unfortunately, there was a particular series of optimization
steps that could lead to these functions being applied to a "A=B"
instruction where A and B differed in type. In the case I was chasing
down, it was a float=int problem, and the int value was just being
memcpy'd rather than properly converted to a float. So I overhauled both
of these methods to handle the float=int, triple=float, and triple=int
cases, as well as more robustly catching any other cases that it fails
to handle.
Merge pull request #185 from lgritz/lg-optbug

Fix subtle runtime optimization bug
Bug fix in instance merging -- be careful of empty shader groups.
isconnected(var) queries whether var is an upstream-connected parameter.

This was a request from our Shading department, who wanted the ability
to write shader nodes that had logic that differed based on whether the
node was connected to upstream components or not.
Rebuild PDF docs
Allow whole-array assignment:  array1 = array2
Fix: Mistakenly compared to "xyz" for "XYZ" color space.
Minor refactor: split huge runtimeoptimize.cpp -> constfold.cpp
Subtle bug fix in how we "skip" inserted opcodes: we still need to clear
block aliases for args written by the ops we skip, or our notion of
which values are in which variables will be wrong.  This was not
reported as a bug, I just happened to notice it as I was working on
something else.
Constant folding of getattribute()

If both the attribute and object names are constants (and the object
name is non-empty). This is especially handy for shaders that use
getattribute() to query global renderer options.  If this behavior is
not desired (e.g., in a renderer where users are free to alter global
options without wanting to invalidate an optimized shader), just set the
ShadingSystem attribute "opt_fold_getattribute" to 0 (it defaults to 1).

Successes are folded -- they are expected to return the identical
results at shade time.  But failures during the speculative
optimization-time getattribute call are not folded, since it's possible
that they won't be failures at shade time.  We allow renderers to be
very flexible with what kind of information can be queried with
getattribute and how the renderer finds that data, and currently the
RendererServices API doesn't have a way to distinguish between "the
query will definitely fail" versus "I don't know yet whether it can
succeed at runtime."  This is something we can revisit in the future if
we find the need to fold getattribute even more aggressively.  But at
this point, the queries we desperately wanted to be folding were ones
that are guaranteed to succeed (mostly asking for global renderer
options).
Fix getattribute constant folding logic: check for empty string only AFTER
we make sure it's a constant (or else the data field won't be non-NULL).
Allow convert_value to handle uint8->int conversions, previously ignored.
This allows our renderer to properly convert native 'bool' values
retrieved by getattribute() into OSL int variables.
Fix for slow compile and optimize times in the derivative tracking code, the
code was O(n^2) time and memory here, giving gigabytes of memory usages on a
particular 2000 line shader.

The only thing that really needs to be tracked is the dependencies of the
special derivative symbols, all the other dependencies are only for debugging
code. So we take advantage of that and don't keep all dependenices of each
symbol in their own list, but rather recursively traverse the dependency map.
Fix windows build after point cloud changes.
Simplify the logic of SS::convert_value
Merge pull request #193 from lgritz/lg-getattrib

Allow convert_value to handle uint8->int conversions, previously ignored.
Merge remote-tracking branch 'upstream/master' into blender-fixes
Windows port: fix crash with visual studio, taking the address of the
first element of an empty vector will crash due to security checks.