static public void init() { RT.errPrintWriter().println("No need to call RT.init() anymore"); }
static public void init() { RT.errPrintWriter().println("No need to call RT.init() anymore"); }
private void warnOrFailOnReplace(Symbol sym, Object o, Object v){ if (o instanceof Var) { Namespace ns = ((Var)o).ns; if (ns == this || (v instanceof Var && ((Var)v).ns == RT.CLOJURE_NS)) return; if (ns != RT.CLOJURE_NS) throw new IllegalStateException(sym + " already refers to: " + o + " in namespace: " + name); } RT.errPrintWriter().println("WARNING: " + sym + " already refers to: " + o + " in namespace: " + name + ", being replaced by: " + v); }
private void warnOrFailOnReplace(Symbol sym, Object o, Object v){ if (o instanceof Var) { Namespace ns = ((Var)o).ns; if (ns == this) return; if (ns != RT.CLOJURE_NS) throw new IllegalStateException(sym + " already refers to: " + o + " in namespace: " + name); } RT.errPrintWriter().println("WARNING: " + sym + " already refers to: " + o + " in namespace: " + name + ", being replaced by: " + v); }
if(ctor == null && RT.booleanCast(RT.WARN_ON_REFLECTION.deref())) RT.errPrintWriter() .format("Reflection warning, %s:%d:%d - call to %s ctor can't be resolved.\n", SOURCE_PATH.deref(), line, column, c.getName());
if(ctor == null && RT.booleanCast(RT.WARN_ON_REFLECTION.deref())) RT.errPrintWriter() .format("Reflection warning, %s:%d:%d - call to %s ctor can't be resolved.\n", SOURCE_PATH.deref(), line, column, c.getName());
public InstanceFieldExpr(int line, int column, Expr target, String fieldName, Symbol tag, boolean requireField) { this.target = target; this.targetClass = target.hasJavaClass() ? target.getJavaClass() : null; this.field = targetClass != null ? Reflector.getField(targetClass, fieldName, false) : null; this.fieldName = fieldName; this.line = line; this.column = column; this.tag = tag; this.requireField = requireField; if(field == null && RT.booleanCast(RT.WARN_ON_REFLECTION.deref())) { if(targetClass == null) { RT.errPrintWriter() .format("Reflection warning, %s:%d:%d - reference to field %s can't be resolved.\n", SOURCE_PATH.deref(), line, column, fieldName); } else { RT.errPrintWriter() .format("Reflection warning, %s:%d:%d - reference to field %s on %s can't be resolved.\n", SOURCE_PATH.deref(), line, column, fieldName, targetClass.getName()); } } }
public CaseExpr(int line, int column, LocalBindingExpr expr, int shift, int mask, int low, int high, Expr defaultExpr, SortedMap<Integer,Expr> tests,HashMap<Integer,Expr> thens, Keyword switchType, Keyword testType, Set<Integer> skipCheck){ this.expr = expr; this.shift = shift; this.mask = mask; this.low = low; this.high = high; this.defaultExpr = defaultExpr; this.tests = tests; this.thens = thens; this.line = line; this.column = column; if (switchType != compactKey && switchType != sparseKey) throw new IllegalArgumentException("Unexpected switch type: "+switchType); this.switchType = switchType; if (testType != intKey && testType != hashEquivKey && testType != hashIdentityKey) throw new IllegalArgumentException("Unexpected test type: "+switchType); this.testType = testType; this.skipCheck = skipCheck; Collection<Expr> returns = new ArrayList(thens.values()); returns.add(defaultExpr); this.returnType = maybeJavaClass(returns); if(RT.count(skipCheck) > 0 && RT.booleanCast(RT.WARN_ON_REFLECTION.deref())) { RT.errPrintWriter() .format("Performance warning, %s:%d:%d - hash collision of some case test constants; if selected, those entries will be tested sequentially.\n", SOURCE_PATH.deref(), line, column); } }
if(method == null && RT.booleanCast(RT.WARN_ON_REFLECTION.deref())) RT.errPrintWriter() .format("Reflection warning, %s:%d:%d - call to static method %s on %s can't be resolved (argument types: %s).\n", SOURCE_PATH.deref(), line, column, methodName, c.getName(), getTypeStringForArgs(args)); RT.errPrintWriter() .format("Boxed math warning, %s:%d:%d - call: %s.\n", SOURCE_PATH.deref(), line, column, method.toString());
public static void main(String[] args) throws IOException{ PrintWriter err = RT.errPrintWriter(); String path = System.getProperty(PATH_PROP); int count = args.length;
public static void main(String[] args) throws IOException{ PrintWriter err = RT.errPrintWriter(); String path = System.getProperty(PATH_PROP); int count = args.length;
if(RT.booleanCast(RT.WARN_ON_REFLECTION.deref())) RT.errPrintWriter() .format("Reflection warning, %s:%d:%d - call to method %s on %s can't be resolved (no such method).\n", SOURCE_PATH.deref(), line, column, methodName, target.getJavaClass().getName()); if(method == null && RT.booleanCast(RT.WARN_ON_REFLECTION.deref())) RT.errPrintWriter() .format("Reflection warning, %s:%d:%d - call to method %s on %s can't be resolved (argument types: %s).\n", SOURCE_PATH.deref(), line, column, methodName, target.getJavaClass().getName(), getTypeStringForArgs(args)); if(RT.booleanCast(RT.WARN_ON_REFLECTION.deref())) RT.errPrintWriter() .format("Reflection warning, %s:%d:%d - call to method %s can't be resolved (target class is unknown).\n", SOURCE_PATH.deref(), line, column, methodName);
RT.errPrintWriter().println (source + ":" + line + " recur arg for primitive local: " +
RT.errPrintWriter().println (source + ":" + line + " recur arg for primitive local: " +
if(!isDynamic && sym.name.startsWith("*") && sym.name.endsWith("*") && sym.name.length() > 1) RT.errPrintWriter().format("Warning: %1$s not declared dynamic and thus is not dynamically rebindable, " +"but its name suggests otherwise. Please either indicate ^:dynamic %1$s or change the name. (%2$s:%3$d)\n", sym, SOURCE_PATH.get(), LINE.get());
RT.errPrintWriter() .format("Performance warning, %s:%d:%d - case has int tests, but tested expression is not primitive.\n", SOURCE_PATH.deref(), line, column);
RT.errPrintWriter().println("Auto-boxing loop arg: " + sym);
e1.printStackTrace(RT.errPrintWriter());
RT.errPrintWriter().println("Auto-boxing loop arg: " + sym);
if(!isDynamic && sym.name.startsWith("*") && sym.name.endsWith("*") && sym.name.length() > 2) RT.errPrintWriter().format("Warning: %1$s not declared dynamic and thus is not dynamically rebindable, " +"but its name suggests otherwise. Please either indicate ^:dynamic %1$s or change the name. (%2$s:%3$d)\n", sym, SOURCE_PATH.get(), LINE.get());