Skip to content

Add transparent methods - untyped trees version #4616

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 62 commits into from
Jul 26, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
bba562a
Functional Typelevel Programming in Scala
odersky Jul 18, 2018
8b70e37
Update section on transparent values
odersky Jul 18, 2018
44a5de1
Introduce UntypedSplice
odersky Jul 18, 2018
9d7fff9
Untasty trees
odersky Jul 18, 2018
f8f82e1
Dual purpose inliner
odersky Jul 18, 2018
34bc5c4
Pretype nested transparent applications
odersky Jul 18, 2018
d7a3430
Better error position when inline call limit exceeded
odersky Jul 18, 2018
097043f
Some refactorings to Inliner and Typer
odersky Jul 18, 2018
4aeeed6
Reduce projections of data type fields in inliner
odersky Jul 18, 2018
5896f28
Replace inlined pure constant expressions by literals
odersky Jul 18, 2018
dc5c3a0
Refine handling of result types of transparent methods
odersky Jul 18, 2018
de8f2fd
Don't drop impure arguments when reducing projections
odersky Jul 18, 2018
632abc1
Exclude members of Predef from implicit inline environment
odersky Jul 18, 2018
cbb7573
Inline -> Transparent
odersky Jul 18, 2018
b7f8302
Consolidate InlineTyper
odersky Jul 18, 2018
67e9fef
Split PrepareTransparent off Inliner
odersky Jul 18, 2018
8e5eaca
Don't add extra bindings for own implicit parameters in inlineable code
odersky Jul 18, 2018
8fe1a0e
Traverse all of bindings to compute reference counts of bindings
odersky Jul 18, 2018
812d22d
Two fixes to pickling and unpickling of untyped trees
odersky Jul 18, 2018
bdf2b54
Adapt transparent value checking to new restrictions
odersky Jul 18, 2018
b666323
Fix types of implicit definitions in transparent closure
odersky Jul 18, 2018
a125c67
Refactor Inliner
odersky Jul 18, 2018
e96c20f
Support transparent matches with simple typed patterns
odersky Jul 18, 2018
a019a4e
Enforce restrictions on typelevel methods
odersky Jul 18, 2018
31f6db7
Match bindings should go with inlined body
odersky Jul 18, 2018
7f48ed1
Refinements to erased
odersky Jul 18, 2018
19aa394
Compute gadt context when reducing matches
odersky Jul 18, 2018
dd29dc6
Wait until PostTyper before eliminating erased arguments
odersky Jul 18, 2018
25a2cc9
Fix return type of defaultValue in typelevel.md
odersky Jul 18, 2018
1f12ce2
Reorganize labeling of toplevel matches
odersky Jul 18, 2018
33e60bc
Implement implicit match expressions
odersky Jul 18, 2018
8d03e44
Fix test
odersky Jul 18, 2018
9bee4c0
Keep track of positions for inlined arguments
odersky Jul 18, 2018
dea6772
Reset Config option.
odersky Jul 18, 2018
6f65a20
Implement restrections where an implicit match can appear
odersky Jul 18, 2018
e78fc79
Bump Tasty format major version
odersky Jul 18, 2018
cd87085
Address reviewers comments
odersky Jul 18, 2018
3b98431
Refine implicit match checking
odersky Jul 18, 2018
4b7a240
Doc fix
odersky Jul 19, 2018
e4a7e60
Explain rewrite rules and fix implementation to conform
odersky Jul 19, 2018
22d6f66
Drop redundant test
odersky Jul 20, 2018
59ede6d
Handle nested transparent methods
odersky Jul 20, 2018
2336ae1
Handle constant literals in toplevel matches
odersky Jul 20, 2018
ed7f10c
Refined rules for overriding of typelevel methods
odersky Jul 20, 2018
dbaf124
Address review comments
odersky Jul 22, 2018
44feda7
Fix test
odersky Jul 22, 2018
57853b0
Merge TypeLevel and Erased Flags
odersky Jul 23, 2018
0b7710a
Merge IsInstanceOfChecker and TypeTestsCasts
odersky Jul 23, 2018
beca150
Fix inlining of right-associative transparent methods
odersky Jul 24, 2018
39cd368
Make Transparent method imply Erased
odersky Jul 24, 2018
5d84486
Use ??? instead of defaultValue for erased code
odersky Jul 24, 2018
1112b5e
Enter implicit scrutinee
odersky Jul 24, 2018
1e9e474
Renaming
odersky Jul 24, 2018
e486384
Treat @forceInline specially.
odersky Jul 24, 2018
33523d1
Redo transparent overloading resolution also for Idents as refs
odersky Jul 24, 2018
43f4b55
New test and drop println
odersky Jul 24, 2018
bf5e9c8
Reclassify test
odersky Jul 24, 2018
101daf5
Improvements to Inliner
odersky Jul 25, 2018
52e0560
Fix #4557 rework: Keep original type untpd.New
odersky Jul 26, 2018
d827f65
Fix FromTasty tests
odersky Jul 26, 2018
3bee284
Fix FromSymbol.classDef
odersky Jul 26, 2018
88e7d18
Update check file
odersky Jul 26, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Refactor Inliner
Several refactorings for clarity and legibility; no change in functionality.
  • Loading branch information
odersky committed Jul 26, 2018
commit a125c67e1e41305f5e69b48d8abce4c17736e122
5 changes: 4 additions & 1 deletion compiler/src/dotty/tools/dotc/core/Decorators.scala
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,10 @@ object Decorators {
}

implicit class genericDeco[T](val x: T) extends AnyVal {
def reporting(op: T => String): T = { println(op(x)); x }
def reporting(op: T => String, printer: config.Printers.Printer = config.Printers.default): T = {
printer.println(op(x))
x
}
def assertingErrorsReported(implicit ctx: Context): T = {
assert(ctx.reporter.errorsReported)
x
Expand Down
Loading