Permalink
Browse files

*boxContext => *box.Context , *boxMacro => *box.Macro

Performs the following renamings:
* scala.reflect.macros.BlackboxContext to scala.reflect.macros.blackbox.Context
* scala.reflect.macros.BlackboxMacro to scala.reflect.macros.blackbox.Macro
* scala.reflect.macros.WhiteboxContext to scala.reflect.macros.whitebox.Context
* scala.reflect.macros.WhiteboxMacro to scala.reflect.macros.whitebox.Macro

https://groups.google.com/forum/#!topic/scala-internals/MX40-dM28rk
  • Loading branch information...
1 parent e089caf commit 5cc8f83c681ded7367dc5112f6f9042e9526facf @xeno-by xeno-by committed Jan 11, 2014
Showing with 760 additions and 748 deletions.
  1. +1 −1 src/compiler/scala/reflect/macros/compiler/Errors.scala
  2. +2 −2 src/compiler/scala/reflect/macros/compiler/Resolvers.scala
  3. +6 −6 src/compiler/scala/reflect/macros/compiler/Validators.scala
  4. +2 −2 src/compiler/scala/reflect/macros/contexts/Context.scala
  5. +1 −1 src/compiler/scala/tools/nsc/typechecker/Implicits.scala
  6. +8 −8 src/compiler/scala/tools/nsc/typechecker/Macros.scala
  7. +2 −2 src/partest-extras/scala/tools/partest/Util.scala
  8. +1 −1 src/reflect/scala/reflect/api/Exprs.scala
  9. +1 −1 src/reflect/scala/reflect/api/Importers.scala
  10. +3 −3 src/reflect/scala/reflect/api/Mirrors.scala
  11. +3 −3 src/reflect/scala/reflect/api/Universe.scala
  12. +4 −4 src/reflect/scala/reflect/internal/Definitions.scala
  13. +2 −2 src/reflect/scala/reflect/macros/Aliases.scala
  14. +3 −3 src/reflect/scala/reflect/macros/Enclosures.scala
  15. +4 −4 src/reflect/scala/reflect/macros/Evals.scala
  16. +2 −2 src/reflect/scala/reflect/macros/ExprUtils.scala
  17. +2 −2 src/reflect/scala/reflect/macros/FrontEnds.scala
  18. +2 −2 src/reflect/scala/reflect/macros/Infrastructure.scala
  19. +2 −2 src/reflect/scala/reflect/macros/Names.scala
  20. +2 −2 src/reflect/scala/reflect/macros/Parsers.scala
  21. +2 −2 src/reflect/scala/reflect/macros/Reifiers.scala
  22. +3 −3 src/reflect/scala/reflect/macros/Typers.scala
  23. +15 −14 src/reflect/scala/reflect/macros/{BlackboxContext.scala → blackbox/Context.scala}
  24. +11 −7 src/reflect/scala/reflect/macros/{BlackboxMacro.scala → blackbox/Macro.scala}
  25. +4 −4 src/reflect/scala/reflect/macros/package.scala
  26. +7 −6 src/reflect/scala/reflect/macros/{WhiteboxContext.scala → whitebox/Context.scala}
  27. +11 −7 src/reflect/scala/reflect/macros/{WhiteboxMacro.scala → whitebox/Macro.scala}
  28. +1 −1 src/reflect/scala/reflect/runtime/package.scala
  29. +2 −2 test/files/neg/macro-abort/Macros_1.scala
  30. +4 −4 test/files/neg/macro-basic-mamdmi/Impls_Macros_Test_1.scala
  31. +2 −2 test/files/neg/macro-blackbox-dynamic-materialization/Macros_1.scala
  32. +2 −2 test/files/neg/macro-blackbox-extractor/Macros_1.scala
  33. +2 −2 test/files/neg/macro-blackbox-fundep-materialization/Macros_1.scala
  34. +1 −1 test/files/neg/macro-blackbox-structural/Impls_Macros_1.scala
  35. +1 −1 test/files/neg/macro-bundle-abstract.check
  36. +2 −2 test/files/neg/macro-bundle-abstract.scala
  37. +1 −1 test/files/neg/macro-bundle-class.check
  38. +2 −3 test/files/neg/macro-bundle-class.scala
  39. +1 −1 test/files/neg/macro-bundle-mixbox.check
  40. +2 −1 test/files/neg/macro-bundle-mixbox.scala
  41. +2 −2 test/files/neg/macro-bundle-object.check
  42. +3 −3 test/files/neg/macro-bundle-object.scala
  43. +3 −3 test/files/neg/macro-bundle-polymorphic.check
  44. +2 −2 test/files/neg/macro-bundle-polymorphic.scala
  45. +1 −1 test/files/neg/macro-bundle-trait.check
  46. +3 −4 test/files/neg/macro-bundle-trait.scala
  47. +2 −2 test/files/neg/macro-cyclic/Impls_Macros_1.scala
  48. +2 −2 test/files/neg/macro-divergence-controlled/Impls_Macros_1.scala
  49. +2 −2 test/files/neg/macro-exception/Macros_1.scala
  50. +2 −2 test/files/neg/macro-false-deprecation-warning/Impls_Macros_1.scala
  51. +2 −2 test/files/neg/macro-incompatible-macro-engine/Macros_2.scala
  52. +10 −10 test/files/neg/macro-invalidimpl.check
  53. +10 −10 test/files/neg/macro-invalidimpl/Impls_1.scala
  54. +2 −2 test/files/neg/macro-invalidimpl/Macros_Test_2.scala
  55. +6 −6 test/files/neg/macro-invalidret.check
  56. +6 −6 test/files/neg/macro-invalidret/Impls_1.scala
  57. +2 −2 test/files/neg/macro-invalidshape/Impls_1.scala
  58. +1 −1 test/files/neg/macro-invalidshape/Macros_Test_2.scala
  59. +3 −3 test/files/neg/macro-invalidsig-params-badtype.check
  60. +2 −2 test/files/neg/macro-invalidsig-params-badtype/Impls_Macros_1.scala
  61. +29 −29 test/files/neg/macro-invalidsig.check
  62. +15 −15 test/files/neg/macro-invalidsig/Impls_1.scala
  63. +2 −2 test/files/neg/macro-invalidusage-badargs/Impls_1.scala
  64. +2 −2 test/files/neg/macro-invalidusage-badbounds/Impls_1.scala
  65. +2 −2 test/files/neg/macro-invalidusage-badtargs/Impls_1.scala
  66. +2 −2 test/files/neg/macro-invalidusage-methodvaluesyntax/Impls_1.scala
  67. +2 −2 test/files/neg/macro-invalidusage-nontypeable/Impls_Macros_1.scala
  68. +2 −2 test/files/neg/macro-invalidusage-presuper/Impls_1.scala
  69. +2 −2 test/files/neg/macro-noexpand/Impls_1.scala
  70. +2 −2 test/files/neg/macro-nontypeablebody/Impls_1.scala
  71. +2 −2 test/files/neg/macro-override-macro-overrides-abstract-method-a/Impls_Macros_1.scala
  72. +2 −2 test/files/neg/macro-override-macro-overrides-abstract-method-b/Impls_Macros_1.scala
  73. +6 −6 test/files/neg/macro-override-method-overrides-macro/Impls_1.scala
  74. +2 −2 test/files/neg/macro-quasiquotes/Macros_1.scala
  75. +2 −2 test/files/neg/macro-reify-splice-splice/Macros_1.scala
  76. +4 −4 test/files/neg/macro-without-xmacros-a/Impls_1.scala
  77. +4 −4 test/files/neg/macro-without-xmacros-b/Impls_1.scala
  78. +3 −3 test/files/neg/t5689.check
  79. +2 −2 test/files/neg/t5689.scala
  80. +2 −2 test/files/neg/t5753/Impls_Macros_1.scala
  81. +1 −1 test/files/neg/t5753/Test_2.scala
  82. +2 −2 test/files/neg/t5903a/Macros_1.scala
  83. +2 −2 test/files/neg/t5903b/Macros_1.scala
  84. +2 −2 test/files/neg/t5903c/Macros_1.scala
  85. +2 −2 test/files/neg/t5903d/Macros_1.scala
  86. +2 −2 test/files/neg/t5903e/Macros_1.scala
  87. +3 −3 test/files/neg/t6123-explaintypes-macros.check
  88. +2 −2 test/files/neg/t6123-explaintypes-macros/BadMac_2.scala
  89. +2 −2 test/files/neg/t6123-explaintypes-macros/Macros.scala
  90. +2 −2 test/files/neg/t6539/Macro_1.scala
  91. +13 −13 test/files/neg/t7157/Impls_Macros_1.scala
  92. +2 −2 test/files/neg/t8104/Macros_1.scala
  93. +2 −2 test/files/pos/annotated-original/M_1.scala
  94. +2 −2 test/files/pos/annotated-treecopy/Impls_Macros_1.scala
  95. +2 −2 test/files/pos/attachments-typed-another-ident/Impls_1.scala
  96. +2 −2 test/files/pos/attachments-typed-ident/Impls_1.scala
  97. +1 −1 test/files/pos/macro-implicit-invalidate-on-error.scala
  98. +2 −2 test/files/pos/t5692a/Macros_1.scala
  99. +2 −2 test/files/pos/t5692b/Macros_1.scala
  100. +2 −2 test/files/pos/t5706.scala
  101. +3 −3 test/files/pos/t5744/Macros_1.scala
  102. +2 −2 test/files/pos/t6047.scala
  103. +4 −4 test/files/pos/t6447.scala
  104. +2 −2 test/files/pos/t6485a/Macros_1.scala
  105. +2 −2 test/files/pos/t6485b/Test.scala
  106. +3 −3 test/files/pos/t6516.scala
  107. +2 −2 test/files/pos/t7377/Macro_1.scala
  108. +2 −2 test/files/pos/t7461/Macros_1.scala
  109. +1 −1 test/files/pos/t7649.scala
  110. +1 −1 test/files/pos/t7776.scala
  111. +2 −2 test/files/pos/t8001/Macros_1.scala
  112. +1 −1 test/files/pos/t8013/inpervolator_1.scala
  113. +1 −1 test/files/pos/t8064/Macro_1.scala
  114. +1 −1 test/files/pos/t8064b/Macro_1.scala
  115. +2 −2 test/files/run/macro-abort-fresh/Macros_1.scala
  116. +2 −2 test/files/run/macro-auto-duplicate/Macros_1.scala
  117. +4 −4 test/files/run/macro-basic-ma-md-mi/Impls_1.scala
  118. +4 −4 test/files/run/macro-basic-ma-mdmi/Impls_Macros_1.scala
  119. +4 −4 test/files/run/macro-basic-mamd-mi/Impls_1.scala
  120. +2 −2 test/files/run/macro-blackbox-materialization/Macros_1.scala
  121. +2 −1 test/files/run/macro-bodyexpandstoimpl/Impls_1.scala
  122. +4 −4 test/files/run/macro-bundle-repl.check
  123. +3 −3 test/files/run/macro-bundle-repl.scala
  124. +3 −3 test/files/run/macro-bundle-static/Impls_Macros_1.scala
  125. +3 −3 test/files/run/macro-bundle-toplevel/Impls_Macros_1.scala
  126. +2 −2 test/files/run/macro-def-path-dependent/Test_1.scala
  127. +2 −2 test/files/run/macro-def-path-dependent/Test_2.scala
  128. +2 −2 test/files/run/macro-def-path-dependent/Test_3.scala
  129. +2 −2 test/files/run/macro-def-path-dependent/Test_4.scala
  130. +2 −2 test/files/run/macro-def-path-dependent/Test_5.scala
  131. +1 −1 test/files/run/macro-def-path-dependent/Test_6.scala
  132. +2 −2 test/files/run/macro-default-params/Macros_1.scala
  133. +2 −2 test/files/run/macro-divergence-spurious/Impls_Macros_1.scala
  134. +2 −2 test/files/run/macro-duplicate/Impls_Macros_1.scala
  135. +2 −2 test/files/run/macro-enclosures/Impls_Macros_1.scala
  136. +2 −2 test/files/run/macro-expand-implicit-argument/Macros_1.scala
  137. +2 −2 test/files/run/macro-expand-implicit-macro-has-implicit/Impls_1.scala
  138. +2 −2 test/files/run/macro-expand-implicit-macro-is-implicit/Impls_1.scala
  139. +2 −2 test/files/run/macro-expand-implicit-macro-is-val/Impls_1.scala
  140. +2 −2 test/files/run/macro-expand-implicit-macro-is-view/Impls_1.scala
  141. +2 −2 test/files/run/macro-expand-multiple-arglists/Impls_1.scala
  142. +6 −6 test/files/run/macro-expand-nullary-generic/Impls_1.scala
  143. +6 −6 test/files/run/macro-expand-nullary-nongeneric/Impls_1.scala
  144. +6 −6 test/files/run/macro-expand-overload/Impls_1.scala
  145. +6 −6 test/files/run/macro-expand-override/Impls_1.scala
  146. +3 −3 test/files/run/macro-expand-recursive/Impls_1.scala
  147. +3 −3 test/files/run/macro-expand-tparams-bounds/Impls_1.scala
  148. +2 −2 test/files/run/macro-expand-tparams-explicit/Impls_1.scala
  149. +2 −2 test/files/run/macro-expand-tparams-implicit/Impls_1.scala
  150. +4 −4 test/files/run/macro-expand-tparams-prefix/Impls_1.scala
  151. +2 −2 test/files/run/macro-expand-unapply-a/Impls_Macros_1.scala
  152. +2 −2 test/files/run/macro-expand-varargs-explicit-over-nonvarargs-bad/Impls_1.scala
  153. +2 −2 test/files/run/macro-expand-varargs-explicit-over-nonvarargs-good/Impls_1.scala
  154. +2 −2 test/files/run/macro-expand-varargs-explicit-over-varargs/Impls_1.scala
  155. +2 −2 test/files/run/macro-expand-varargs-implicit-over-nonvarargs/Impls_1.scala
  156. +2 −2 test/files/run/macro-expand-varargs-implicit-over-varargs/Impls_1.scala
  157. +2 −2 test/files/run/macro-impl-default-params/Impls_Macros_1.scala
  158. +5 −5 test/files/run/macro-impl-relaxed/Macros_1.scala
  159. +2 −2 test/files/run/macro-impl-rename-context/Impls_Macros_1.scala
  160. +2 −2 test/files/run/macro-impl-tparam-only-in-impl/Impls_1.scala
  161. +2 −2 test/files/run/macro-impl-tparam-typetag-is-optional/Impls_1.scala
  162. +2 −2 test/files/run/macro-invalidret-doesnt-conform-to-def-rettype/Impls_Macros_1.scala
  163. +2 −2 test/files/run/macro-invalidret-nontypeable/Impls_Macros_1.scala
  164. +2 −2 test/files/run/macro-invalidusage-badret/Impls_Macros_1.scala
  165. +2 −2 test/files/run/macro-invalidusage-partialapplication-with-tparams/Impls_Macros_1.scala
  166. +2 −2 test/files/run/macro-invalidusage-partialapplication/Impls_Macros_1.scala
  167. +2 −2 test/files/run/macro-openmacros/Impls_Macros_1.scala
  168. +3 −2 test/files/run/macro-parse-position-malformed/Impls_Macros_1.scala
  169. +2 −2 test/files/run/macro-parse-position/Impls_Macros_1.scala
  170. +2 −2 test/files/run/macro-quasiinvalidbody-c/Impls_Macros_1.scala
  171. +2 −2 test/files/run/macro-quasiquotes/Macros_1.scala
  172. +2 −2 test/files/run/macro-range/Common_1.scala
  173. +2 −2 test/files/run/macro-range/Expansion_Impossible_2.scala
  174. +2 −2 test/files/run/macro-reflective-ma-normal-mdmi/Impls_Macros_1.scala
  175. +2 −2 test/files/run/macro-reflective-mamd-normal-mi/Impls_1.scala
  176. +2 −2 test/files/run/macro-reify-basic/Macros_1.scala
  177. +1 −1 test/files/run/macro-reify-freevars/Macros_1.scala
  178. +4 −4 test/files/run/macro-reify-nested-a/Impls_Macros_1.scala
  179. +4 −4 test/files/run/macro-reify-nested-b/Impls_Macros_1.scala
  180. +2 −2 test/files/run/macro-reify-ref-to-packageless/Impls_1.scala
  181. +2 −2 test/files/run/macro-reify-splice-outside-reify/Impls_Macros_1.scala
  182. +3 −3 test/files/run/macro-reify-staticXXX/Macros_1.scala
  183. +2 −2 test/files/run/macro-reify-tagful-a/Macros_1.scala
  184. +2 −2 test/files/run/macro-reify-tagless-a/Impls_Macros_1.scala
  185. +2 −2 test/files/run/macro-reify-type/Macros_1.scala
  186. +2 −2 test/files/run/macro-reify-unreify/Macros_1.scala
  187. +5 −5 test/files/run/macro-repl-basic.check
  188. +4 −4 test/files/run/macro-repl-basic.scala
  189. +4 −4 test/files/run/macro-repl-dontexpand.check
  190. +2 −2 test/files/run/macro-repl-dontexpand.scala
  191. +2 −2 test/files/run/macro-settings/Impls_Macros_1.scala
  192. +2 −2 test/files/run/macro-sip19-revised/Impls_Macros_1.scala
  193. +2 −2 test/files/run/macro-sip19/Impls_Macros_1.scala
  194. +2 −2 test/files/run/macro-subpatterns/Macro_1.scala
  195. +4 −4 test/files/run/macro-system-properties.check
  196. +2 −2 test/files/run/macro-system-properties.scala
  197. +2 −2 test/files/run/macro-term-declared-in-annotation/Impls_1.scala
  198. +2 −2 test/files/run/macro-term-declared-in-anonymous/Impls_1.scala
  199. +2 −2 test/files/run/macro-term-declared-in-block/Impls_1.scala
  200. +2 −2 test/files/run/macro-term-declared-in-class-class/Impls_1.scala
  201. +2 −2 test/files/run/macro-term-declared-in-class-object/Impls_1.scala
  202. +2 −2 test/files/run/macro-term-declared-in-class/Impls_1.scala
  203. +2 −2 test/files/run/macro-term-declared-in-default-param/Impls_1.scala
  204. +2 −2 test/files/run/macro-term-declared-in-implicit-class/Impls_Macros_1.scala
  205. +2 −2 test/files/run/macro-term-declared-in-method/Impls_1.scala
  206. +2 −2 test/files/run/macro-term-declared-in-object-class/Impls_1.scala
  207. +2 −2 test/files/run/macro-term-declared-in-object-object/Impls_1.scala
  208. +2 −2 test/files/run/macro-term-declared-in-object/Impls_1.scala
  209. +2 −2 test/files/run/macro-term-declared-in-package-object/Impls_1.scala
  210. +2 −2 test/files/run/macro-term-declared-in-refinement/Impls_1.scala
  211. +2 −2 test/files/run/macro-term-declared-in-trait/Impls_1.scala
  212. +3 −3 test/files/run/macro-typecheck-implicitsdisabled/Impls_Macros_1.scala
  213. +3 −3 test/files/run/macro-typecheck-macrosdisabled/Impls_Macros_1.scala
  214. +3 −3 test/files/run/macro-typecheck-macrosdisabled2/Impls_Macros_1.scala
  215. +3 −3 test/files/run/macro-undetparams-consfromsls/Impls_Macros_1.scala
  216. +2 −2 test/files/run/macro-undetparams-macroitself/Impls_Macros_1.scala
  217. +3 −3 test/files/run/macro-vampire-false-warning/Macros_1.scala
  218. +2 −2 test/files/run/macro-whitebox-dynamic-materialization/Macros_1.scala
  219. +2 −2 test/files/run/macro-whitebox-extractor/Macros_1.scala
  220. +2 −2 test/files/run/macro-whitebox-fundep-materialization/Macros_1.scala
  221. +2 −2 test/files/run/macro-whitebox-structural/Impls_Macros_1.scala
  222. +2 −2 test/files/run/macroPlugins-macroArgs/Macros_2.scala
  223. +3 −3 test/files/run/macroPlugins-macroExpand/Macros_2.scala
  224. +2 −2 test/files/run/macroPlugins-macroRuntime/Macros_2.scala
  225. +3 −3 test/files/run/macroPlugins-typedMacroBody/Macros_2.scala
  226. +8 −8 test/files/run/repl-term-macros.check
  227. +4 −4 test/files/run/repl-term-macros.scala
  228. +2 −2 test/files/run/t5713/Impls_Macros_1.scala
  229. +2 −2 test/files/run/t5753_1/Impls_Macros_1.scala
  230. +2 −2 test/files/run/t5753_2/Impls_Macros_1.scala
  231. +3 −2 test/files/run/t5894.scala
  232. +2 −2 test/files/run/t5903a/Macros_1.scala
  233. +2 −2 test/files/run/t5903b/Macros_1.scala
  234. +2 −2 test/files/run/t5903c/Macros_1.scala
  235. +2 −2 test/files/run/t5903d/Macros_1.scala
  236. +2 −2 test/files/run/t5923a/Macros_1.scala
  237. +2 −2 test/files/run/t5923d/Macros_1.scala
  238. +3 −3 test/files/run/t5940.scala
  239. +5 −5 test/files/run/t6187.check
  240. +2 −2 test/files/run/t6187.scala
  241. +2 −2 test/files/run/t6221/Macros_1.scala
  242. +4 −4 test/files/run/t6381.check
  243. +2 −2 test/files/run/t6381.scala
  244. +2 −2 test/files/run/t6394a/Macros_1.scala
  245. +2 −2 test/files/run/t6394b/Macros_1.scala
  246. +2 −2 test/files/run/t6662/Macro_1.scala
  247. +1 −1 test/files/run/t6992/Macros_1.scala
  248. +2 −2 test/files/run/t7008-scala-defined/Impls_Macros_2.scala
  249. +2 −2 test/files/run/t7008/Impls_Macros_2.scala
  250. +2 −2 test/files/run/t7047/Impls_Macros_1.scala
  251. +2 −2 test/files/run/t7157/Impls_Macros_1.scala
  252. +2 −2 test/files/run/t7240/Macros_1.scala
  253. +2 −2 test/files/run/t7375b/Macros_1.scala
  254. +3 −3 test/files/run/t7617a/Macros_1.scala
  255. +2 −2 test/files/run/t7617b/Macros_1.scala
  256. +2 −2 test/files/run/t7657/Macros_1.scala
  257. +2 −2 test/files/run/t7777/Macros_1.scala
  258. +1 −1 test/files/run/t7871/Macros_1.scala
  259. +2 −2 test/files/run/t8048a/Macros_1.scala
  260. +4 −4 test/files/run/t8048b/Macros_1.scala
  261. +2 −2 test/files/run/t8104/Macros_1.scala
  262. +2 −2 test/files/run/toolbox_current_run_compiles.scala
  263. +2 −2 test/files/run/typed-annotated/Macros_1.scala
  264. +2 −2 test/pending/neg/macro-invalidusage-badbounds-b/Impls_1.scala
  265. +2 −2 test/pending/run/macro-expand-default/Impls_1.scala
  266. +1 −1 test/pending/run/macro-expand-implicit-macro-defeats-type-inference/Impls_1.scala
  267. +2 −2 test/pending/run/macro-expand-macro-has-context-bound/Impls_1.scala
  268. +2 −2 test/pending/run/macro-expand-named/Impls_1.scala
  269. +2 −2 test/pending/run/macro-expand-tparams-prefix-e1/Impls_1.scala
  270. +2 −2 test/pending/run/macro-expand-tparams-prefix-f1/Impls_1.scala
  271. +2 −2 test/pending/run/macro-quasiinvalidbody-a/Impls_1.scala
  272. +1 −1 test/pending/run/macro-quasiinvalidbody-a/Macros_Test_2.scala
  273. +2 −2 test/pending/run/macro-quasiinvalidbody-b/Impls_1.scala
  274. +1 −1 test/pending/run/macro-quasiinvalidbody-b/Macros_Test_2.scala
  275. +2 −2 test/pending/run/macro-reify-array/Macros_1.scala
  276. +2 −2 test/pending/run/macro-reify-tagful-b/Macros_1.scala
  277. +2 −2 test/pending/run/macro-reify-tagless-b/Impls_Macros_1.scala
  278. +2 −2 test/pending/run/macro-term-declared-in-anonymous-explicit-import/Impls_1.scala
  279. +2 −2 test/scaladoc/run/SI-6812.scala
  280. +2 −2 test/scaladoc/run/SI-6812b.scala
@@ -51,7 +51,7 @@ trait Errors extends Traces {
def MacroBundleNonStaticError() = bundleRefError("macro bundles must be static")
- def MacroBundleWrongShapeError() = bundleRefError("macro bundles must be monomorphic traits extending either BlackboxMacro or WhiteboxMacro and not implementing their `val c: BlackboxContext/WhiteboxContext` member")
+ def MacroBundleWrongShapeError() = bundleRefError("macro bundles must be monomorphic traits extending either blackbox.Macro or whitebox.Macro and not implementing their `val c: Context` member")
// compatibility errors
@@ -46,8 +46,8 @@ trait Resolvers {
if (!isMacroBundleProtoType(bundleProto.tpe)) MacroBundleWrongShapeError()
if (!bundleProto.owner.isStaticOwner) MacroBundleNonStaticError()
- // synthesize the bundle, i.e. given a static `trait Foo extends Macro { def expand = ... } `
- // create a top-level definition `class Foo$Bundle(val c: BlackboxContext/WhiteboxContext) extends Foo` in a package next to `Foo`
+ // synthesize the bundle, i.e. given a static `trait Foo extends *box.Macro { def expand = ... } `
+ // create a top-level definition `class Foo$Bundle(val c: *box.Context) extends Foo` in a package next to `Foo`
val bundlePid = gen.mkUnattributedRef(bundlePkg)
val bundlePrefix =
if (bundlePkg == EmptyPackageClass) bundleProto.fullName('$')
@@ -93,20 +93,20 @@ trait Validators {
*
* For the following macro impl:
* def fooBar[T: c.WeakTypeTag]
- * (c: scala.reflect.macros.BlackboxContext)
+ * (c: scala.reflect.macros.blackbox.Context)
* (xs: c.Expr[List[T]])
* : c.Expr[T] = ...
*
* This function will return:
- * (c: scala.reflect.macros.BlackboxContext)(xs: c.Expr[List[T]])c.Expr[T]
+ * (c: scala.reflect.macros.blackbox.Context)(xs: c.Expr[List[T]])c.Expr[T]
*
* Note that type tag evidence parameters are not included into the result.
* Type tag context bounds for macro impl tparams are optional.
* Therefore compatibility checks ignore such parameters, and we don't need to bother about them here.
*
* This method cannot be reduced to just macroImpl.info, because macro implementations might
- * come in different shapes. If the implementation is an apply method of a BlackboxMacro/WhiteboxMacro-compatible object,
- * then it won't have (c: BlackboxContext/WhiteboxContext) in its parameters, but will rather refer to BlackboxMacro/WhiteboxMacro.c.
+ * come in different shapes. If the implementation is an apply method of a *box.Macro-compatible object,
+ * then it won't have (c: *box.Context) in its parameters, but will rather refer to *boxMacro.c.
*
* @param macroImpl The macro implementation symbol
*/
@@ -123,8 +123,8 @@ trait Validators {
* def foo[T](xs: List[T]): T = macro fooBar
*
* This function will return:
- * (c: scala.reflect.macros.BlackboxContext)(xs: c.Expr[List[T]])c.Expr[T] or
- * (c: scala.reflect.macros.WhiteboxContext)(xs: c.Expr[List[T]])c.Expr[T]
+ * (c: scala.reflect.macros.blackbox.Context)(xs: c.Expr[List[T]])c.Expr[T] or
+ * (c: scala.reflect.macros.whitebox.Context)(xs: c.Expr[List[T]])c.Expr[T]
*
* Note that type tag evidence parameters are not included into the result.
* Type tag context bounds for macro impl tparams are optional.
@@ -3,8 +3,8 @@ package contexts
import scala.tools.nsc.Global
-abstract class Context extends scala.reflect.macros.BlackboxContext
- with scala.reflect.macros.WhiteboxContext
+abstract class Context extends scala.reflect.macros.blackbox.Context
+ with scala.reflect.macros.whitebox.Context
with Aliases
with Enclosures
with Names
@@ -1145,7 +1145,7 @@ trait Implicits {
gen.mkAttributedThis(thisSym)
case _ =>
// if `pre` is not a PDT, e.g. if someone wrote
- // implicitly[scala.reflect.macros.BlackboxContext#TypeTag[Int]]
+ // implicitly[scala.reflect.macros.blackbox.Context#TypeTag[Int]]
// then we need to fail, because we don't know the prefix to use during type reification
// upd. we also need to fail silently, because this is a very common situation
// e.g. quite often we're searching for BaseUniverse#TypeTag, e.g. for a type tag in any universe
@@ -29,7 +29,7 @@ import Fingerprint._
* Then fooBar needs to point to a static method of the following form:
*
* def fooBar[T: c.WeakTypeTag] // type tag annotation is optional
- * (c: scala.reflect.macros.BlackboxContext)
+ * (c: scala.reflect.macros.blackbox.Context)
* (xs: c.Expr[List[T]])
* : c.Expr[T] = {
* ...
@@ -67,7 +67,7 @@ trait Macros extends FastTrack with MacroRuntimes with Traces with Helpers {
*
* This solution is very simple, but unfortunately it's also lacking. If we use it, then
* signatures of macro defs become transitively dependent on scala-reflect.jar
- * (because they refer to macro impls, and macro impls refer to scala.reflect.macros.BlackboxContext/WhiteboxContext defined in scala-reflect.jar).
+ * (because they refer to macro impls, and macro impls refer to *box.Context defined in scala-reflect.jar).
* More details can be found in comments to https://issues.scala-lang.org/browse/SI-5940.
*
* Therefore we have to avoid putting macro impls into binding pickles and come up with our own serialization format.
@@ -81,9 +81,9 @@ trait Macros extends FastTrack with MacroRuntimes with Traces with Helpers {
* and various accounting information necessary when composing an argument list for the reflective invocation.
*/
case class MacroImplBinding(
- // Is this macro impl a bundle (a trait extending BlackboxMacro or WhiteboxMacro) or a vanilla def?
+ // Is this macro impl a bundle (a trait extending *box.Macro) or a vanilla def?
val isBundle: Boolean,
- // Is this macro impl blackbox (i.e. having BlackboxContext in its signature)?
+ // Is this macro impl blackbox (i.e. having blackbox.Context in its signature)?
val isBlackbox: Boolean,
// Java class name of the class that contains the macro implementation
// is used to load the corresponding object with Java reflection
@@ -97,8 +97,8 @@ trait Macros extends FastTrack with MacroRuntimes with Traces with Helpers {
// * c.Expr[T] => LiftedTyped
// * c.Tree => LiftedUntyped
// * c.WeakTypeTag[T] => Tagged(index of the type parameter corresponding to that type tag)
- // * everything else (e.g. scala.reflect.macros.BlackboxContext/WhiteboxContext) => Other
- // f.ex. for: def impl[T: WeakTypeTag, U, V: WeakTypeTag](c: BlackboxContext)(x: c.Expr[T], y: c.Tree): (U, V) = ???
+ // * everything else (e.g. *box.Context) => Other
+ // f.ex. for: def impl[T: WeakTypeTag, U, V: WeakTypeTag](c: blackbox.Context)(x: c.Expr[T], y: c.Tree): (U, V) = ???
// `signature` will be equal to List(List(Other), List(LiftedTyped, LiftedUntyped), List(Tagged(0), Tagged(2)))
signature: List[List[Fingerprint]],
// type arguments part of a macro impl ref (the right-hand side of a macro definition)
@@ -116,7 +116,7 @@ trait Macros extends FastTrack with MacroRuntimes with Traces with Helpers {
* with synthetic content that carries the payload described in `MacroImplBinding`.
*
* For example, for a pair of macro definition and macro implementation:
- * def impl(c: scala.reflect.macros.BlackboxContext): c.Expr[Unit] = ???
+ * def impl(c: scala.reflect.macros.blackbox.Context): c.Expr[Unit] = ???
* def foo: Unit = macro impl
*
* We will have the following annotation added on the macro definition `foo`:
@@ -478,7 +478,7 @@ trait Macros extends FastTrack with MacroRuntimes with Traces with Helpers {
}
/** Keeps track of macros in-flight.
- * See more informations in comments to `openMacros` in `scala.reflect.macros.WhiteboxContext`.
+ * See more informations in comments to `openMacros` in `scala.reflect.macros.whitebox.Context`.
*/
var _openMacros = List[MacroContext]()
def openMacros = _openMacros
@@ -16,8 +16,8 @@ object Util {
*/
def trace[A](a: A) = macro traceImpl[A]
- import scala.reflect.macros.BlackboxContext
- def traceImpl[A: c.WeakTypeTag](c: BlackboxContext)(a: c.Expr[A]): c.Expr[A] = {
+ import scala.reflect.macros.blackbox.Context
+ def traceImpl[A: c.WeakTypeTag](c: Context)(a: c.Expr[A]): c.Expr[A] = {
import c.universe._
import definitions._
@@ -106,7 +106,7 @@ trait Exprs { self: Universe =>
*
* The corresponding macro implementation should have the following signature (note how the return type denotes path-dependency on x):
* {{{
- * object Impls { def foo_impl(c: BlackboxContext)(x: c.Expr[X]): c.Expr[x.value.T] = ... }
+ * object Impls { def foo_impl(c: Context)(x: c.Expr[X]): c.Expr[x.value.T] = ... }
* }}}
*/
@compileTimeOnly("cannot use value except for signatures of macro implementations")
@@ -34,7 +34,7 @@ package api
* {{{
* def staticEval[T](x: T) = macro staticEval[T]
*
- * def staticEval[T](c: scala.reflect.macros.BlackboxContext)(x: c.Expr[T]) = {
+ * def staticEval[T](c: scala.reflect.macros.blackbox.Context)(x: c.Expr[T]) = {
* // creates a runtime reflection universe to host runtime compilation
* import scala.reflect.runtime.{universe => ru}
* val mirror = ru.runtimeMirror(c.libraryClassLoader)
@@ -29,19 +29,19 @@ package api
* Compile-time `Mirror`s make use of only classloader `Mirror`s to load `Symbol`s
* by name.
*
- * The entry point to classloader `Mirror`s is via [[scala.reflect.macros.BlackboxContext#mirror]] or [[scala.reflect.macros.WhiteboxContext#mirror]].
+ * The entry point to classloader `Mirror`s is via [[scala.reflect.macros.blackbox.Context#mirror]] or [[scala.reflect.macros.whitebox.Context#mirror]].
* Typical methods which use classloader `Mirror`s include [[scala.reflect.api.Mirror#staticClass]],
* [[scala.reflect.api.Mirror#staticModule]], and [[scala.reflect.api.Mirror#staticPackage]]. For
* example:
* {{{
- * import scala.reflect.macros.BlackboxContext
+ * import scala.reflect.macros.blackbox.Context
*
* case class Location(filename: String, line: Int, column: Int)
*
* object Macros {
* def currentLocation: Location = macro impl
*
- * def impl(c: BlackboxContext): c.Expr[Location] = {
+ * def impl(c: Context): c.Expr[Location] = {
* import c.universe._
* val pos = c.macroApplication.pos
* val clsLocation = c.mirror.staticModule("Location") // get symbol of "Location" object
@@ -41,11 +41,11 @@ package api
* res1: reflect.runtime.universe.Type = scala.Either[String,Int]
* }}}
*
- * To obtain a `Universe` for use within a Scala macro, use [[scala.reflect.macros.BlackboxContext#universe]].
- * or [[scala.reflect.macros.WhiteboxContext#universe]]. For example:
+ * To obtain a `Universe` for use within a Scala macro, use [[scala.reflect.macros.blackbox.Context#universe]].
+ * or [[scala.reflect.macros.whitebox.Context#universe]]. For example:
* {{{
* def printf(format: String, params: Any*): Unit = macro impl
- * def impl(c: BlackboxContext)(format: c.Expr[String], params: c.Expr[Any]*): c.Expr[Unit] = {
+ * def impl(c: Context)(format: c.Expr[String], params: c.Expr[Any]*): c.Expr[Unit] = {
* import c.universe._
* ...
* }
@@ -482,12 +482,12 @@ trait Definitions extends api.StandardDefinitions {
lazy val TypeCreatorClass = getClassIfDefined("scala.reflect.api.TypeCreator") // defined in scala-reflect.jar, so we need to be careful
lazy val TreeCreatorClass = getClassIfDefined("scala.reflect.api.TreeCreator") // defined in scala-reflect.jar, so we need to be careful
- lazy val BlackboxMacroClass = getClassIfDefined("scala.reflect.macros.BlackboxMacro") // defined in scala-reflect.jar, so we need to be careful
+ lazy val BlackboxMacroClass = getClassIfDefined("scala.reflect.macros.blackbox.Macro") // defined in scala-reflect.jar, so we need to be careful
def BlackboxMacroContextValue = BlackboxMacroClass.map(sym => getMemberValue(sym, nme.c))
- lazy val WhiteboxMacroClass = getClassIfDefined("scala.reflect.macros.WhiteboxMacro") // defined in scala-reflect.jar, so we need to be careful
+ lazy val WhiteboxMacroClass = getClassIfDefined("scala.reflect.macros.whitebox.Macro") // defined in scala-reflect.jar, so we need to be careful
def WhiteboxMacroContextValue = WhiteboxMacroClass.map(sym => getMemberValue(sym, nme.c))
- lazy val BlackboxContextClass = getClassIfDefined("scala.reflect.macros.BlackboxContext") // defined in scala-reflect.jar, so we need to be careful
- lazy val WhiteboxContextClass = getClassIfDefined("scala.reflect.macros.WhiteboxContext") // defined in scala-reflect.jar, so we need to be careful
+ lazy val BlackboxContextClass = getClassIfDefined("scala.reflect.macros.blackbox.Context") // defined in scala-reflect.jar, so we need to be careful
+ lazy val WhiteboxContextClass = getClassIfDefined("scala.reflect.macros.whitebox.Context") // defined in scala-reflect.jar, so we need to be careful
def MacroContextPrefix = BlackboxContextClass.map(sym => getMemberMethod(sym, nme.prefix))
def MacroContextPrefixType = BlackboxContextClass.map(sym => getTypeMember(sym, tpnme.PrefixType))
def MacroContextUniverse = BlackboxContextClass.map(sym => getMemberMethod(sym, nme.universe))
@@ -5,11 +5,11 @@ package macros
/**
* <span class="badge badge-red" style="float: right;">EXPERIMENTAL</span>
*
- * A slice of [[scala.reflect.macros.BlackboxContext the Scala macros context]] that defines shorthands for the
+ * A slice of [[scala.reflect.macros.blackbox.Context the Scala macros context]] that defines shorthands for the
* most frequently used types and functions of the underlying compiler universe.
*/
trait Aliases {
- self: BlackboxContext =>
+ self: blackbox.Context =>
/** The type of symbols representing declarations. */
type Symbol = universe.Symbol
@@ -7,13 +7,13 @@ import scala.language.existentials // SI-6541
/**
* <span class="badge badge-red" style="float: right;">EXPERIMENTAL</span>
*
- * A slice of [[scala.reflect.macros.BlackboxContext the Scala macros context]] that exposes
+ * A slice of [[scala.reflect.macros.blackbox.Context the Scala macros context]] that exposes
* enclosing trees (method, class, compilation unit and currently compiled application),
* the enclosing position of the macro expansion, as well as macros and implicits
* that are currently in-flight.
*/
trait Enclosures {
- self: BlackboxContext =>
+ self: blackbox.Context =>
/** The tree that undergoes macro expansion.
* Can be useful to get an offset or a range position of the entire tree being processed.
@@ -30,7 +30,7 @@ trait Enclosures {
* Unlike `openMacros`, this is a val, which means that it gets initialized when the context is created
* and always stays the same regardless of whatever happens during macro expansion.
*/
- def enclosingMacros: List[BlackboxContext]
+ def enclosingMacros: List[blackbox.Context]
/** Tries to guess a position for the enclosing application.
* But that is simple, right? Just dereference `pos` of `macroApplication`? Not really.
@@ -5,11 +5,11 @@ package macros
/**
* <span class="badge badge-red" style="float: right;">EXPERIMENTAL</span>
*
- * A slice of [[scala.reflect.macros.BlackboxContext the Scala macros context]] that provides
+ * A slice of [[scala.reflect.macros.blackbox.Context the Scala macros context]] that provides
* a facility to evaluate trees.
*/
trait Evals {
- self: BlackboxContext =>
+ self: blackbox.Context =>
/** Takes a typed wrapper for a tree of type `T` and evaluates it to a value of type `T`.
*
@@ -21,12 +21,12 @@ trait Evals {
* mutates the tree in place, therefore the conventional approach is to `duplicate` the tree first.
*
* {{{
- * scala> def impl(c: BlackboxContext)(x: c.Expr[String]) = {
+ * scala> def impl(c: Context)(x: c.Expr[String]) = {
* | val x1 = c.Expr[String](c.resetAllAttrs(x.tree.duplicate))
* | println(s"compile-time value is: \${c.eval(x1)}")
* | x
* | }
- * impl: (c: BlackboxContext)(x: c.Expr[String])c.Expr[String]
+ * impl: (c: Context)(x: c.Expr[String])c.Expr[String]
*
* scala> def test(x: String) = macro impl
* test: (x: String)String
@@ -5,11 +5,11 @@ package macros
/**
* <span class="badge badge-red" style="float: right;">EXPERIMENTAL</span>
*
- * A slice of [[scala.reflect.macros.BlackboxContext the Scala macros context]] that defines shorthands for the
+ * A slice of [[scala.reflect.macros.blackbox.Context the Scala macros context]] that defines shorthands for the
* most common `Expr`-creating functions.
*/
trait ExprUtils {
- self: BlackboxContext =>
+ self: blackbox.Context =>
/** Shorthand for `Literal(Constant(null))` in the underlying `universe`. */
@deprecated("Use quasiquotes instead", "2.11.0")
@@ -5,12 +5,12 @@ package macros
/**
* <span class="badge badge-red" style="float: right;">EXPERIMENTAL</span>
*
- * A slice of [[scala.reflect.macros.BlackboxContext the Scala macros context]] that
+ * A slice of [[scala.reflect.macros.blackbox.Context the Scala macros context]] that
* provides facilities to communicate with the compiler's front end
* (emit warnings, errors and other sorts of messages).
*/
trait FrontEnds {
- self: BlackboxContext =>
+ self: blackbox.Context =>
/** For sending a message which should not be labeled as a warning/error,
* but also shouldn't require -verbose to be visible.
@@ -5,11 +5,11 @@ package macros
/**
* <span class="badge badge-red" style="float: right;">EXPERIMENTAL</span>
*
- * A slice of [[scala.reflect.macros.BlackboxContext the Scala macros context]] that
+ * A slice of [[scala.reflect.macros.blackbox.Context the Scala macros context]] that
* provides facilities to communicate with the compiler's infrastructure.
*/
trait Infrastructure {
- self: BlackboxContext =>
+ self: blackbox.Context =>
/** Exposes macro-specific settings as a list of strings.
* These settings are passed to the compiler via the "-Xmacro-settings:setting1,setting2...,settingN" command-line option.
@@ -5,11 +5,11 @@ package macros
/**
* <span class="badge badge-red" style="float: right;">EXPERIMENTAL</span>
*
- * A slice of [[scala.reflect.macros.BlackboxContext the Scala macros context]] that
+ * A slice of [[scala.reflect.macros.blackbox.Context the Scala macros context]] that
* provides functions that generate unique names.
*/
trait Names {
- self: BlackboxContext =>
+ self: blackbox.Context =>
/** Creates a unique string. */
@deprecated("Use freshName instead", "2.11.0")
@@ -5,11 +5,11 @@ package macros
/**
* <span class="badge badge-red" style="float: right;">EXPERIMENTAL</span>
*
- * A slice of [[scala.reflect.macros.BlackboxContext the Scala macros context]] that
+ * A slice of [[scala.reflect.macros.blackbox.Context the Scala macros context]] that
* exposes functions to parse strings with Scala code into trees.
*/
trait Parsers {
- self: BlackboxContext =>
+ self: blackbox.Context =>
/** Parses a string with a Scala expression into an abstract syntax tree.
* Only works for expressions, i.e. parsing a package declaration will fail.
Oops, something went wrong.

0 comments on commit 5cc8f83

Please sign in to comment.