Package com.strobel.reflection

Examples of com.strobel.reflection.MemberInfo


    }

    private void emitMemberAssignment(final BinaryExpression node, final int flags) {
        final MemberExpression lValue = (MemberExpression) node.getLeft();
        final Expression rValue = node.getRight();
        final MemberInfo member = lValue.getMember();

        // emit "this", if any
        if (lValue.getTarget() != null) {
            emitExpression(lValue.getTarget());
        }

        // emit value
        emitExpression(rValue);

        if (!TypeUtils.hasReferenceConversion(rValue.getType(), lValue.getType())) {
            generator.emitConversion(rValue.getType(), lValue.getType());
        }

        LocalBuilder temp = null;

        final int emitAs = flags & CompilationFlags.EmitAsTypeMask;

        if (emitAs != CompilationFlags.EmitAsVoidType) {
            // Save the value so we can return it.
            generator.dup();
            generator.emitStore(temp = getLocal(node.getType()));
        }

        switch (member.getMemberType()) {
            case Field:
                generator.putField((FieldInfo) member);
                break;

            default:
                throw Error.invalidMemberType(member.getMemberType());
        }

        if (emitAs != CompilationFlags.EmitAsVoidType) {
            generator.emitLoad(temp);
            freeLocal(temp);
View Full Code Here

TOP

Related Classes of com.strobel.reflection.MemberInfo

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.