Package org.apache.flex.compiler.internal.semantics

Examples of org.apache.flex.compiler.internal.semantics.MethodBodySemanticChecker


        this.syntheticNamePrefix = syntheticNamePrefix;
        this.inInvisibleCompilationUnit = inInvisibleCompilationUnit;
        this.encodedDebugFiles = encodedDebugFiles;
        this.initInstructions = new InstructionList();

        super.methodBodySemanticChecker = new MethodBodySemanticChecker(this);

        if ( emitter != USE_DEFAULT_EMITTER )
            this.emitter = emitter;
        else
            this.emitter = new ABCEmitter(new AETDiagnosticsVisitor());
View Full Code Here


        // to the LexicalScope for this class.
        Collection<ICompilerProblem> problems = constantValue != null ? constantValue.getProblems() : null;
        if (problems != null)
            classScope.addProblems(problems);
       
        final MethodBodySemanticChecker checker = new MethodBodySemanticChecker(this.classScope);
       
        DefinitionBase varType = (DefinitionBase)varDef.resolveType(project);
       
        Object transformed_initializer = null;
       
        if ((initializer != null) && (varType != null))
        {
            transformed_initializer =
                checker.checkInitialValue(var, new Binding(null, varType.getMName(this.classScope.getProject()), varType), new PooledValue(initializer)).getValue();
        }
        else
        {
            transformed_initializer = initializer;
        }
       
        ITraitVisitor tv = declareVariable(var, varDef, is_static, is_const, transformed_initializer);
        if ( is_static )
            this.classStaticScope.processMetadata(tv, getAllMetaTags(varDef));
        else
            this.classScope.processMetadata(tv, getAllMetaTags(varDef));
        tv.visitEnd();
       
        //  Generate variable initializers and append them to the
        //  proper initialization list.
        if ( transformed_initializer == null && var.getAssignedValueNode() != null )
        {
            // Emit initialization instructions for non-static vars.  Static var
            // instructions will be emitted during finishClassDefinition()
            if (is_static)
                staticVariableInitializers.add(var);
            else
                generateInstructions(var, false);
        }
        else
        {
            checker.checkClassField(var, is_static);
            //  Massive kludge -- grovel over chained variable decls and add them one by one
            for ( int i = 0; i < var.getChildCount(); i++ )
            {
                IASNode candidate = var.getChild(i);
View Full Code Here

        assert (this.methodInfo == null) : "trying to set an already set methodInfo";
        this.methodInfo = methodInfo;

        //  Setting a MethodInfo means we're generating a method body,
        //  so we need a fresh MethodBodySemanticChecker.
        this.methodBodySemanticChecker = new MethodBodySemanticChecker(this);
    }
View Full Code Here

        this.containingScope = containingScope;
        this.inlinedFunctionCallSiteLabel = new Label();
        // set the problems and methodBodySemanticChecker, so we don't create
        // any problems when trying to inline a function
        this.problems = new ArrayList<ICompilerProblem>();
        this.methodBodySemanticChecker = new MethodBodySemanticChecker(this);

        // these members should be initialized from the containing scope, as they'll be merged back
        // if the inline is successful
        this.containingClassBinding = storeClassBinding ? allocateTemp() : null;
View Full Code Here

TOP

Related Classes of org.apache.flex.compiler.internal.semantics.MethodBodySemanticChecker

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.