Commit Graph

3 Commits

Author SHA1 Message Date
Rene Gollent
81c848a14a Debugger: Rework expression parsing API.
ExpressionInfo:
- No longer stores an explicit result type (this is inferred from
  evaluation of the expression itself now).
- Introduce class ExpressionResult for returning the result of an
  expression computation. This can currently take the form of either
  a primitive value, or a value node object.
- Adjust UserInterfaceListener and ExpressionInfo::Listener to take
  the above changes into account, and correspondingly adjust all
  callers/listeners.

CLanguageExpressionEvaluator:
- Introduce child class Operand. This subsumes the functionality that
  was previously in the separate Number class, and can represent a
  primitive value, a value node or  a type. Also has functionality to
  implicity handle type promotion/inferring when performing calculations
  between operands.
- Adjust expression parser to operate in terms of Operands rather than
  Numbers. This allows a number of improvements, most notably that an
  expression can now return a value node as a result rather than only
  a primitive number. This capability isn't yet fully used, but paves
  the way for future uses such as an expression that evaluates to a data
  member, a global variable, or an arbitrary pointer of a particular type.
- Various cleanups/simplifications that were possible as a result of the above
  changes.

ExpressionEvaluationWindow/ExpressionPromptWindow:
- Remove type menu field, since the expression API no longer uses it.

Adding/removing expressions in the VariablesView is temporarily disabled,
pending some further rework there to properly handle the new result object.
2014-11-22 17:06:48 -05:00
Rene Gollent
329dd0af0b Debugger: Extend ExpressionInfo.
- Add setters for the individual subcomponents.
- Add listener interface. This will supplant the one
  currently attached to Team.
2014-11-08 18:15:31 -05:00
Rene Gollent
ba4cfb2439 Debugger: Add model classes for expression representation.
- Add class ExpressionInfo to encapsulate the expression string and result type
  of a particular expression instance.

- Add class ExpressionValues to map expression result values correlating to a
  function, thread and expression for later use in highlighting changes.
2014-11-08 10:48:56 -05:00