stevedlawrence commented on a change in pull request #30: Performance
improvements around FormatInfo change.
URL: https://github.com/apache/incubator-daffodil/pull/30#discussion_r163842935
##########
File path:
daffodil-runtime1/src/main/scala/edu/illinois/ncsa/daffodil/processors/Evaluatable.scala
##########
@@ -336,30 +292,40 @@ abstract class Evaluatable[+T <: AnyRef](protected val
rd: RuntimeData, qNameArg
}
}
- private var constValue_ : Option[AnyRef] = None
- protected def constValue = constValue_.asInstanceOf[Option[T]]
+ private var constValue_ : Maybe[AnyRef] = Nope
- def optConstant = {
- ensureCompiled
- constValue
- }
+ /**
+ * Preferred for use in the runtime.
+ */
+ @inline final def maybeConstant = constValue_.asInstanceOf[Maybe[T]]
Review comment:
Why the switch from Option to Maybe?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services