Package com.strobel.assembler.ir.attributes

Examples of com.strobel.assembler.ir.attributes.CodeAttribute


    private boolean tryLoadBody() {
        if (Flags.testAny(_flags, Flags.LOAD_BODY_FAILED)) {
            return false;
        }

        final CodeAttribute codeAttribute = SourceAttribute.find(AttributeNames.Code, _sourceAttributes);

        if (codeAttribute == null) {
            return false;
        }

        Buffer code = codeAttribute.getCode();
        ConstantPool constantPool = _declaringType.getConstantPool();

        if (code == null) {
            final ITypeLoader typeLoader = _declaringType.getTypeLoader();

            if (typeLoader == null) {
                _flags |= Flags.LOAD_BODY_FAILED;
                return true;
            }

            code = new Buffer();

            if (!typeLoader.tryLoadType(_declaringType.getInternalName(), code)) {
                _flags |= Flags.LOAD_BODY_FAILED;
                return true;
            }

            final List<ExceptionTableEntry> exceptionTableEntries = codeAttribute.getExceptionTableEntries();
            final List<SourceAttribute> codeAttributes = codeAttribute.getAttributes();

            final CodeAttribute newCode = new CodeAttribute(
                codeAttribute.getLength(),
                codeAttribute.getMaxStack(),
                codeAttribute.getMaxLocals(),
                codeAttribute.getCodeOffset(),
                codeAttribute.getCodeSize(),
View Full Code Here


    private MethodBody tryLoadBody() {
        if (Flags.testAny(_flags, Flags.LOAD_BODY_FAILED)) {
            return null;
        }

        final CodeAttribute codeAttribute = SourceAttribute.find(AttributeNames.Code, _sourceAttributes);

        if (codeAttribute == null) {
            return null;
        }

        final int codeAttributeIndex = _sourceAttributes.indexOf(codeAttribute);

        Buffer code = codeAttribute.getCode();
        ConstantPool constantPool = _declaringType.getConstantPool();

        if (code == null) {
            final ITypeLoader typeLoader = _declaringType.getTypeLoader();

            if (typeLoader == null) {
                _flags |= Flags.LOAD_BODY_FAILED;
                return null;
            }

            code = new Buffer();

            if (!typeLoader.tryLoadType(_declaringType.getInternalName(), code)) {
                _flags |= Flags.LOAD_BODY_FAILED;
                return null;
            }

            final List<ExceptionTableEntry> exceptionTableEntries = codeAttribute.getExceptionTableEntries();
            final List<SourceAttribute> codeAttributes = codeAttribute.getAttributes();

            final CodeAttribute newCode = new CodeAttribute(
                codeAttribute.getLength(),
                codeAttribute.getMaxStack(),
                codeAttribute.getMaxLocals(),
                codeAttribute.getCodeOffset(),
                codeAttribute.getCodeSize(),
View Full Code Here

TOP

Related Classes of com.strobel.assembler.ir.attributes.CodeAttribute

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.