Skip to content

Commit 567c607

Browse files
committed
A few random comment cleanups.
1 parent 146d80a commit 567c607

File tree

4 files changed

+21
-19
lines changed

4 files changed

+21
-19
lines changed

Clojure/Clojure/CljCompiler/Ast/HostExpr.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,6 @@ public Expr Parse(ParserContext pcon, object form)
129129
PropertyInfo pinfo;
130130
FieldInfo finfo;
131131

132-
// TODO: Figure out if we want to handle the -propname otherwise.
133-
134132
bool isPropName = false;
135133
Symbol memberSym = methodSym;
136134

Clojure/Clojure/CljCompiler/Ast/InstanceFieldExpr.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ public override void Emit(RHC rhc, ObjExpr objx, CljILGen ilg)
104104
}
105105
else
106106
{
107-
// We could convert this to a dynamic call-site
107+
// TODO: We could convert this to a dynamic call-site
108108
_target.Emit(RHC.Expression, objx, ilg);
109109
ilg.Emit(OpCodes.Ldstr, _memberName);
110110
ilg.Emit(OpCodes.Call, Compiler.Method_Reflector_GetInstanceFieldOrProperty);

Clojure/Clojure/CljCompiler/Compiler.cs

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1419,7 +1419,7 @@ private static object MacroexpandSeq1(ISeq form)
14191419
if (sym != null)
14201420
{
14211421
string sname = sym.Name;
1422-
// (.substring s 2 5) => (. x substring 2 5)
1422+
// (.substring s 2 5) => (. s substring 2 5)
14231423
// ns == null ensures that Class/.instanceMethod isn't expanded to . form
14241424
if (sname[0] == '.' && sym.Namespace == null)
14251425
{
@@ -1432,22 +1432,23 @@ private static object MacroexpandSeq1(ISeq form)
14321432
// We need to make sure source information gets transferred
14331433
return MaybeTransferSourceInfo(PreserveTag(form, RT.listStar(DotSym, target, method, form.next().next())), form);
14341434
}
1435-
//else if (NamesStaticMember(sym))
1436-
//{
1437-
// Symbol target = Symbol.intern(sym.Namespace);
1438-
// Type t = HostExpr.MaybeType(target, false);
1439-
// if (t != null)
1440-
// {
1441-
// Symbol method = Symbol.intern(sym.Name);
1442-
// // We need to make sure source information gets transferred
1443-
// return MaybeTransferSourceInfo(PreserveTag(form, RT.listStar(Compiler.DotSym, target, method, form.next())), form);
1444-
// }
1445-
//}
14461435
else
14471436
{
1448-
// (x.substring 2 5) => (. x substring 2 5)
1437+
// (s.substring 2 5) => (. s substring 2 5)
14491438
// also (package.class.name ... ) (. package.class name ... )
1439+
1440+
// The comment above is in the JVM code. It appears to no longer be valid.
1441+
// Because the code following the next line is also commented out in the JVM code.
14501442
int index = sname.LastIndexOf('.');
1443+
//if (idx > 0 && idx < sname.length() - 1)
1444+
//{
1445+
// symbol target = symbol.intern(sname.substring(0, idx));
1446+
// symbol meth = symbol.intern(sname.substring(idx + 1));
1447+
// return rt.liststar(dot, target, meth, form.rest());
1448+
//}
1449+
//(stringbuilder. "foo") => (new stringbuilder "foo")
1450+
//else
1451+
14511452
if (index == sname.Length - 1)
14521453
// We need to make sure source information gets transferred
14531454
return MaybeTransferSourceInfo(RT.listStar(Compiler.NewSym, Symbol.intern(sname.Substring(0, index)), form.next()), form);

Clojure/Clojure/Runtime/Binding/MetaAFn.cs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
1-
using System;
2-
using System.Linq.Expressions;
1+
using Microsoft.Scripting.Actions.Calls;
2+
using System;
33
using System.Dynamic;
4-
using Microsoft.Scripting.Actions.Calls;
4+
using System.Linq.Expressions;
55
using System.Reflection;
66

77
namespace clojure.lang.Runtime.Binding
88
{
9+
10+
// TODO: Is this actually being used anywhere? (Other than the IDynamicMetaObjectProvider implementaion in AFn?
11+
// If not, get rid of it and the IDynamicMetaObjectProvider implementation in AFn.
912
class MetaAFn : DynamicMetaObject, IInferableInvokable
1013
{
1114

0 commit comments

Comments
 (0)