Class LambdaCompiler


  • final class LambdaCompiler
    extends java.lang.Object
    • Method Detail

      • canEmitBoundConstants

        boolean canEmitBoundConstants()
      • emitDebugSymbols

        boolean emitDebugSymbols()
      • emitClosureArgument

        void emitClosureArgument()
      • emitLambdaArgument

        void emitLambdaArgument​(int index)
      • createStaticField

        private FieldBuilder createStaticField​(java.lang.String name,
                                               Type type)
      • initializeMethod

        void initializeMethod()
      • notEmpty

        private static boolean notEmpty​(Expression node)
      • significant

        private static boolean significant​(Expression node)
      • createDelegate

        private <T> Delegate<T> createDelegate​(java.lang.Class<T> generatedClass)
      • getLambdaArgument

        int getLambdaArgument​(int index)
      • updateEmitAsTailCallFlag

        private static int updateEmitAsTailCallFlag​(int flags,
                                                    int newValue)
      • updateEmitExpressionStartFlag

        private static int updateEmitExpressionStartFlag​(int flags,
                                                         int newValue)
      • updateEmitAsTypeFlag

        private static int updateEmitAsTypeFlag​(int flags,
                                                int newValue)
      • emitExpression

        void emitExpression​(Expression node)
      • emitExpressionStart

        private int emitExpressionStart​(Expression node)
      • emitExpressionEnd

        private void emitExpressionEnd​(int flags)
      • emitExpression

        private void emitExpression​(Expression node,
                                    int flags)
      • emitExtensionExpression

        private void emitExtensionExpression​(Expression node)
      • emitExpressionAsVoid

        private void emitExpressionAsVoid​(Expression node)
      • emitExpressionAsVoid

        private void emitExpressionAsVoid​(Expression node,
                                          int flags)
      • emitExpressionAsType

        private void emitExpressionAsType​(Expression node,
                                          Type type,
                                          int flags)
      • emitAssignBinaryExpression

        private void emitAssignBinaryExpression​(Expression expr)
      • emitMemberAssignment

        private void emitMemberAssignment​(BinaryExpression node,
                                          int flags)
      • emitVariableAssignment

        private void emitVariableAssignment​(BinaryExpression node,
                                            int flags)
      • emitIndexAssignment

        private void emitIndexAssignment​(BinaryExpression node,
                                         int flags)
      • hasVariables

        private static boolean hasVariables​(java.lang.Object node)
      • enterTry

        private void enterTry​(TryExpression tryExpression)
      • exitTry

        private void exitTry​(TryExpression tryExpression)
      • enterScope

        private void enterScope​(java.lang.Object node)
      • exitScope

        private void exitScope​(java.lang.Object node)
      • emitBlockExpression

        private void emitBlockExpression​(Expression expr,
                                         int flags)
      • emitAndAlsoBinaryExpression

        private void emitAndAlsoBinaryExpression​(Expression expr,
                                                 int flags)
      • emitPrimitiveAndAlso

        private void emitPrimitiveAndAlso​(BinaryExpression b)
      • emitUnboxingAndAlso

        private void emitUnboxingAndAlso​(BinaryExpression b)
      • emitOrElseBinaryExpression

        private void emitOrElseBinaryExpression​(Expression expr,
                                                int flags)
      • emitPrimitiveOrElse

        private void emitPrimitiveOrElse​(BinaryExpression b)
      • emitCoalesceBinaryExpression

        private void emitCoalesceBinaryExpression​(Expression expr)
      • emitReferenceCoalesceWithoutConversion

        private void emitReferenceCoalesceWithoutConversion​(BinaryExpression b)
      • emitLambdaReferenceCoalesce

        private void emitLambdaReferenceCoalesce​(BinaryExpression b)
      • emitConditionalExpression

        private void emitConditionalExpression​(Expression expr,
                                               int flags)
      • emitBinaryExpression

        private void emitBinaryExpression​(Expression expr)
      • emitBinaryExpression

        private void emitBinaryExpression​(Expression expr,
                                          int flags)
      • emitBinaryMethod

        private void emitBinaryMethod​(BinaryExpression b,
                                      int flags)
      • emitBinaryOperator

        private void emitBinaryOperator​(ExpressionType op,
                                        Type<?> leftType,
                                        Type<?> rightType,
                                        Type resultType)
      • emitConvertArithmeticResult

        private void emitConvertArithmeticResult​(ExpressionType op,
                                                 Type sourceType,
                                                 Type resultType)
      • emitUnboxingBinaryOp

        private void emitUnboxingBinaryOp​(ExpressionType op,
                                          Type leftType,
                                          Type rightType,
                                          Type resultType)
      • emitUnboxingBinaryArithmetic

        private void emitUnboxingBinaryArithmetic​(ExpressionType op,
                                                  Type leftType,
                                                  Type rightType,
                                                  Type resultType)
      • emitLiftedRelational

        private void emitLiftedRelational​(ExpressionType op,
                                          Type leftType,
                                          Type rightType,
                                          Type resultType)
      • unboxRightBinaryOperand

        private Type unboxRightBinaryOperand​(Type rightType)
      • unboxLeftBinaryOperand

        private Type unboxLeftBinaryOperand​(Type leftType,
                                            Type rightType)
      • emitLiftedBooleanAnd

        private void emitLiftedBooleanAnd​(Type leftType,
                                          Type rightType)
      • emitLiftedBooleanOr

        private void emitLiftedBooleanOr​(Type leftType,
                                         Type rightType)
      • emitObjectBinaryOp

        private void emitObjectBinaryOp​(ExpressionType op)
      • emitArithmeticBinaryOp

        private void emitArithmeticBinaryOp​(ExpressionType op,
                                            Type<?> operandType)
      • emitConstantExpression

        private void emitConstantExpression​(Expression expr)
      • emitConstant

        private void emitConstant​(java.lang.Object value,
                                  Type<?> type)
      • emitDefaultValueExpression

        private void emitDefaultValueExpression​(Expression node)
      • emitGotoExpression

        private void emitGotoExpression​(Expression expr,
                                        int flags)
      • emitUnreachable

        private void emitUnreachable​(Expression node,
                                     int flags)
      • emitExpressionAndBranch

        private void emitExpressionAndBranch​(boolean branchValue,
                                             Expression node,
                                             Label label)
      • emitBranchNot

        private void emitBranchNot​(boolean branch,
                                   UnaryExpression node,
                                   Label label)
      • emitBranchNullCheck

        private void emitBranchNullCheck​(boolean branch,
                                         UnaryExpression node,
                                         Label label)
      • emitBranchRelation

        private void emitBranchRelation​(boolean branch,
                                        BinaryExpression node,
                                        Label label)
      • emitRelationalBranchOp

        private void emitRelationalBranchOp​(ExpressionType op,
                                            Type<?> operandType,
                                            boolean branch,
                                            Label label)
      • emitBranchOp

        private void emitBranchOp​(boolean branch,
                                  Label label)
      • emitBranchLogical

        private void emitBranchLogical​(boolean branch,
                                       BinaryExpression node,
                                       Label label)
      • emitBranchBlock

        private void emitBranchBlock​(boolean branch,
                                     BlockExpression node,
                                     Label label)
      • emitInvocationExpression

        private void emitInvocationExpression​(Expression expr,
                                              int flags)
      • emitLabelExpression

        private void emitLabelExpression​(Expression expr,
                                         int flags)
      • pushLabelBlock

        private void pushLabelBlock​(LabelScopeKind type)
      • tryPushLabelBlock

        private boolean tryPushLabelBlock​(Expression node)
      • defineBlockLabels

        private void defineBlockLabels​(Expression node)
      • emitLambdaExpression

        private void emitLambdaExpression​(Expression expr)
      • emitDelegateConstruction

        private void emitDelegateConstruction​(LambdaExpression lambda)
      • getUniqueMethodName

        static java.lang.String getUniqueMethodName()
      • getUniqueLambdaName

        static java.lang.String getUniqueLambdaName​(java.lang.String name,
                                                    java.lang.Class<?> creationContext)
      • emitLambdaBody

        private void emitLambdaBody()
      • emitLambdaBody

        private void emitLambdaBody​(CompilerScope parent,
                                    boolean inlined,
                                    int flags)
      • emitDelegateConstruction

        private void emitDelegateConstruction​(LambdaCompiler inner)
      • emitClosureCreation

        private void emitClosureCreation​(LambdaCompiler inner)
      • ensureConstructor

        private void ensureConstructor()
      • ensureClosure

        private void ensureClosure()
      • emitConstantArray

        final void emitConstantArray​(java.lang.Object array)
      • emitLoopExpression

        private void emitLoopExpression​(Expression expr)
      • emitMemberExpression

        private void emitMemberExpression​(Expression expr)
      • emitMemberGet

        private void emitMemberGet​(MemberInfo member)
      • emitMethodCallExpression

        private void emitMethodCallExpression​(Expression expr)
      • emitMethodCallExpression

        private void emitMethodCallExpression​(Expression expr,
                                              int flags)
      • emitNewExpression

        private void emitNewExpression​(Expression expr)
      • emitNewArrayExpression

        private void emitNewArrayExpression​(Expression expr)
      • emitParameterExpression

        private void emitParameterExpression​(Expression expr)
      • emitRuntimeVariablesExpression

        private void emitRuntimeVariablesExpression​(Expression expr)
      • emitTypeBinaryExpression

        private void emitTypeBinaryExpression​(Expression expr)
      • emitUnaryExpression

        private void emitUnaryExpression​(Expression expr,
                                         int flags)
      • emitUnaryOperator

        private void emitUnaryOperator​(ExpressionType op,
                                       Type operandType,
                                       Type resultType)
      • emitUnaryMethod

        private void emitUnaryMethod​(UnaryExpression node,
                                     int flags)
      • emitConvertUnaryExpression

        private void emitConvertUnaryExpression​(Expression expr,
                                                int flags)
      • emitConvert

        private void emitConvert​(UnaryExpression node,
                                 int flags)
      • emitUnboxUnaryExpression

        private void emitUnboxUnaryExpression​(Expression expr)
      • emitThrowUnaryExpression

        private void emitThrowUnaryExpression​(Expression expr)
      • emitTryExpression

        private void emitTryExpression​(Expression expr)
      • emitCatchStart

        private void emitCatchStart​(CatchBlock cb)
      • checkTry

        private void checkTry()
      • emitSaveExceptionOrPop

        private void emitSaveExceptionOrPop​(CatchBlock cb)
      • emitSwitchExpression

        private void emitSwitchExpression​(Expression expr,
                                          int flags)
      • tryEmitStringSwitch

        private boolean tryEmitStringSwitch​(SwitchExpression node,
                                            int flags)
      • tryEmitLookupSwitch

        private boolean tryEmitLookupSwitch​(SwitchExpression node,
                                            int flags)
      • canOptimizeSwitchType

        private static boolean canOptimizeSwitchType​(Type<?> valueType)