clojure.lang
Class Compiler

java.lang.Object
  extended by clojure.lang.Compiler
All Implemented Interfaces:
Opcodes

public class Compiler
extends Object
implements Opcodes


Nested Class Summary
static class Compiler.AssignExpr
           
static class Compiler.BindingInit
           
static class Compiler.BodyExpr
           
static class Compiler.C
           
static class Compiler.CaseExpr
           
static class Compiler.CompilerException
           
static class Compiler.EmptyExpr
           
static class Compiler.FnExpr
           
static class Compiler.FnMethod
           
static class Compiler.HostExpr
           
static class Compiler.IfExpr
           
static class Compiler.ImportExpr
           
static class Compiler.InstanceOfExpr
           
static class Compiler.KeywordExpr
           
static class Compiler.LetExpr
           
static class Compiler.LetFnExpr
           
static class Compiler.ListExpr
           
static class Compiler.LiteralExpr
           
static class Compiler.LocalBinding
           
static class Compiler.LocalBindingExpr
           
static class Compiler.MapExpr
           
static interface Compiler.MaybePrimitiveExpr
           
static class Compiler.MetaExpr
           
static class Compiler.MethodParamExpr
           
static class Compiler.NewExpr
           
static class Compiler.NewInstanceExpr
           
static class Compiler.NewInstanceMethod
           
static class Compiler.ObjExpr
           
static class Compiler.ObjMethod
           
static class Compiler.RecurExpr
           
static class Compiler.SetExpr
           
static class Compiler.TheVarExpr
           
static class Compiler.TryExpr
           
static class Compiler.UntypedExpr
           
static class Compiler.VarExpr
           
static class Compiler.VectorExpr
           
 
Field Summary
static Var ADD_ANNOTATIONS
           
static IPersistentMap CHAR_MAP
           
static Var CLEAR_PATH
           
static Var CLEAR_ROOT
           
static Var CLEAR_SITES
           
static Var COLUMN
           
static Var COLUMN_AFTER
           
static Var COLUMN_BEFORE
           
static Var COMPILE_FILES
           
static Var COMPILE_PATH
           
static Var COMPILE_STUB_CLASS
           
static Var COMPILE_STUB_SYM
           
static Var COMPILER_OPTIONS
           
static Var CONSTANT_IDS
           
static Var CONSTANTS
           
static IPersistentMap DEMUNGE_MAP
           
static Pattern DEMUNGE_PATTERN
           
static Keyword directLinkingKey
           
static Keyword disableLocalsClearingKey
           
static Keyword elideMetaKey
           
static Var IN_CATCH_FINALLY
           
static Var IN_TRY_BLOCK
           
static Var INSTANCE
           
static Var KEYWORD_CALLSITES
           
static Var KEYWORDS
           
static Var LINE
           
static Var LINE_AFTER
           
static Var LINE_BEFORE
           
static Var LOADER
           
static Var LOCAL_ENV
           
static Var LOOP_LABEL
           
static Var LOOP_LOCALS
           
static Var METHOD
           
static Var NEXT_LOCAL_NUM
           
static Var NO_RECUR
           
static Var PROTOCOL_CALLSITES
           
static Class RECUR_CLASS
           
static Var RET_LOCAL_NUM
           
static Var SOURCE
           
static Var SOURCE_PATH
           
static IPersistentMap specials
           
static Var VAR_CALLSITES
           
static Var VARS
           
 
Fields inherited from interface clojure.asm.Opcodes
AALOAD, AASTORE, ACC_ABSTRACT, ACC_ANNOTATION, ACC_BRIDGE, ACC_DEPRECATED, ACC_ENUM, ACC_FINAL, ACC_INTERFACE, ACC_NATIVE, ACC_PRIVATE, ACC_PROTECTED, ACC_PUBLIC, ACC_STATIC, ACC_STRICT, ACC_SUPER, ACC_SYNCHRONIZED, ACC_SYNTHETIC, ACC_TRANSIENT, ACC_VARARGS, ACC_VOLATILE, ACONST_NULL, ALOAD, ANEWARRAY, ARETURN, ARRAYLENGTH, ASM4, ASTORE, ATHROW, BALOAD, BASTORE, BIPUSH, CALOAD, CASTORE, CHECKCAST, D2F, D2I, D2L, DADD, DALOAD, DASTORE, DCMPG, DCMPL, DCONST_0, DCONST_1, DDIV, DLOAD, DMUL, DNEG, DOUBLE, DREM, DRETURN, DSTORE, DSUB, DUP, DUP_X1, DUP_X2, DUP2, DUP2_X1, DUP2_X2, F_APPEND, F_CHOP, F_FULL, F_NEW, F_SAME, F_SAME1, F2D, F2I, F2L, FADD, FALOAD, FASTORE, FCMPG, FCMPL, FCONST_0, FCONST_1, FCONST_2, FDIV, FLOAD, FLOAT, FMUL, FNEG, FREM, FRETURN, FSTORE, FSUB, GETFIELD, GETSTATIC, GOTO, H_GETFIELD, H_GETSTATIC, H_INVOKEINTERFACE, H_INVOKESPECIAL, H_INVOKESTATIC, H_INVOKEVIRTUAL, H_NEWINVOKESPECIAL, H_PUTFIELD, H_PUTSTATIC, I2B, I2C, I2D, I2F, I2L, I2S, IADD, IALOAD, IAND, IASTORE, ICONST_0, ICONST_1, ICONST_2, ICONST_3, ICONST_4, ICONST_5, ICONST_M1, IDIV, IF_ACMPEQ, IF_ACMPNE, IF_ICMPEQ, IF_ICMPGE, IF_ICMPGT, IF_ICMPLE, IF_ICMPLT, IF_ICMPNE, IFEQ, IFGE, IFGT, IFLE, IFLT, IFNE, IFNONNULL, IFNULL, IINC, ILOAD, IMUL, INEG, INSTANCEOF, INTEGER, INVOKEDYNAMIC, INVOKEINTERFACE, INVOKESPECIAL, INVOKESTATIC, INVOKEVIRTUAL, IOR, IREM, IRETURN, ISHL, ISHR, ISTORE, ISUB, IUSHR, IXOR, JSR, L2D, L2F, L2I, LADD, LALOAD, LAND, LASTORE, LCMP, LCONST_0, LCONST_1, LDC, LDIV, LLOAD, LMUL, LNEG, LONG, LOOKUPSWITCH, LOR, LREM, LRETURN, LSHL, LSHR, LSTORE, LSUB, LUSHR, LXOR, MONITORENTER, MONITOREXIT, MULTIANEWARRAY, NEWARRAY, NOP, NULL, POP, POP2, PUTFIELD, PUTSTATIC, RET, RETURN, SALOAD, SASTORE, SIPUSH, SWAP, T_BOOLEAN, T_BYTE, T_CHAR, T_DOUBLE, T_FLOAT, T_INT, T_LONG, T_SHORT, TABLESWITCH, TOP, UNINITIALIZED_THIS, V1_1, V1_2, V1_3, V1_4, V1_5, V1_6, V1_7
 
Constructor Summary
Compiler()
           
 
Method Summary
static clojure.lang.Compiler.Expr analyze(Compiler.C context, Object form)
           
static Object compile(Reader rdr, String sourcePath, String sourceName)
           
static String demunge(String mungedName)
           
static Object eval(Object form)
           
static Object eval(Object form, boolean freshLoader)
           
static Object getCompilerOption(Keyword k)
           
static ILookupThunk getLookupThunk(Object target, Keyword k)
           
static IFn isInline(Object op, int arity)
           
static Var isMacro(Object op)
           
static Object load(Reader rdr)
           
static Object load(Reader rdr, String sourcePath, String sourceName)
           
static Object loadFile(String file)
           
static Object macroexpand1(Object x)
           
static Object maybeResolveIn(Namespace n, Symbol sym)
           
static String munge(String name)
           
static boolean namesStaticMember(Symbol sym)
           
static Object preserveTag(ISeq src, Object dst)
           
static void pushNS()
           
static void pushNSandLoader(ClassLoader loader)
           
static Object resolveIn(Namespace n, Symbol sym, boolean allowPrivate)
           
static boolean subsumes(Class[] c1, Class[] c2)
           
static void writeClassFile(String internalName, byte[] bytecode)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

specials

public static final IPersistentMap specials

LOCAL_ENV

public static final Var LOCAL_ENV

LOOP_LOCALS

public static final Var LOOP_LOCALS

LOOP_LABEL

public static final Var LOOP_LABEL

CONSTANTS

public static final Var CONSTANTS

CONSTANT_IDS

public static final Var CONSTANT_IDS

KEYWORD_CALLSITES

public static final Var KEYWORD_CALLSITES

PROTOCOL_CALLSITES

public static final Var PROTOCOL_CALLSITES

VAR_CALLSITES

public static final Var VAR_CALLSITES

KEYWORDS

public static final Var KEYWORDS

VARS

public static final Var VARS

METHOD

public static final Var METHOD

IN_TRY_BLOCK

public static final Var IN_TRY_BLOCK

IN_CATCH_FINALLY

public static final Var IN_CATCH_FINALLY

NO_RECUR

public static final Var NO_RECUR

LOADER

public static final Var LOADER

SOURCE

public static final Var SOURCE

SOURCE_PATH

public static final Var SOURCE_PATH

COMPILE_PATH

public static final Var COMPILE_PATH

COMPILE_FILES

public static final Var COMPILE_FILES

INSTANCE

public static final Var INSTANCE

ADD_ANNOTATIONS

public static final Var ADD_ANNOTATIONS

disableLocalsClearingKey

public static final Keyword disableLocalsClearingKey

directLinkingKey

public static final Keyword directLinkingKey

elideMetaKey

public static final Keyword elideMetaKey

COMPILER_OPTIONS

public static final Var COMPILER_OPTIONS

LINE

public static final Var LINE

COLUMN

public static final Var COLUMN

LINE_BEFORE

public static final Var LINE_BEFORE

COLUMN_BEFORE

public static final Var COLUMN_BEFORE

LINE_AFTER

public static final Var LINE_AFTER

COLUMN_AFTER

public static final Var COLUMN_AFTER

NEXT_LOCAL_NUM

public static final Var NEXT_LOCAL_NUM

RET_LOCAL_NUM

public static final Var RET_LOCAL_NUM

COMPILE_STUB_SYM

public static final Var COMPILE_STUB_SYM

COMPILE_STUB_CLASS

public static final Var COMPILE_STUB_CLASS

CLEAR_PATH

public static final Var CLEAR_PATH

CLEAR_ROOT

public static final Var CLEAR_ROOT

CLEAR_SITES

public static final Var CLEAR_SITES

RECUR_CLASS

public static final Class RECUR_CLASS

CHAR_MAP

public static final IPersistentMap CHAR_MAP

DEMUNGE_MAP

public static final IPersistentMap DEMUNGE_MAP

DEMUNGE_PATTERN

public static final Pattern DEMUNGE_PATTERN
Constructor Detail

Compiler

public Compiler()
Method Detail

getCompilerOption

public static Object getCompilerOption(Keyword k)

subsumes

public static boolean subsumes(Class[] c1,
                               Class[] c2)

munge

public static String munge(String name)

demunge

public static String demunge(String mungedName)

analyze

public static clojure.lang.Compiler.Expr analyze(Compiler.C context,
                                                 Object form)

isMacro

public static Var isMacro(Object op)

isInline

public static IFn isInline(Object op,
                           int arity)

namesStaticMember

public static boolean namesStaticMember(Symbol sym)

preserveTag

public static Object preserveTag(ISeq src,
                                 Object dst)

macroexpand1

public static Object macroexpand1(Object x)

eval

public static Object eval(Object form)

eval

public static Object eval(Object form,
                          boolean freshLoader)

resolveIn

public static Object resolveIn(Namespace n,
                               Symbol sym,
                               boolean allowPrivate)

maybeResolveIn

public static Object maybeResolveIn(Namespace n,
                                    Symbol sym)

loadFile

public static Object loadFile(String file)
                       throws IOException
Throws:
IOException

load

public static Object load(Reader rdr)

load

public static Object load(Reader rdr,
                          String sourcePath,
                          String sourceName)

writeClassFile

public static void writeClassFile(String internalName,
                                  byte[] bytecode)
                           throws IOException
Throws:
IOException

pushNS

public static void pushNS()

pushNSandLoader

public static void pushNSandLoader(ClassLoader loader)

getLookupThunk

public static ILookupThunk getLookupThunk(Object target,
                                          Keyword k)

compile

public static Object compile(Reader rdr,
                             String sourcePath,
                             String sourceName)
                      throws IOException
Throws:
IOException


Copyright © 2015. All Rights Reserved.