Github user mbeckerle commented on a diff in the pull request:

    https://github.com/apache/incubator-daffodil/pull/12#discussion_r154237898
  
    --- Diff: 
daffodil-core/src/main/scala/edu/illinois/ncsa/daffodil/grammar/ByteOrderMixin.scala
 ---
    @@ -49,39 +47,39 @@ trait ByteOrderAnalysisMixin extends GrammarMixin { 
self: Term =>
         }
       }
     
    -  protected lazy val isKnownSameByteOrder: Boolean = {
    -    val optPrior = nearestPriorPhysicalTermSatisfying(term =>
    -      term.isInstanceOf[ElementBase] &&
    -        term.thereIsAByteOrderDefined).asInstanceOf[Option[ElementBase]]
    -    val optThis = this match { case e: ElementBase => Some(e); case _ => 
None }
    -    val optPriorByteOrder = optPrior.flatMap { _.byteOrderEv.optConstant }
    -    val optThisByteOrder = optThis.flatMap { _.byteOrderEv.optConstant }
    -    val res =
    -      if (optThisByteOrder.isDefined &&
    -        optPriorByteOrder.isDefined)
    -        optThisByteOrder =:= optPriorByteOrder
    -      else
    -        false
    -    res
    -  }
    -
    -  protected lazy val hasUniformByteOrderThroughout: Boolean = 
termChildren.map { t =>
    -    t.thereIsAByteOrderDefined && t.isKnownSameByteOrder && 
t.hasUniformByteOrderThroughout
    -  }.forall(x => x)
    +  //  protected lazy val isKnownSameByteOrder: Boolean = {
    +  //    val optPrior = nearestPriorPhysicalTermSatisfying(term =>
    +  //      term.isInstanceOf[ElementBase] &&
    +  //        
term.thereIsAByteOrderDefined).asInstanceOf[Option[ElementBase]]
    +  //    val optThis = this match { case e: ElementBase => Some(e); case _ 
=> None }
    +  //    val optPriorByteOrder = optPrior.flatMap { 
_.byteOrderEv.optConstant }
    +  //    val optThisByteOrder = optThis.flatMap { _.byteOrderEv.optConstant 
}
    +  //    val res =
    +  //      if (optThisByteOrder.isDefined &&
    +  //        optPriorByteOrder.isDefined)
    +  //        optThisByteOrder =:= optPriorByteOrder
    +  //      else
    +  //        false
    +  //    res
    +  //  }
    +  //
    +  //  protected lazy val hasUniformByteOrderThroughout: Boolean = 
termChildren.map { t =>
    +  //    t.thereIsAByteOrderDefined && t.isKnownSameByteOrder && 
t.hasUniformByteOrderThroughout
    +  //  }.forall(x => x)
     
     }
     
    -trait ByteOrderMixin extends ByteOrderAnalysisMixin { self: ElementBase =>
    -
    -  protected final lazy val byteOrderChange =
    -    prod("byteOrderChange",
    -      enclosingTerm.isEmpty || (
    -        (thereIsAByteOrderDefined &&
    -          !isKnownSameByteOrder) || // need to change on the way in
    -          (isArray && !hasUniformByteOrderThroughout))) { // need to 
change because of repetition
    -          // (when we start next iteration, it's not the same as when we 
started first iteration)
    -          // THis will SDE if there is no byte order defined for the array 
element (might only be byteOrder on things within the array)
    -          // So we're artificially requiring byte order on all arrays that 
do not have a uniform byte order.
    -          ByteOrderChange(this)
    -        }
    -}
    +//trait ByteOrderMixin extends ByteOrderAnalysisMixin { self: ElementBase 
=>
    +//
    --- End diff --
    
    Delete commented code


---

Reply via email to