-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Redesign Tuples with HList-like structure #2199
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
Changes from 1 commit
e1ef43d
00044b6
1c0a088
adb13ac
9f4fca6
69a402a
4058a9c
22ffef2
0e477a0
491947a
6c92389
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,8 +30,6 @@ object Names { | |
def toTermName: TermName | ||
} | ||
|
||
implicit def eqName: Eq[Name, Name] = Eq | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same remark as for Denotations applies: Please don't remove multiversal equality markers. |
||
|
||
/** A name is essentially a string, with three differences | ||
* 1. Names belong in one of two name spaces: they are type names or term names. | ||
* Term names have a sub-category of "local" field names. | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -379,8 +379,6 @@ trait Symbols { this: Context => | |
|
||
object Symbols { | ||
|
||
implicit def eqSymbol: Eq[Symbol, Symbol] = Eq | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ditto |
||
|
||
/** A Symbol represents a Scala definition/declaration or a package. | ||
* @param coord The coordinates of the symbol (a position or an index) | ||
* @param id A unique identifier of the symbol (unique per ContextBase) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,8 +41,6 @@ object Types { | |
|
||
@sharable private var nextId = 0 | ||
|
||
implicit def eqType: Eq[Type, Type] = Eq | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ditto |
||
|
||
/** Main class representing types. | ||
* | ||
* The principal subclasses and sub-objects are as follows: | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -349,7 +349,8 @@ class LazyVals extends MiniPhaseTransform with IdentityDenotTransformer { | |
// compute or create appropriate offsetSymol, bitmap and bits used by current ValDef | ||
appendOffsetDefs.get(claz) match { | ||
case Some(info) => | ||
val flagsPerLong = (64 / dotty.runtime.LazyVals.BITS_PER_LAZY_VAL).toInt | ||
val BITS_PER_LAZY_VAL = 2L // To be kept in sync with dotty.runtime.LazyVals.BITS_PER_LAZY_VAL | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This seems to be a big step back to me. |
||
val flagsPerLong = (64 / BITS_PER_LAZY_VAL).toInt | ||
info.ord += 1 | ||
ord = info.ord % flagsPerLong | ||
val id = info.ord / flagsPerLong | ||
|
@@ -400,14 +401,15 @@ class LazyVals extends MiniPhaseTransform with IdentityDenotTransformer { | |
object LazyVals { | ||
object lazyNme { | ||
object RLazyVals { | ||
import dotty.runtime.LazyVals._ | ||
val get = Names.get.toTermName | ||
val setFlag = Names.setFlag.toTermName | ||
val wait4Notification = Names.wait4Notification.toTermName | ||
val state = Names.state.toTermName | ||
val cas = Names.cas.toTermName | ||
val getOffset = Names.getOffset.toTermName | ||
// To be kept in sync with dotty.runtime.LazyVals.Names._ | ||
val cas = "CAS".toTermName | ||
val get = "get".toTermName | ||
val getOffset = "getOffset".toTermName | ||
val setFlag = "setFlag".toTermName | ||
val state = "STATE".toTermName | ||
val wait4Notification = "wait4Notification".toTermName | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same thing. Sorry, but this is crazy. |
||
|
||
val flag = "flag".toTermName | ||
val result = "result".toTermName | ||
val value = "value".toTermName | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why was this removed? Do we really want to compare denotations with arbitrary types for equality? This is dangerous as it is all too easy to compare a symbol with a denotation and get constant false!