aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/util
Commit message (Collapse)AuthorAgeFilesLines
* Handle multiline messages in ConsoleReporterFelix Mulder2016-10-102-1/+12
|
* Add basic diffing for shown valuesFelix Mulder2016-10-101-3/+25
|
* Separate `ContextDocstrings` from `Context` and make it pluggableFelix Mulder2016-10-061-0/+7
|
* Move docstring cooking to dottyFelix Mulder2016-10-061-0/+232
|
* Merge pull request #1492 from dotty-staging/add-inlineGuillaume Martres2016-10-065-9/+29
|\ | | | | Implement inline
| * Add accessors for non-public members accessed from inline methodsMartin Odersky2016-10-021-1/+1
| | | | | | | | | | | | | | | | 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.
| * Make inline annotation @scala.inline.Martin Odersky2016-10-021-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * Inline key operations in dottyMartin Odersky2016-10-021-5/+12
| | | | | | | | | | Inlined operations are: Stats.track and all variants of Reporter.traceIndented.
| * Print inlining positions in error messagesMartin Odersky2016-10-021-1/+5
| | | | | | | | | | Error messages now print the inlined positions as well as the position of the inlined call, recursively.
| * Make Context#moreProperties strongly typedMartin Odersky2016-10-022-3/+11
| | | | | | | | To do this, factor out Key from Attachment into a new type, Property.Key.
| * First version of inline schemeMartin Odersky2016-10-021-0/+1
| | | | | | | | | | To be done: outer accessors To be done: error positions
* | honor -encoding compiler flag and defaultsMartijn Hoekstra2016-09-071-3/+4
|/ | | | | | | | | 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
* Fix #1405: Implement Xprint-diff without external libraries.Nicolas Stucki2016-08-241-25/+105
|
* -Xprint-diff-del: more meaningful colorsGuillaume Martres2016-07-261-6/+7
| | | | | 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.
* Fix #1312: Improve XprintNicolas Stucki2016-07-151-0/+66
| | | | | | | * 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.
* Add a `dotty-interfaces` packageGuillaume Martres2016-02-282-3/+10
| | | | | | | | | | | | | | | | | | | | | | 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).
* Small API changes in preparation for dotty-interfacesGuillaume Martres2016-02-252-7/+12
| | | | | | | - 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.
* Fix off by 2 error for symbol positionsMartin Odersky2015-12-221-1/+1
|
* More @sharable annotationsMartin Odersky2015-07-062-3/+4
| | | | | Also, some code movements in Names to make it more obvious that mutating operations are only called from synchronized blocks.
* Add @sharable annotationMartin Odersky2015-07-062-3/+4
| | | | | | | Add @sharable annotation for classes and vals that are presumed to be safely sharable between threads. Also: Document CtxLazy.
* Merge pull request #695 from dotty-staging/fix/source-positionsDmitry Petrashko2015-07-022-5/+16
|\ | | | | Avoid crasher when first token of a program is in error
| * Document that lines and columns start at 0.Martin Odersky2015-06-251-0/+4
| | | | | | | | And adjust for it in DottyBackendInterface
| * Make columns start at 0.Martin Odersky2015-06-251-4/+8
| | | | | | | | Lines already start at 0, so columns should, too.
| * Avoid crasher when first token of a program is in errorMartin Odersky2015-06-251-1/+4
| | | | | | | | | | This used to give a crash in SourcePositiom, promoted by feeding its calculations with a negative offset.
* | Rename SimpleMap#mapValues -> mapValuesNowMartin Odersky2015-06-231-7/+7
|/ | | | | The operation on SimpleMap is eager. As suggested by @retronym we should find a name different from the lazy Map#mapValues operation.
* Merge pull request #565 from retronym/topic/cleanupsDmitry Petrashko2015-05-151-1/+1
|\ | | | | Fix typos, scaladoc tags, and some minor code smells.
| * Correct a large number of typos.Jason Zaugg2015-05-141-1/+1
| | | | | | | | | | I scanned the main sources with IntellIJ's spell checker and corrected what showed up.
* | Do not depend on scala.collection.generic.Clearable in dotty.Dmitry Petrashko2015-05-152-1/+2
|/ | | | Makes bootstrap easier.
* Pickling modularization reorgMartin Odersky2015-05-021-1/+1
| | | | | | | 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.
* Add spaces around + in dotty source.Dmitry Petrashko2015-04-092-4/+4
|
* Remove trailing spaces in Dotty source.Dmitry Petrashko2015-04-092-7/+7
|
* Make all Dotty source files end in newline.Dmitry Petrashko2015-04-097-7/+7
|
* Make implicit conversion from Position to Coord work for NoPositionGuillaume Martres2015-03-251-1/+3
|
* Added testing hooks for unpicklerMartin Odersky2015-03-181-3/+11
| | | | New option -Ytest-pickler compares trees before and after pickling.
* Add hooks for unpickling positions to trees.Martin Odersky2015-03-181-0/+3
|
* Make bestFit work for partially filled arraysMartin Odersky2015-03-182-8/+6
|
* Fixed doc comment.Martin Odersky2015-02-101-1/+0
|
* Make line search logic in SourcePositions generally available.Martin Odersky2015-02-072-6/+36
| | | | Create an object Util for utility methods that are used in several places.
* Documentation and a bit of cleanup.Dmitry Petrashko2014-04-011-2/+2
| | | | | | Added documentation for non-trivial logic in Contexts, Phases and TreeTransforms. Removed redundant vars and casts
* Bullet-proofing companion objectsMartin Odersky2014-03-131-3/+3
| | | | | | | | | | | | 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.
* Fix of #50 - volatileMartin Odersky2014-03-091-2/+0
| | | | | | | | | | | | | | 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"?.
* Typos corrected.Dmitry Petrashko2014-03-034-4/+4
| | | | | More verbose assertions. Unnecessary semicolons removed.
* More informative asserts.Dmitry Petrashko2014-03-031-1/+1
|
* Misc performance improvements by eliminating stupid allocationsMartin Odersky2014-02-242-2/+2
| | | | | | - Avoid closure creation in Position. - Avoid creating debug string in SymDenotations - Avoid creating Flag translation tables in pickle buffers
* Resetting uniques and hashset reorg.Martin Odersky2014-02-242-50/+65
| | | | Uniques are now cleared after each run. Also, HashSets get a more standard API, without a label, but with configurable load factor.
* Performance improvement: Replace == with equals in util.HashTableMartin Odersky2014-02-211-3/+3
|
* Performance improvement in LRUCacheMartin Odersky2014-02-211-2/+2
| | | | Use eq for key comparisons in LRUCache.
* Fixed a bug in LRUcache which prevented sizes >= 8.Martin Odersky2014-02-122-2/+5
|
* Wrapped up definition of attachments.Martin Odersky2014-02-111-39/+62
|
* COnverted symOfTree and expandedTree to attachments.Martin Odersky2014-02-111-1/+11
|