| Summary: | need a typeutils method to calculate the type based upon the expression | ||
|---|---|---|---|
| Product: | z_Archived | Reporter: | Jeff Douglas <jeffdouglas> |
| Component: | EDT | Assignee: | Project Inbox <edt.mofmodel-inbox> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | blocker | ||
| Priority: | P3 | CC: | greer, pharmon |
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | |||
|
Description
Jeff Douglas
After more talking with people, we believe the best approach is not to make a utility, but have the type of expressions/binary expressions precalculated and stored in the ir itself as the new type. This would make it so the generators would not need to change in any way. I am setting this to blocking, because this is really needed so we can complete the work of making non-parameterized Decimal type be a reference type. Right now, binary expressions whose operations have a return type of EDecimal are being treated as reference. This is causing unneccessary boxing expressions to be generated. I have added a utility named ArithmeticTypeAnalyzer. You can use the getType() method, and pass in a binary expression. If the binary expression is an arithmetic expression, whose operation returns a generic Decimal, it will attempt to use the characteristics of the 2 operands to determine the length and number of decimal places to use for the Decimal type. This method defaults to returning the type of the operation if it is unable to compute the type, or if the binary expression is not arithmetic. This high severity defect was fixed several weeks ago, so I am closing. |