Commit ce37ae4
blackbox and whitebox macros
This is the first commit in the series. This commit only:
1) Splits Context into BlackboxContext and WhiteboxContext
2) Splits Macro into BlackboxMacro and WhiteboxMacro
3) Introduces the isBundle property in the macro impl binding
Here we just teach the compiler that macros can now be blackbox and whitebox,
without actually imposing any restrictions on blackbox macros. These
restrictions will come in subsequent commits.
For description and documentation of the blackbox/whitebox separation
see the official macro guide at the scaladoc website:
http://docs.scala-lang.org/overviews/macros/blackbox-whitebox.html
Some infrastructure work to make evolving macros easier:
compile partest-extras with quick so they can use latest library/reflect/...1 parent beed168 commit ce37ae4
File tree
246 files changed
+788
-619
lines changed- src
- compiler/scala
- reflect/macros
- compiler
- contexts
- runtime
- util
- tools
- nsc/typechecker
- reflect
- partest-extras/scala/tools/partest
- reflect/scala/reflect
- api
- internal
- macros
- runtime
- test/files
- neg
- macro-abort
- macro-basic-mamdmi
- macro-cyclic
- macro-divergence-controlled
- macro-exception
- macro-false-deprecation-warning
- macro-invalidimpl
- macro-invalidret
- macro-invalidshape
- macro-invalidsig-params-badtype
- macro-invalidsig
- macro-invalidusage-badargs
- macro-invalidusage-badbounds
- macro-invalidusage-badtargs
- macro-invalidusage-methodvaluesyntax
- macro-invalidusage-nontypeable
- macro-invalidusage-presuper
- macro-noexpand
- macro-nontypeablebody
- macro-override-macro-overrides-abstract-method-a
- macro-override-macro-overrides-abstract-method-b
- macro-override-method-overrides-macro
- macro-quasiquotes
- macro-without-xmacros-a
- macro-without-xmacros-b
- t5753
- t5903a
- t5903b
- t5903c
- t5903d
- t5903e
- t6123-explaintypes-macros
- t6539
- t7157
- pos
- annotated-original
- annotated-treecopy
- attachments-typed-another-ident
- attachments-typed-ident
- t5692a
- t5692b
- t5744
- t6485a
- t6485b
- t7377
- t7461
- run
- macro-abort-fresh
- macro-auto-duplicate
- macro-basic-ma-md-mi
- macro-basic-ma-mdmi
- macro-basic-mamd-mi
- macro-bodyexpandstoimpl
- macro-bundle-static
- macro-bundle-toplevel
- macro-def-infer-return-type
- macro-def-path-dependent
- macro-divergence-spurious
- macro-duplicate
- macro-enclosures
- macro-expand-implicit-argument
- macro-expand-implicit-macro-has-implicit
- macro-expand-implicit-macro-is-implicit
- macro-expand-implicit-macro-is-val
- macro-expand-implicit-macro-is-view
- macro-expand-multiple-arglists
- macro-expand-nullary-generic
- macro-expand-nullary-nongeneric
- macro-expand-overload
- macro-expand-override
- macro-expand-recursive
- macro-expand-tparams-bounds
- macro-expand-tparams-explicit
- macro-expand-tparams-implicit
- macro-expand-tparams-prefix
- macro-expand-unapply-a
- macro-expand-varargs-explicit-over-nonvarargs-bad
- macro-expand-varargs-explicit-over-nonvarargs-good
- macro-expand-varargs-explicit-over-varargs
- macro-expand-varargs-implicit-over-nonvarargs
- macro-expand-varargs-implicit-over-varargs
- macro-impl-default-params
- macro-impl-relaxed
- macro-impl-rename-context
- macro-impl-tparam-only-in-impl
- macro-impl-tparam-typetag-is-optional
- macro-invalidret-doesnt-conform-to-def-rettype
- macro-invalidret-nontypeable
- macro-invalidusage-badret
- macro-invalidusage-partialapplication-with-tparams
- macro-invalidusage-partialapplication
- macro-openmacros
- macro-parse-position
- macro-quasiinvalidbody-c
- macro-quasiquotes
- macro-range
- macro-reflective-ma-normal-mdmi
- macro-reflective-mamd-normal-mi
- macro-reify-basic
- macro-reify-freevars
- macro-reify-nested-a
- macro-reify-nested-b
- macro-reify-ref-to-packageless
- macro-reify-splice-outside-reify
- macro-reify-splice-splice
- macro-reify-staticXXX
- macro-reify-tagful-a
- macro-reify-tagless-a
- macro-reify-type
- macro-reify-unreify
- macro-settings
- macro-sip19-revised
- macro-sip19
- macro-term-declared-in-annotation
- macro-term-declared-in-anonymous
- macro-term-declared-in-block
- macro-term-declared-in-class-class
- macro-term-declared-in-class-object
- macro-term-declared-in-class
- macro-term-declared-in-default-param
- macro-term-declared-in-implicit-class
- macro-term-declared-in-method
- macro-term-declared-in-object-class
- macro-term-declared-in-object-object
- macro-term-declared-in-object
- macro-term-declared-in-package-object
- macro-term-declared-in-refinement
- macro-term-declared-in-trait
- macro-typecheck-implicitsdisabled
- macro-typecheck-macrosdisabled2
- macro-typecheck-macrosdisabled
- macro-undetparams-consfromsls
- macro-undetparams-macroitself
- macro-vampire-false-warning
- t5713
- t5753_1
- t5753_2
- t5903a
- t5903b
- t5903c
- t5903d
- t5923a
- t5923c
- t5923d
- t6221
- t6394a
- t6394b
- t6662
- t7008-scala-defined
- t7008
- t7047
- t7157
- t7240
- t7375b
- t7617a
- t7617b
- t7657
- typed-annotated
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
246 files changed
+788
-619
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1406 | 1406 | | |
1407 | 1407 | | |
1408 | 1408 | | |
1409 | | - | |
1410 | | - | |
1411 | | - | |
1412 | | - | |
1413 | | - | |
1414 | | - | |
1415 | | - | |
1416 | 1409 | | |
1417 | 1410 | | |
1418 | 1411 | | |
| |||
1504 | 1497 | | |
1505 | 1498 | | |
1506 | 1499 | | |
1507 | | - | |
1508 | | - | |
1509 | | - | |
1510 | | - | |
| 1500 | + | |
| 1501 | + | |
| 1502 | + | |
| 1503 | + | |
| 1504 | + | |
| 1505 | + | |
| 1506 | + | |
| 1507 | + | |
1511 | 1508 | | |
1512 | 1509 | | |
1513 | 1510 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
| 36 | + | |
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| |||
Lines changed: 9 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | 18 | | |
23 | 19 | | |
24 | 20 | | |
| |||
44 | 40 | | |
45 | 41 | | |
46 | 42 | | |
47 | | - | |
| 43 | + | |
48 | 44 | | |
49 | 45 | | |
50 | 46 | | |
51 | 47 | | |
52 | 48 | | |
53 | 49 | | |
54 | | - | |
| 50 | + | |
55 | 51 | | |
56 | 52 | | |
57 | 53 | | |
58 | 54 | | |
59 | 55 | | |
60 | 56 | | |
61 | 57 | | |
62 | | - | |
| 58 | + | |
| 59 | + | |
63 | 60 | | |
64 | 61 | | |
65 | 62 | | |
| |||
88 | 85 | | |
89 | 86 | | |
90 | 87 | | |
91 | | - | |
| 88 | + | |
92 | 89 | | |
93 | 90 | | |
94 | 91 | | |
95 | 92 | | |
96 | | - | |
97 | | - | |
98 | | - | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
99 | 97 | | |
Lines changed: 9 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | | - | |
53 | | - | |
| 52 | + | |
| 53 | + | |
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| |||
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
96 | | - | |
| 96 | + | |
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
101 | | - | |
| 101 | + | |
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
108 | | - | |
109 | | - | |
| 108 | + | |
| 109 | + | |
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
| |||
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
126 | | - | |
| 126 | + | |
| 127 | + | |
127 | 128 | | |
128 | 129 | | |
129 | 130 | | |
| |||
145 | 146 | | |
146 | 147 | | |
147 | 148 | | |
| 149 | + | |
148 | 150 | | |
149 | 151 | | |
150 | 152 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | | - | |
| 48 | + | |
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| |||
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
527 | 527 | | |
528 | 528 | | |
529 | 529 | | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
530 | 533 | | |
531 | 534 | | |
532 | 535 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1147 | 1147 | | |
1148 | 1148 | | |
1149 | 1149 | | |
1150 | | - | |
| 1150 | + | |
1151 | 1151 | | |
1152 | 1152 | | |
1153 | 1153 | | |
| |||
0 commit comments