Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package org.dynjs.compiler;
 
public class JSCompiler {
    public JSCompiler(Config config) {
        
        this. = new ProgramCompiler();
        this. = new FunctionCompiler();
        
        InterpretingVisitorFactory interpFactory = new InterpretingVisitorFactoryconfig.isInvokeDynamicEnabled() );
        
        switch ( config.getCompileMode() ) {
        case :
            this. = new InterpretingBasicBlockCompilerinterpFactory );
            break;
        case :
            this. = new BytecodeBasicBlockCompiler(configfactory);
            break;
        case :
            this. = new JITBasicBlockCompiler(configinterpFactoryfactory);
            break;
        }
    }
    public JSProgram compileProgram(ExecutionContext contextProgramTree programboolean forceStrict) {
        return this..compile(contextprogramforceStrict);
    }
    public JSFunction compileFunction(ExecutionContext contextString identifierString[] formalParametersStatement bodyboolean containedInStrictCode) {
        return this..compile(contextidentifierformalParametersbodycontainedInStrictCode);
    }
    public BasicBlock compileBasicBlock(ExecutionContext contextString gristStatement bodyboolean strict) {
        return this..compile(contextgristbodystrict);
    }
New to GrepCode? Check out our FAQ X