You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@daffodil.apache.org by GitBox <gi...@apache.org> on 2018/01/02 14:13:53 UTC

[GitHub] stevedlawrence commented on a change in pull request #12: Revised daffodil-io module to require passing in a FormatInfo object.

stevedlawrence commented on a change in pull request #12: Revised daffodil-io module to require passing in a FormatInfo object.
URL: https://github.com/apache/incubator-daffodil/pull/12#discussion_r159221065
 
 

 ##########
 File path: daffodil-core/src/main/scala/edu/illinois/ncsa/daffodil/grammar/BitOrderMixin.scala
 ##########
 @@ -87,29 +88,36 @@ trait BitOrderMixin extends GrammarMixin with ByteOrderAnalysisMixin { self: Ter
         (isArray && !hasUniformBitOrderThroughout)))
   }
 
-  //
-  //  protected final lazy val bitOrderChange = prod("bitOrderChange", needsBitOrderChange) {
-  //    BitOrderChange(this)
-  //  }
-
-  private lazy val checkByteAndBitOrder = {
-    val ev = new CheckByteAndBitOrderEv(termRuntimeData, defaultBitOrder)
-    ev.compile()
-    ev
+  lazy val maybeCheckByteAndBitOrderEv = {
+    //
+    // TODO: Performance: could be improved, as there are situations where byteOrder
+    // is defined, but still we know it will not be used and this could
+    // be Nope in those cases also. An example would be a 100% text-only item.
+    //
+    if (!isRepresented || !optionByteOrderRaw.isDefined)
 
 Review comment:
   Why is this Nope if byteOrderRaw isn't defined? Wouldn't that be an SDE if dfdl:byteOrder wasn't defined?

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services