| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
| |
|
|\
| |
| | |
Implement inline
|
| |
| |
| |
| |
| |
| |
| |
| | |
This makes existsing uses of inline mostly compile.
Todo: Verify that stdlib can be compiled.
Todo: Implement accessors for assignments to priavte variables
Todo: Figure out what to do with accesses to private types.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Drop @dotty.annotation.inline. This will inline all
@inline marked methods in Scala for which a body is known
(i.e. that are either compiled in the same run or have Tasty
trees available).
Option -Yno-inline suppresses inlining. This is needed for
the moment because some @inline methods access private members
or members that are otherwise inaccessible at the call-site.
Also fixes some problems in Inliner
- make sure type arguments to inline calls re fully defined
- don't forget recursive calls in typeMap
- don't forget positions in treeMap
- drop dead code dealing with outer.
|
| |
| |
| |
| |
| | |
Inlined operations are: Stats.track and all variants
of Reporter.traceIndented.
|
| |
| |
| |
| |
| | |
Error messages now print the inlined positions as well
as the position of the inlined call, recursively.
|
| |
| |
| |
| | |
To do this, factor out Key from Attachment into a new type, Property.Key.
|
| |
| |
| |
| |
| | |
To be done: outer accessors
To be done: error positions
|
|/
|
|
|
|
|
|
|
| |
rename test/pos/valueclasses to pos_valueclasses
tests/pos/valueclasses generates a valueclasses.flags
file in /tests/partest-generated/pos that conflicts
with the valueClasses.flags file that
tests/neg/valueClasses.scala tries to create
|
| |
|
|
|
|
|
| |
When a line is modified, show the deleted part in red and the added part
in green instead of using magenta and yellow which are confusing.
|
|
|
|
|
|
|
| |
* Do not reprint a tree that has not changed.
* Highlight changes with yellow and insertions in green.
* -Xprint-diff-del: Inserts the deleted parts of the tree in red
and the parts that where changed in magenta.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We introduce a new entry point for the compiler in
`dotty.tools.dotc.Driver`:
```
def process(args: Array[String], simple: interfaces.SimpleReporter,
callback: interfaces.CompilerCallback): interfaces.ReporterResult
```
Except for `args` which is just an array, the argument types and return
type of this method are Java interfaces defined in a new package called
`dotty-interfaces` which has a stable ABI. This means that you can
programmatically run a compiler with a custom reporter and callbacks
without having to recompile it against every version of dotty: you only
need to have `dotty-interfaces` present at compile-time and call the
`process` method using Java reflection.
See `test/test/InterfaceEntryPointTest.scala` for a concrete example.
This design is based on discussions with the IntelliJ IDEA Scala plugin
team. Thanks to Nikolay Tropin for the discussions and his PR
proposal (see #1011).
|
|
|
|
|
|
|
| |
- Rename Diagnostic#msg to message, this is nicer for a public API
- Rename SourceFile#lineContents and SourcePosition#lineContents
to lineContent, the former is not grammatically correct.
- Add some convenience methods to SourcePosition.
|
| |
|
|
|
|
|
| |
Also, some code movements in Names to make it more obvious that mutating operations
are only called from synchronized blocks.
|
|
|
|
|
|
|
| |
Add @sharable annotation for classes and vals that are presumed
to be safely sharable between threads.
Also: Document CtxLazy.
|
|\
| |
| | |
Avoid crasher when first token of a program is in error
|
| |
| |
| |
| | |
And adjust for it in DottyBackendInterface
|
| |
| |
| |
| | |
Lines already start at 0, so columns should, too.
|
| |
| |
| |
| |
| | |
This used to give a crash in SourcePositiom, promoted by feeding
its calculations with a negative offset.
|
|/
|
|
|
| |
The operation on SimpleMap is eager. As suggested by @retronym we should
find a name different from the lazy Map#mapValues operation.
|
|\
| |
| | |
Fix typos, scaladoc tags, and some minor code smells.
|
| |
| |
| |
| |
| | |
I scanned the main sources with IntellIJ's spell checker and
corrected what showed up.
|
|/
|
|
| |
Makes bootstrap easier.
|
|
|
|
|
|
|
| |
The pickling package got rather large and confusing with three
separate tasks that each had their own conventions: read JVM classfiles,
read Scala2 pickle info, read Tasty. The classes for each task are now in
separate packages.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
New option -Ytest-pickler compares trees before and after pickling.
|
| |
|
| |
|
| |
|
|
|
|
| |
Create an object Util for utility methods that are used in several places.
|
|
|
|
|
|
| |
Added documentation for non-trivial logic in Contexts, Phases and
TreeTransforms.
Removed redundant vars and casts
|
|
|
|
|
|
|
|
|
|
|
|
| |
Companion class/module computations now also work for local classes and modules. For this to work,
either one of two conditions must be met: (1) some enclosing context refers to a scope that
contains the companions. (2) the context's compilation unit has a typed tree that contains the
companions. (1) is usually true when type-checking, (2) when transforming trees.
Local companions are searched as follows: If (2) holds, we locate the statement sequence containing
the companions by searching down from the root stored in the compilation unit. Otherwise, we search
outwards in the enclosing contexts for a scope containing the
companions.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Volatile checking needs to take all intersections into account; previously these
could be discarded through needsChecking.
Plus several refactorings and additions.
1) Module vals now have Final and Stable flags set
2) All logic around isVolatile is now in TypeOps; some of it was moved from Types.
3) Added stability checking to Select and SelectFromType typings.
Todo: We should find a better name for isVolatile. Maybe define the negation instead under the name
"isRealizable"?.
|
|
|
|
|
| |
More verbose assertions.
Unnecessary semicolons removed.
|
| |
|
|
|
|
|
|
| |
- Avoid closure creation in Position.
- Avoid creating debug string in SymDenotations
- Avoid creating Flag translation tables in pickle buffers
|
|
|
|
| |
Uniques are now cleared after each run. Also, HashSets get a more standard API, without a label, but with configurable load factor.
|
| |
|
|
|
|
| |
Use eq for key comparisons in LRUCache.
|
| |
|
| |
|
| |
|