@Throws(InternalTranslationException::class) private fun translateChildrenOfNode( environment: ITranslationEnvironment, expression: IOperandTreeNode, size: org.graalvm.compiler.asm.amd64.AMD64Assembler.OperandSize, loadOperand: Boolean, baseOffset: Long ): List<TranslationResult>? { var baseOffset: Long? = baseOffset val partialResults: MutableList<TranslationResult> = ArrayList() val children: List<IOperandTreeNode?> = expression.getChildren() Collections.sort(children, comparator) for (child in children) { val nextResult: TranslationResult = loadOperand( environment, baseOffset, child, if (isSegmentExpression(expression.getValue())) expression else null, size, loadOperand ) partialResults.add(nextResult) baseOffset += nextResult.getInstructions().size() } return partialResults }
Iterates over the children of a node in the operand tree and generates translations for them .