| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|
|
|
|
|
|
|
| |
We got unbound symbols before because
a TreeTypeMap would copy a tree of an inline
DefDef but would not adapt the inline body
stored in the @inline annotation of the DefDef
to point to the updated tree.
|
|
|
|
|
|
| |
Add inline function parameters. The previous concept
of inlineable closure is adapted to coincide with
an inline function parameter.
|
|
|
|
|
|
|
|
| |
Pure expressions with function types now are considered
conforming. Necessitated a change in TreeInfo to accept
closures as pure expressions.
Test case in inlineForeach
|
|
|
|
|
| |
The body might still refer to an inline closure argument without
fully applying it. In that case the binding may not be dropped.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
An implicit method might be unpickled in one run and the implicit
body might be selected first in a subsequent run. In that case
the inlined code was read with the original context, but
that context needs to run at the current period. This resulted
in denotation out of date errors in bringForward.
Another problem with this design was space leaks: An context might
survive multiple runs as part of an ImplicitInfo of an unpickled
method.
The new design avoids both problems. Implicit contexts are always
up to date and leaks are avoided.
|
|
|
|
|
|
|
| |
Accessors were multiply generated under separate compilation.
To fix this, the resident body of an inlined function is now
the same as the inlined body. Both use accessors where necessary.
Previously, only the inlined body used accessors.
|
|
|
|
|
|
|
| |
`inline` is now a modifier keyword. To keep disruption tolerable,
we still allow `@inline` as an annotation as well. Other uses of
`inline` are supported only under `-language:Scala2` and are rewritten
to identifiers in backticks.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
This test works, but closures are not currently inlined.
That's a still to do.
|
| |
|
| |
|
|
|
|
| |
Also, do some refactorings and fix some bugs in Inliner.
|
|
|
|
| |
Same test with separate compilation is in inlinePower
|
| |
|
|
|
|
|
| |
Inline trees can now be read form TASTY. However, positions are not set
correctly. This remains to be implemented.
|
|
|
|
|
| |
pos/power inlines with alomst no extraneous boilerplate.
neg/power gives an error that maximal numbers of inlines was exceeded.
|
|
|
|
|
|
|
|
|
| |
... to tag inlined calls. Perform typings and transformations
of inlined calls in a context that refers to the INlined node
in its InlinedCall property.
The idea is that we can use this to issue better error
positions. This remains to be implemented.
|
|
|
|
|
| |
To be done: outer accessors
To be done: error positions
|
|
|
|
|
|
| |
`apply` nodes should not be inserted in the result parts
of a block, if-then-else, match, or try. Instead they should
be added to the surrounding statement.
|
|\
| |
| | |
Fixes for scala.Dynamic
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
|/
|
|
|
|
| |
The issue fixed here was introduced by 71027f15. The added `csyms.isEmpty` condition on `case nil =>` is always true, which is clearely a bug.
t1500c still fails with covariant (or contravariant) type parameters on `::`, but this seams to be a more complicated issue involving the typer.
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
If a super trait is given as a type (i.e. no argument list), implicit args were
not passed. This is fixed now. Also, we now check for parameterized traits lacking
type arguments in Typer instead of in Mixin.
Fixes #1444.
|
|\
| |
| | |
Fix desugaring of Bind(WILDCARD, _).
|
| | |
|
| |
| |
| |
| |
| |
| | |
Eta expansion yielded incorrect result if the eta expanded method
has more than one parameter sections and the expected result type
is a unary function type. In that case a postfix `_' needs to be appended.
|
|\ \
| |/
|/| |
Fix #1442: add new phase, SelectStatic
|
| |
| |
| |
| |
| |
| |
| | |
The new behaviour is more reasonable.
Now the module if forced consistently in both examples.
Note that this is deviation from behaviour of scalac.
|
|\ \
| |/
|/| |
Add arrays to collection strawman
|
| | |
|
| | |
|
| |
| |
| |
| |
| | |
Followinf @szeiger's suggestion, equip IndexView with
optimized operations for map/drop/take.
|
| |
| |
| |
| | |
This is achieved by putting it into a new trait, LinearSeqLike.
|
| |
| |
| |
| |
| |
| |
| | |
- Add proper :: to lists
- Move some methods to IterableOps in order to keep Iterable clean
- Rename knownLength to knownSize
- Add some implentations for performance and completeness
|
| |
| |
| |
| | |
Following the other colltests, put each in a separate package.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Test generated code before but fails with verify error at runtime.
Here's the message:
Exception in thread "main" java.lang.VerifyError: Bad type on operand stack
Exception Details:
Location:
D$.<init>()V @2: invokedynamic
Reason:
Type uninitializedThis (current frame, stack[1]) is not assignable to 'D$'
Current Frame:
bci: @2
flags: { flagThisUninit }
locals: { uninitializedThis }
stack: { uninitializedThis, uninitializedThis }
Bytecode:
0x0000000: 2a2a ba00 1f00 00b7 0022 2ab3 0024 b1
at Test$.main(t3048.scala:13)
at Test.main(t3048.scala)
With the fix in last commit, test causes backend to crash with
java.lang.AssertionError: assertion failed: val <none>
at scala.Predef$.assert(Predef.scala:165)
at scala.tools.nsc.backend.jvm.BCodeHelpers$BCInnerClassGen$class.assertClassNotArray(BCodeHelpers.scala:214)
at scala.tools.nsc.backend.jvm.BCodeHelpers$BCInnerClassGen$class.assertClassNotArrayNotPrimitive(BCodeHelpers.scala:219)
at scala.tools.nsc.backend.jvm.BCodeHelpers$BCInnerClassGen$class.getClassBTypeAndRegisterInnerClass(BCodeHelpers.scala:238)
at scala.tools.nsc.backend.jvm.BCodeSkelBuilder$PlainSkelBuilder.getClassBTypeAndRegisterInnerClass(BCodeSkelBuilder.scala:51)
at scala.tools.nsc.backend.jvm.BCodeHelpers$BCInnerClassGen$class.internalName(BCodeHelpers.scala:210)
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The closures generated by elimByName did not get the InSuperCall
flag set. This caused problems in lambda lift which led to a
verify error for the new version CollectionStrawMan6. That version
replaces explicit function parameters in class LazyList by
by-name parameters.
Also: Clarify logic for liftLocals in LambdaLift (liftLocals caused the immediate
problem but was in the end not to blame).
|
| |
| |
| |
| | |
Makes it clearer what it is. Also, fixed check file.
|