private static Symbol tagOf(Object o){ Object tag = RT.get(RT.meta(o), RT.TAG_KEY); if(tag instanceof Symbol) return (Symbol) tag; else if(tag instanceof String) return Symbol.intern(null, (String) tag); return null; }
static boolean hasTag(Object o, Object tag){ return Util.equals(tag, RT.get(RT.meta(o), TAG_KEY)); }
public static Object preserveTag(ISeq src, Object dst) { Symbol tag = tagOf(src); if (tag != null && dst instanceof IObj) { IPersistentMap meta = RT.meta(dst); return ((IObj) dst).withMeta((IPersistentMap) RT.assoc(meta, RT.TAG_KEY, tag)); } return dst; }
static void compile1(GeneratorAdapter gen, ObjExpr objx, Object form) { Object line = lineDeref(); Object column = columnDeref(); if(RT.meta(form) != null && RT.meta(form).containsKey(RT.LINE_KEY)) line = RT.meta(form).valAt(RT.LINE_KEY); if(RT.meta(form) != null && RT.meta(form).containsKey(RT.COLUMN_KEY)) column = RT.meta(form).valAt(RT.COLUMN_KEY); Var.pushThreadBindings( RT.map(LINE, line, COLUMN, column
private static Expr analyzeSeq(C context, ISeq form, String name) { Object line = lineDeref(); Object column = columnDeref(); if(RT.meta(form) != null && RT.meta(form).containsKey(RT.LINE_KEY)) line = RT.meta(form).valAt(RT.LINE_KEY); if(RT.meta(form) != null && RT.meta(form).containsKey(RT.COLUMN_KEY)) column = RT.meta(form).valAt(RT.COLUMN_KEY); Var.pushThreadBindings( RT.map(LINE, line, COLUMN, column));
return o; Object ometa = RT.meta(o); for(ISeq s = RT.seq(meta); s != null; s = s.next()) { IMapEntry kv = (IMapEntry) s.first();
this.tag = tag; } else if (fexpr instanceof VarExpr) { Object arglists = RT.get(RT.meta(((VarExpr) fexpr).var), arglistsKey); Object sigTag = null; for(ISeq s = RT.seq(arglists); s != null; s = s.next()) {
return o; Object ometa = RT.meta(o); for(ISeq s = RT.seq(meta); s != null; s = s.next()) { IMapEntry kv = (IMapEntry) s.first();
return o; Object ometa = RT.meta(o); for(ISeq s = RT.seq(meta); s != null; s = s.next()) { IMapEntry kv = (IMapEntry) s.first();
return o; Object ometa = RT.meta(o); for(ISeq s = RT.seq(meta); s != null; s = s.next()) { IMapEntry kv = (IMapEntry) s.first();
ret = RT.list(Compiler.QUOTE, form); if(form instanceof IObj && RT.meta(form) != null)
ret.classMeta = RT.meta(className); ret.internalName = ret.name.replace('.', '/'); ret.objtype = Type.getObjectType(ret.internalName);
if(RT.meta(form) != null) ret = new MetaExpr(ret, MapExpr .parse(context == C.EVAL ? context : C.EXPRESSION, ((IObj) form).meta()));
ret.classMeta = RT.meta(className); ret.internalName = ret.name.replace('.', '/'); ret.objtype = Type.getObjectType(ret.internalName);
for(int i = 0; i < parms.count(); i++) IPersistentMap meta = RT.meta(parms.nth(i)); addParameterAnnotation(gen, meta, i);
Object arglists = RT.get(RT.meta(v), arglistsKey); int arity = RT.count(form.next()); for(ISeq s = RT.seq(arglists); s != null; s = s.next())
addAnnotation(fv, RT.meta(lb.sym));