| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|\
| |
| | |
even more cleanup in Macros.scala
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Error reporting is moved to ContextErrors to disentangle stuff in Macros.scala.
With logics and error reporting intertwined it was an awful mess.
Exceptions are used for the same reason. Instead of threading failures through
the code polluting it with options/ifs, I outline the success path.
It worked much better for typedMacroBody, but I'm also happy with the resulting
code of macroExpand. To me a major factor towards applicability of exceptions
was that they are short-lived and that there might be max one error per domain,
after which we unconditionally bail.
|
|\ \
| | |
| | | |
Fix for community build blocker.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
As two character bugfixes go, this was a doozy.
I will forego elaborating at length and offer generic
instructions for elucidation:
% git log --grep=tpeHK
|
|\ \ \
| |/ /
|/| | |
SI-5788 correct test and symbol update
|
|/ /
| |
| |
| |
| |
| | |
Previously I thought it's fixed because I didn't include the correct
testcase. Now it's the correct testcase and this prompted me to
change the code a bit to make it work properly.
|
|\ \
| | |
| | | |
Use rawflags for checking FINAL flag.
|
| | |
| | |
| | |
| | | |
Partially reverts 18efdedfb97de7ca9f6
|
|\ \ \
| |_|/
|/| | |
Restored lastNoSuccess to Parsers.
|
|/ /
| |
| |
| | |
It was in 2.9.2 and can't be removed without deprecation.
|
|\ \
| | |
| | | |
more cleanup in Macros.scala
|
| | | |
|
| | | |
|
| |/ |
|
|\ \
| | |
| | | |
Topic/substmap210
|
| |/
| |
| |
| |
| |
| |
| |
| | |
Don't create a new type with the same symbol. This
modification avoids the creation of 30K types and a
similar number of symbols in a compile of trunk.
Also cleaned up / deprecated a couple other type mappers.
|
|\ \
| | |
| | | |
Hunting down eliminable :: allocations.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
With this commit, the number of :: allocations logged in total
after individually compiling each scala file in src/compiler
drops from 190,766,642 to 170,679,925. Twenty million fewer
colon-colons in the world, it's a start.
For some heavily used lists like List(List()) I made vals so
we can reuse the same one every time, e.g.
val ListOfNil = List(Nil)
The modifications in this patch were informed by logging call
frequency to List.apply and examining the heaviest users.
>> Origins tag 'listApply' logged 3041128 calls from 318 distinguished sources.
1497759 scala.reflect.internal.Definitions$ValueClassDefinitions$class.ScalaValueClasses(Definitions.scala:149)
173737 scala.reflect.internal.Symbols$Symbol.alternatives(Symbols.scala:1525)
148642 scala.tools.nsc.typechecker.SuperAccessors$SuperAccTransformer.transform(SuperAccessors.scala:306)
141676 scala.tools.nsc.transform.SpecializeTypes$$anonfun$scala$tools$nsc$transform$SpecializeTypes$$specializedOn$3.apply(SpecializeTypes.scala:114)
69049 scala.tools.nsc.transform.LazyVals$LazyValues$$anonfun$1.apply(LazyVals.scala:79)
62854 scala.tools.nsc.transform.SpecializeTypes.specializedTypeVars(SpecializeTypes.scala:427)
54781 scala.tools.nsc.typechecker.SuperAccessors$SuperAccTransformer.transform(SuperAccessors.scala:293)
54486 scala.reflect.internal.Symbols$Symbol.newSyntheticValueParams(Symbols.scala:334)
53843 scala.tools.nsc.backend.icode.Opcodes$opcodes$CZJUMP.<init>(Opcodes.scala:562)
... etc.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
In separate compilation runs, the static field symbol in the
companion class of an object was not being recreated.
Given that the singleton object was compiled separately,
the static field symbol will be recreated on demand.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Disable @static for the REPL code.
The problem is that there are no companion classes generated for objects
that contain the top-level declarations in the REPL.
When there is no companion class, the selecting a @static field will translate
to a getter call, instead of to a field load.
|
|\ \ \
| |/ /
|/| | |
Absolutize tools.nsc => scala.tools.nsc.
|
|/ /
| |
| |
| |
| |
| | |
Relative references to scala.tools which omit the "scala"
are uncompilable by themselves if you happen to have a directory
called "tools" which shadows scala/tools. As we do in trunk.
|
|\ \
| |/
|/| |
Fix SI-6208. mutable.Queue now returns mutable.Queue for collection met...
|
| |
| |
| |
| | |
rather than MutableList.
|
|\ \
| | |
| | | |
Fixes backend crash due to incorrect consumedTypes
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This started out as a compiler crash after Greg copied the
comprehension methods to List and made them final.
The culprit was the dead code elimination phase, which after
sweeping pieces of code was unable to restore the stack to its
original state, thus causing the ASM backend to crash notifying
the resulting bytecode is incorrect.
The dead code elimination phase uses the icode Instructions'
consumedTypes to determine what needs to be dropped from the
stack when an instruction is eliminated, but the consumedTypes
were only defined for a handful of instructions. So dce encountered
a DUP instruction for which it did not have consumedTypes defined
and did not restore the stack correctly.
The consumedTypes/producedTypes for icode instructions are
redundantly defined in 3 separate places:
- Opcodes.scala (consumedTypes/producedTypes)
- ICodeCheckers.scala (for checking icode)
- TypeFlowAnalysis.scala (for computing types on the stack at each
program point)
Since the Opcodes types are the only ones visible outside, I suggest
we use them in ICodeCheckers.scala and TypeFlowAnalysis.scala too. But
we should make such changes after the release, as we're chilling out
by the lake with a glass of good wine: SI-6234
The relevant discussion around it can be found at:
https://groups.google.com/forum/?fromgroups#!topic/scala-internals/qcyTjk8euUI[1-25]
Many thanks to Paul for his help!
Review by @magarciaEPFL or @paulp.
|
|\ \ \
| | | |
| | | | |
cleanup of reflection and macros
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | | |
We no longer have multiple canonical signatures for macro implementations,
so it was time to put the List-List-List-based logic to rest.
|
| | | | |
|
| | | |
| | | |
| | | |
| | | | |
Simplifies this expression found in Typers to just phase.erasedTypes.
|
| | | |
| | | |
| | | |
| | | |
| | | | |
Previously these guys were coupled in a single method. Now they are separated.
In my opinion that helps understanding the stuff going on in implicit search.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
mostly removes [Eugene] marks that I left back then and reviews related code
some of those tokens got left in place, because I don't know to how fix them
without imposing risks on 2.10.0
|
| |/ /
| | |
| | |
| | |
| | | |
Present in http://www.slideshare.net/VladUreche/scaladoc-reflection
but not actually implemented in the ant task. Seems to be overlooked.
|
|\ \ \
| | | |
| | | | |
SI-6167 Override SeqLike#isEmpty for better performance
|
| |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This results in a faster Vector#isEmpty (and head, tail, last, init)
because it avoids building a VectorIterator just to check if
iterator.hasNext is false.
Other classes which have not overridden the implementation of SeqLike
also benefit from it.
|
|\ \ \
| |/ /
|/| | |
Introduces the `isArtifact` test for symbols
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This test is necessary in the API to tell apart useful synthetic symbols
(such as accessors) and low-level compilation artifacts (such as $outer).
However `isHidden` (as it's currently named in the compiler) is too generic.
Hence I renamed it along with the corresponding flag. Now the test says
`isArtifact` and the flag is named ARTIFACT.
Despite being an improvement over the first version, `isArtifact` is
still a bit unlucky. The name I like is `isImplementationArtifact`, but that's
a mouthful to be used in compiler hacking. Moreover, IMPLEMENTATION_ARTIFACT
looks weird.
For a discussion about related stuff see:
http://groups.google.com/group/scala-internals/browse_thread/thread/d04e762127737968
https://github.com/scala/scala/pull/1114
|
|\ \ \
| | | |
| | | | |
.ensime template for compiler development
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Provides a template of an .ensime file to be used for compiler hacking
together with an ENSIME-enabled text editor.
Also includes a readme that outlines what editors support ENSIME.
To the best of my knowledge these are Emacs, TextMate, jEdit and Sublime Text 2
|
|\ \ \ \
| | | | |
| | | | | |
Add Scaladoc flag to specify hidden implicit conversions
|
| | | | | |
|
|\ \ \ \ \
| |/ / / /
|/| | | | |
patmat tweaks: compiler performance, better error on unsupported pattern
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
instead, use a recursion counter in negationNormalForm as in conjunctiveNormalForm
(except we only limit recursion depth, not formula-size
reuse the same config variable in hopes it'll do for both)
|
| | | | | |
|