ChangeLog 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581
  1. 2008-05-08 Jb Evain <[email protected]>
  2. * Expression.cs, EmitContext.cs: deal with call to methods
  3. with byref parameters.
  4. 2008-05-07 Roei Erez <[email protected]>
  5. * Add ifdef TARGET_JVM
  6. 2008-05-03 Jb Evain <[email protected]>
  7. * LambdaExpression.cs: move checks to Expression
  8. * Expression.cs: apply check for both typed and untyped lambda
  9. creation, so that the constructor does not throws exception.
  10. Needed to create instances of Expression<> for untyped lambda
  11. factory method. Fixes #386322.
  12. 2008-05-02 Jb Evain <[email protected]>
  13. * Expression.cs: make Emit virtual instead of abstract,
  14. to allow externals libraries to extend Expression.
  15. Patch by Jan Oravec <[email protected]>. Fixes #386097.
  16. 2008-04-29 Jb Evain <[email protected]>
  17. * UnaryExpression.cs (EmitPrimitiveConversion): implement.
  18. 2008-04-28 Jb Evain <[email protected]>
  19. * EmitContext.cs: deal with globals when encountering them while
  20. compiling, and not ahead of time with a dedicated visitor.
  21. 2008-04-27 Jb Evain <[email protected]>
  22. * ConstantExpression.cs (Emit): emit properly null nullable types.
  23. 2008-04-27 Jb Evain <[email protected]>
  24. * Expression.cs: improve method finder.
  25. 2008-04-24 Jb Evain <[email protected]>
  26. * UnaryExpression.cs, EmitContext.cs: implement compilation
  27. of Quote as a global load.
  28. 2008-04-23 Jb Evain <[email protected]>
  29. * UnaryExpression.cs: start implementing EmitConvert.
  30. 2008-04-23 Jb Evain <[email protected]>
  31. * ConstantExpression.cs (Emit): properly Emit null constants.
  32. 2008-04-23 Jb Evain <[email protected]>
  33. * Expression.cs (Constant): check for assignability, not for type
  34. equality, when a type is passed.
  35. 2008-04-23 Jb Evain <[email protected]>
  36. * ExpressionPrinter.cs: ToString convert properly.
  37. 2008-04-22 Jb Evain <[email protected]>
  38. * UnaryExpression.cs: implement IsLiftedToNull properly.
  39. * Expression.cs (Convert, ConvertChecked): implemented computing
  40. of IsLifted and IsLiftedToNull for conversions.
  41. 2008-04-22 Jb Evain <[email protected]>
  42. * Expression.cs (Convert, ConvertChecked): implement.
  43. 2008-04-21 Jb Evain <[email protected]>
  44. * Expression.cs (Call): don't rely on the fact that if the
  45. instance expression is null, then it's a static call. Explicitely
  46. check on the MethodInfo for that.
  47. * EmitContext.cs (EmitCall): same pattern.
  48. 2008-04-20 Jb Evain <[email protected]>
  49. * MemberMemberBinding.cs (Emit): implement.
  50. 2008-04-19 Jb Evain <[email protected]>
  51. * EmitContext.cs: infrastructure work to attach a compiled
  52. lambda expression to an execution scope, and to detect and store
  53. external globals in the scope.
  54. * ConstantExpression.cs: load globals from the scope.
  55. 2008-04-19 Jb Evain <[email protected]>
  56. * ExpressionVisitor.cs (Visit): don't die because of Power.
  57. 2008-04-09 Jb Evain <[email protected]>
  58. * Expression.cs: check for illegal booleab unary expressions.
  59. 2008-04-09 Jb Evain <[email protected]>
  60. * UnaryExpression.cs: implement compilation of negate.
  61. 2008-04-09 Jb Evain <[email protected]>
  62. * UnaryExpression.cs, Expression.cs: implement IsLifted and IsLifted
  63. to null for simple unary operators. Implement Not compilation.
  64. 2008-04-08 Jb Evain <[email protected]>
  65. * ElementInit.cs: emit pop if the add method doesn't return void.
  66. 2008-03-20 Jb Evain <[email protected]>
  67. * Expression.cs: use the new and more complete IsAssignableTo
  68. instead of IsAssignableFrom.
  69. 2008-03-19 Jb Evain <[email protected]>
  70. * LambdaExpression.cs: use the new standardified IsAssignableTo,
  71. fixes ExpressionTest_NewArrayBounds.TestArrayAssignability.
  72. 2008-03-19 Jb Evain <[email protected]>
  73. * Extensions.cs (Type.IsAssignableTo): deal with arrays.
  74. 2008-03-13 Jb Evain <[email protected]>
  75. * NewArrayExpression.cs (EmitNewArrayBounds): implement.
  76. 2008-03-12 Jb Evain <[email protected]>
  77. * NewArrayExpression.cs (Emit): naive implementation of emit support
  78. for array initialization.
  79. 2008-03-11 Jb Evain <[email protected]>
  80. * BinaryExpression.cs: very naive implementation of emitting
  81. array accesses.
  82. 2008-03-11 Jb Evain <[email protected]>
  83. * *.cs: Move the different Emit* helpers to EmitContext,
  84. so that they get used more naturally by the non Expression
  85. types.
  86. 2008-03-10 Jb Evain <[email protected]>
  87. * TypeBinaryExpression.cs, Expression.cs: refactor an EmitIsInst.
  88. * UnaryExpression.cs: implement TypeAs using the EmitIsInst.
  89. 2008-03-10 Jb Evain <[email protected]>
  90. * TypeBinaryExpression.cs (Emit): implement.
  91. 2008-03-08 Jb Evain <[email protected]>
  92. * MemberListBinding.cs (Emit): implement.
  93. * MemberBinding.cs (EmitLoadMember): add helper.
  94. 2008-03-08 Jb Evain <[email protected]>
  95. * MemberAssignment.cs (Emit): implement.
  96. 2008-03-08 Jb Evain <[email protected]>
  97. * ElementInit.cs (Emit): implement.
  98. 2008-03-06 Jb Evain <[email protected]>
  99. * EmitContext.cs: the DebugContext delegate the CreateDelegate
  100. to a DynamicContext to avoid visibility issues in debug mode.
  101. 2008-03-06 Jb Evain <[email protected]>
  102. * EmitContext.cs: Lambda methods bypass JIT visibility checks.
  103. 2008-03-06 Jb Evain <[email protected]>
  104. * MethodCallExpression.cs, Expression.cs: refactor method calling
  105. into a more sophisticated EmitCall in Expression.
  106. * InvocationExpression.cs (Emit): implement using the previous EmitCall.
  107. 2008-03-06 Jb Evain <[email protected]>
  108. * Expression.cs: add a EmitCall helper.
  109. * MemberExpression.cs: implement property access.
  110. 2008-03-06 Jb Evain <[email protected]>
  111. * MethodCallExpression.cs, Expression.cs: refactor a EmitLoad in Expression.
  112. * MemberExpression.cs: use EmitLoad to load the instance field if needed.
  113. 2008-03-06 Jb Evain <[email protected]>
  114. * BinaryExpression.cs, Expression.cs: move EmitStored from
  115. BinaryExpression to Expression.
  116. * MethodCallExpression.cs: allow method calls on structs.
  117. 2008-03-05 Jb Evain <[email protected]>
  118. * Expression.cs: Fix the Call method which takes an array
  119. of type arguments.
  120. 2008-03-05 Jb Evain <[email protected]>
  121. * Expression.cs: fix for a good chunk of lifted/liftToNull tests.
  122. 2008-02-26 Jb Evain <[email protected]>
  123. * Expression.cs (Call): Guess the parameters type from the argument
  124. types if needed.
  125. 2008-02-25 Jb Evain <[email protected]>
  126. * NewExpression.cs (Emit): deal with value types construction.
  127. 2008-02-25 Jb Evain <[email protected]>
  128. * Expression.cs, NewExpression.cs: deal with the fact that value types
  129. don't have a parameterless constructor.
  130. 2008-02-24 Jb Evain <[email protected]>
  131. * LambdaExpression.cs, EmitContext.cs: make compilation
  132. of delegate returning void work.
  133. 2008-02-24 Jb Evain <[email protected]>
  134. * MethodCallExpression.cs: emit call or callvirt depending
  135. on the virtuality of the method.
  136. 2008-02-24 Jb Evain <[email protected]>
  137. * LambdaExpression.cs: properly format error message.
  138. 2008-02-21 Jb Evain <[email protected]>
  139. * BinaryExpression.cs (EmitCoalesce): fix setup_null.
  140. 2008-02-21 Jb Evain <[email protected]>
  141. * BinaryExpression.cs (Emit): fix the both_are_null case.
  142. 2008-02-20 Jb Evain <[email protected]>
  143. * Expression.cs, ExpressionPrinter.cs: implement MemberBind.
  144. 2008-02-20 Jb Evain <[email protected]>
  145. * Expression.cs, ExpressionPrinter.cs: implement ListInit.
  146. 2008-02-19 Jb Evain <[email protected]>
  147. * Expression.cs, ExpressionPrinter.cs: implement MemberInit.
  148. 2008-02-19 Jb Evain <[email protected]>
  149. * Expression.cs, ExpressionPrinter.cs: implement last New
  150. overload for anonymous types.
  151. 2008-02-08 Jb Evain <[email protected]>
  152. * Expression.cs, InvocationExpression.cs, ExpressionPrinter.cs
  153. add support for Invoke.
  154. 2008-02-04 Jb Evain <[email protected]>
  155. * ExpressionPrinter.cs: fix printing of MemberListBinding.
  156. 2008-02-04 Jb Evain <[email protected]>
  157. * Expression.cs, NewExpression.cs: make New(Type) test pass.
  158. 2008-02-04 Jb Evain <[email protected]>
  159. * ExpressionPrinter.cs: fix and clean printing of ElementInit.
  160. 2008-02-02 Jb Evain <[email protected]>
  161. * Expression.cs: fix ListBind(MemberInfo,IEnumerable<ElementInit>).
  162. 2008-02-02 Jb Evain <[email protected]>
  163. * Expression.cs: fix ListBind(MethodInfo,IEnumerable<ElementInit>).
  164. 2008-02-01 Olivier Dufour <[email protected]>
  165. * Expression.cs, ExpressionPrinter.cs:Add ListBind
  166. 2008-02-01 Olivier Dufour <[email protected]>
  167. * Expression.cs, ExpressionPrinter.cs:Add Elementinit
  168. 2008-01-31 Jb Evain <[email protected]>
  169. * UnaryExpression.cs: emit array length.
  170. 2008-01-31 Jb Evain <[email protected]>
  171. * MemberExpression.cs: Simple support for emitting fields.
  172. 2008-01-30 Jb Evain <[email protected]>
  173. * MethodCallExpression.cs: very naive implementation of Emit.
  174. 2008-01-30 Jb Evain <[email protected]>
  175. * NewExpression.cs: add Emit support for reference types.
  176. 2008-01-30 Jb Evain <[email protected]>
  177. * LambdaExpression.cs, EmitContext.cs: small refactoring.
  178. Extract the different EmitContexts to their own file.
  179. 2008-01-29 Jb Evain <[email protected]>
  180. * MethodCallExpression.cs, Expression.cs: complete Calls.
  181. 2008-01-29 Jb Evain <[email protected]>
  182. * Expression.cs, NewExpression.cs, ExpressionPrinter.cs:
  183. implement the first flavors of New.
  184. 2008-01-27 Jb Evain <[email protected]>
  185. * ConditionalExpression.cs: implement Emit.
  186. 2008-01-27 Jb Evain <[email protected]>
  187. * Expression.cs: implement the last Lambda method.
  188. 2008-01-27 Jb Evain <[email protected]>
  189. * LambdaExpression.cs: fix the Type of the LambdaExpressions.
  190. 2008-01-27 Olivier Dufour <[email protected]>
  191. * Expression.cs, InvocationExpession.cs,
  192. ListInitExpression.cs, MemberInitExpression.cs
  193. NewExpression.cs : Add all missing
  194. constructor in Expressions and remove the base one
  195. 2008-01-25 Jb Evain <[email protected]>
  196. * Expression.cs, ExpressionPrinter.cs: implement Bind.
  197. 2008-01-25 Jb Evain <[email protected]>
  198. * MemberMemberBinding.cs, MemberListBinding.cs,
  199. MemberAssignment.cs, MemberBinding.cs:
  200. add constructors.
  201. 2008-01-25 Jb Evain <[email protected]>
  202. * Expression.cs: implement PropertyOrField.
  203. 2008-01-24 Jb Evain <[email protected]>
  204. * Expression.cs, MemberExpression.cs, ExpressionPrinter.cs:
  205. implement Field and Property.
  206. 2008-01-22 Miguel de Icaza <[email protected]>
  207. * BinaryExpression.cs: Unleash the power of cut and paste.
  208. Bring a bunch of operatros from mcs/expression.cs
  209. * Expression.cs: There is no op_LogicalAnd or op_LogicalOr, I just
  210. used those from mcs, that was wrong. use the proper ones, clean
  211. up the result.
  212. * BinaryExpression.cs: Add method invocations for binary methods.
  213. 2008-01-22 Jb Evain <[email protected]>
  214. * Expression.cs, ExpressionPrinter.cs: implement NewArrayList.
  215. 2008-01-22 Jb Evain <[email protected]>
  216. * Expression.cs, ExpressionPrinter.cs, NewArrayExpression.cs:
  217. implement Expression.NewArrayBounds.
  218. 2008-01-22 Jb Evain <[email protected]>
  219. * ExpressionPrinter.cs: fix Lambda and Equal.
  220. 2008-01-22 Miguel de Icaza <[email protected]>
  221. * BinaryExpression.cs (EmitCoalesce): Add support for emitting
  222. code for Coalesce.
  223. TODO: this does not use the "Conversion" Lambda, which am not sure
  224. who generates this or what it is used for.
  225. (EmitLogical): Fix a couple of bugs in AndAlso, OrElse.
  226. * Expression.cs: Add support for Coalesce.
  227. (BinaryCoreCheck): Move more checking here, instead of the helper
  228. routines, will remove them next.
  229. * LambdaExpression.cs (Compile): Create the delegate last, so we
  230. manage to save the assembly while debugging in case of error
  231. 2008-01-21 Miguel de Icaza <[email protected]>
  232. * Expression.cs (BinaryCoreCheck): Add checking for a few
  233. operators here (to avoid doing a second pass, handles AndAlso and
  234. OrElse).
  235. (AndAlso, OrElse): Add some code.
  236. * BinaryExpression.cs: Instead of using GetValueOrDefault use
  237. get_Value, as we already probed for the lack of value.
  238. Split out support for And/Or to a separate routine as the code is
  239. not very easy to share with the arithmetics code.
  240. 2008-01-21 Marek Safar <[email protected]>
  241. * BinaryExpression.cs: Fixed initobj initialization.
  242. 2008-01-21 Jb Evain <[email protected]>
  243. * Expression.cs, UnaryExpression.cs, BinaryExpression.cs:
  244. Move the IsUnsigned helper from BinaryExpression to Expression,
  245. so it can be used in UnaryExpression.
  246. 2008-01-21 Miguel de Icaza <[email protected]>
  247. * Start code generation for nullables, currently this generates
  248. incorrect code for things like:
  249. Expression<Func<int?, int?, int?>> e2 = (a, b) => a + b;
  250. e2.Compile ().Invoke (null, 3))
  251. This should return null, but returns something else.
  252. * Introduce LINQ_DBG env variable, which generates a linq file in
  253. /tmp; It currently does not work as well as it should, as the
  254. Func<> parameters do not mwatch the generated method.
  255. Investigate.
  256. 2008-01-20 Miguel de Icaza <[email protected]>
  257. Introduce support for Nullable arguments, no code is generated for
  258. these yet, its only tests + node creation behavior at this point.
  259. * Expression.cs (BinaryCoreCheck): Do not allow "int?" and "int"
  260. as operators, they must both be nullable.
  261. NullableTypes in the arguments are transformed into the underlying
  262. values when doing the method validation.
  263. 2008-01-18 Miguel de Icaza <[email protected]>
  264. * ParameterExpression.cs: Add emit support.
  265. 2008-01-18 Jb Evain <[email protected]>
  266. * Expression[Printer|Visitor].cs: implement UnaryPlus, Not, Negate.
  267. 2008-01-18 Miguel de Icaza <[email protected]>
  268. * BinaryExpression.cs: Add support for emitting code for some
  269. operators (ported from the Mono C# compiler).
  270. Add tests.
  271. 2008-01-17 Miguel de Icaza <[email protected]>
  272. Beginning of code generation framework for Linq.Expressions.
  273. Some code was borrowed by from the C# compiler
  274. * Expression_T.cs: Fill in the blanks.
  275. * LambdaExpression.cs: Validation of parameters mostly, a tiny bit
  276. of codegen.
  277. * ConstantExpression.cs: Mostly done, need to write tests for
  278. non-fundamental types and other ValueType initializations.
  279. 2008-01-17 Jb Evain <[email protected]>
  280. * Expression.cs: implement MakeMemberAccess.
  281. 2008-01-17 Jb Evain <[email protected]>
  282. * Expression.cs, ExpressionPrinter.cs, BinaryExpression.cs:
  283. implement ArrayIndex.
  284. 2008-01-17 Jb Evain <[email protected]>
  285. * Expression.cs: Use TypeCode for IsInt and IsNumber.
  286. 2008-01-16 Miguel de Icaza <[email protected]>
  287. * Expression.cs: Add support for user-defined operators.
  288. Put back various binary operator tests.
  289. 2008-01-16 Jb Evain <[email protected]>
  290. * Expression.cs, ExpressionPrinter.cs: fix call for static methods.
  291. 2008-01-15 Miguel de Icaza <[email protected]>
  292. * Expression.cs: Do validation on the method parameters and use
  293. the return type if provided.
  294. 2008-01-15 Jb Evain <[email protected]>
  295. * MethodCallExpression.cs, Expression.cs
  296. ExpressionPrinter.cs: Implement Call (Expression, ...)
  297. 2008-01-15 Jb Evain <[email protected]>
  298. * Expression.cs, ConditionalExpressionExpression.cs
  299. ExpressionPrinter.cs : implement Expression.Condition.
  300. 2008-01-15 Jb Evain <[email protected]>
  301. * Expression.cs,
  302. ParameterExpression.cs,
  303. ExpressionPrinter.cs: implement Expression.Parameter
  304. 2008-01-15 Jb Evain <[email protected]>
  305. * ExpressionPrinter.cs (VisitBinaryExpression): simple
  306. implementation (probably misses a few cases).
  307. 2008-01-14 Miguel de Icaza <[email protected]>
  308. * Expression.cs: Bring back the (most) of binary operators. Added
  309. type checking as well and reorganized the source file by topic
  310. instead of alphabetical sorting.
  311. 2008-01-14 Jb Evain <[email protected]>
  312. * ExpressionPrinter.cs: print ArrayLength.
  313. 2008-01-14 Jb Evain <[email protected]>
  314. * Expression.cs: TypeAs can't take value types.
  315. * ExpressionPrinter.cs: implement TypeAs.
  316. 2008-01-14 Jb Evain <[email protected]>
  317. * Expression.cs: implement TypeIs.
  318. * ExpressionPrinter.cs: implement VisitTypeBinaryExpression.
  319. * TypeBinaryExpression.cs: add proper ctor.
  320. 2008-01-14 Jb Evain <[email protected]>
  321. * Expression.cs, ExpressionPrinter.cs: fix for Quote's type.
  322. 2008-01-14 Jb Evain <[email protected]>
  323. * BinaryExpression.cs,
  324. * Expression.cs: revert part of Miguel's last patch.
  325. MakeBinary is expected to call the appropriate factory
  326. methods. Whose methods that are responsible for creating
  327. the good BinaryExpression, wether they use a custom method
  328. or not.
  329. 2008-01-14 Jb Evain <[email protected]>
  330. * Expression.cs: MakeUnary is expected to call the appropriate
  331. factory methods.
  332. 2008-01-14 Miguel de Icaza <[email protected]>
  333. * Expression.cs (Constant, MakeBinary and consumers of it): Some
  334. more fill-up changes.
  335. MakeBinary will need much more work to support user-provided
  336. types.
  337. 2008-01-13 Jb Evain <[email protected]>
  338. * *.cs: fresh implementation.