MCPcopy Index your code
hub / github.com/clojure/clojure / compile1

Method compile1

src/jvm/clojure/lang/Compiler.java:8290–8325  ·  view source on GitHub ↗
(GeneratorAdapter gen, ObjExpr objx, Object form)

Source from the content-addressed store, hash-verified

8288}
8289
8290static void compile1(GeneratorAdapter gen, ObjExpr objx, Object form) {
8291 Object line = lineDeref();
8292 Object column = columnDeref();
8293 if(RT.meta(form) != null && RT.meta(form).containsKey(RT.LINE_KEY))
8294 line = RT.meta(form).valAt(RT.LINE_KEY);
8295 if(RT.meta(form) != null && RT.meta(form).containsKey(RT.COLUMN_KEY))
8296 column = RT.meta(form).valAt(RT.COLUMN_KEY);
8297 Var.pushThreadBindings(
8298 RT.map(LINE, line, COLUMN, column
8299 ,LOADER, RT.makeClassLoader()
8300 ));
8301 try
8302 {
8303 form = macroexpand(form);
8304 if(form instanceof ISeq && Util.equals(RT.first(form), DO))
8305 {
8306 for(ISeq s = RT.next(form); s != null; s = RT.next(s))
8307 {
8308 compile1(gen, objx, RT.first(s));
8309 }
8310 }
8311 else
8312 {
8313 Expr expr = analyze(C.EVAL, form);
8314 objx.keywords = (IPersistentMap) KEYWORDS.deref();
8315 objx.vars = (IPersistentMap) VARS.deref();
8316 objx.constants = (PersistentVector) CONSTANTS.deref();
8317 expr.emit(C.EXPRESSION, objx, gen);
8318 expr.eval();
8319 }
8320 }
8321 finally
8322 {
8323 Var.popThreadBindings();
8324 }
8325}
8326
8327public static Object compile(Reader rdr, String sourcePath, String sourceName) throws IOException{
8328 if(COMPILE_PATH.deref() == null)

Callers 1

compileMethod · 0.95

Calls 15

lineDerefMethod · 0.95
columnDerefMethod · 0.95
metaMethod · 0.95
pushThreadBindingsMethod · 0.95
mapMethod · 0.95
makeClassLoaderMethod · 0.95
macroexpandMethod · 0.95
equalsMethod · 0.95
firstMethod · 0.95
nextMethod · 0.95
analyzeMethod · 0.95
emitMethod · 0.95

Tested by

no test coverage detected