You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@daffodil.apache.org by GitBox <gi...@apache.org> on 2021/05/04 10:20:19 UTC
[GitHub] [daffodil] Samarth08 commented on a change in pull request #550: Daffodil-2473 [WIP]
Samarth08 commented on a change in pull request #550:
URL: https://github.com/apache/daffodil/pull/550#discussion_r625668135
##########
File path: daffodil-runtime1/src/main/scala/org/apache/daffodil/dpath/FNFunctions.scala
##########
@@ -803,6 +803,54 @@ case class FNFloor(recipe: CompiledDPath, argType: NodeInfo.Kind) extends FNOneA
}
}
+case class DFDLXLeftShift(recipes: List[CompiledDPath],argType: NodeInfo.Kind) extends FNTwoArgs(recipes) {
+ override def computeValue(arg1: DataValuePrimitive, arg2: DataValuePrimitive, dstate: DState) = {
+ val shift = asInt(arg2.getAnyRef).intValue
+ argType match {
+ case NodeInfo.Long => {
+ val leftShift = asLong(arg1).longValue()
+ if (leftShift.toString.length < shift) {
Review comment:
I have changed it to if shift>=64 then ans is 0.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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