public void emit1(CommonTree opAST, short opcode, int arg) { emit(opAST, opcode); ensureCapacity(Bytecode.OPND_SIZE_IN_BYTES); writeShort(impl.instrs, ip, (short)arg); ip += Bytecode.OPND_SIZE_IN_BYTES; }
/** Compile a template. */ public CompiledST compile(String srcName, String name, List<FormalArgument> args, String template, Token templateToken) // for error location { //System.out.println("STGroup.compile: "+enclosingTemplateName); Compiler c = new Compiler(this); return c.compile(srcName, name, args, template, templateToken); }
public CompiledST compile(String template) { CompiledST code = compile(null, null, null, template, null); code.hasFormalArgs = false; return code; }
public void defineFormalArgs(List<FormalArgument> args) { hasFormalArgs = true; // even if no args; it's formally defined if ( args == null ) formalArguments = null; else for (FormalArgument a : args) addArg(a); }
public void emit2(CommonTree opAST, short opcode, int arg, int arg2) { emit(opAST, opcode); ensureCapacity(Bytecode.OPND_SIZE_IN_BYTES * 2); writeShort(impl.instrs, ip, (short)arg); ip += Bytecode.OPND_SIZE_IN_BYTES; writeShort(impl.instrs, ip, (short)arg2); ip += Bytecode.OPND_SIZE_IN_BYTES; }
/** Compile a template */ public CompiledST compile(String srcName, String name, List<FormalArgument> args, String template, Token templateToken) // for error location { //System.out.println("STGroup.compile: "+enclosingTemplateName); Compiler c = new Compiler(this); return c.compile(srcName, name, args, template, templateToken); }
/** Compile full template with unknown formal arguments. */ public CompiledST compile(String name, String template) { CompiledST code = compile(null, name, null, template, null); code.hasFormalArgs = false; return code; }
public void defineFormalArgs(List<FormalArgument> args) { hasFormalArgs = true; // even if no args; it's formally defined if ( args == null ) formalArguments = null; else for (FormalArgument a : args) addArg(a); }
public void emit1(CommonTree opAST, short opcode, int arg) { emit(opAST, opcode); ensureCapacity(Bytecode.OPND_SIZE_IN_BYTES); writeShort(impl.instrs, ip, (short)arg); ip += Bytecode.OPND_SIZE_IN_BYTES; }
/** Compile a template. */ public CompiledST compile(String srcName, String name, List<FormalArgument> args, String template, Token templateToken) // for error location { //System.out.println("STGroup.compile: "+enclosingTemplateName); Compiler c = new Compiler(this); return c.compile(srcName, name, args, template, templateToken); }
/** Compile full template with unknown formal args. */ public CompiledST compile(String name, String template) { CompiledST code = compile(null, name, null, template, null); code.hasFormalArgs = false; return code; }
public void defineFormalArgs(List<FormalArgument> args) { hasFormalArgs = true; // even if no args; it's formally defined if ( args == null ) formalArguments = null; else for (FormalArgument a : args) addArg(a); }
public void emit1(CommonTree opAST, short opcode, int arg) { emit(opAST, opcode); ensureCapacity(Bytecode.OPND_SIZE_IN_BYTES); writeShort(impl.instrs, ip, (short)arg); ip += Bytecode.OPND_SIZE_IN_BYTES; }
public CompiledST compile(String template) { CompiledST code = compile(null, null, null, template, null); code.hasFormalArgs = false; return code; }
public void defineFormalArgs(List<FormalArgument> args) { hasFormalArgs = true; // even if no args; it's formally defined if ( args == null ) formalArguments = null; else for (FormalArgument a : args) addArg(a); }
public void emit1(CommonTree opAST, short opcode, int arg) { emit(opAST, opcode); ensureCapacity(Bytecode.OPND_SIZE_IN_BYTES); writeShort(impl.instrs, ip, (short)arg); ip += Bytecode.OPND_SIZE_IN_BYTES; }
/** Compile full template with unknown formal arguments. */ public CompiledST compile(String name, String template) { CompiledST code = compile(null, name, null, template, null); code.hasFormalArgs = false; return code; }
public void emit2(CommonTree opAST, short opcode, int arg, int arg2) { emit(opAST, opcode); ensureCapacity(Bytecode.OPND_SIZE_IN_BYTES * 2); writeShort(impl.instrs, ip, (short)arg); ip += Bytecode.OPND_SIZE_IN_BYTES; writeShort(impl.instrs, ip, (short)arg2); ip += Bytecode.OPND_SIZE_IN_BYTES; }
public CompiledST compile(String template) { CompiledST code = compile(null, null, null, template, null); code.hasFormalArgs = false; return code; }
/** Compile full template with unknown formal arguments. */ public CompiledST compile(String name, String template) { CompiledST code = compile(null, name, null, template, null); code.hasFormalArgs = false; return code; }