mirror of
https://github.com/enso-org/enso.git
synced 2024-12-23 22:01:42 +03:00
Generate UUIDs on demand (#8728)
Trying to avoid expensive `UUID.randomUUID()` unless we reallly need it. Closes #8716. # Important Notes Some improvement: ![Screenshot from 2024-01-11 15-16-10](https://github.com/enso-org/enso/assets/292128/d8800490-6676-4b71-b178-7ce2e79942e5) FWIW Total Time for a Hello World example Before ![Screenshot from 2024-01-12 17-45-56](https://github.com/enso-org/enso/assets/292128/c0bfe7c5-c0a5-4375-8dd9-afb0714ae6c4) After ![Screenshot from 2024-01-12 17-46-13](https://github.com/enso-org/enso/assets/292128/ea76c413-018f-4b67-9777-85378eb38210) Memory usage Before ![Screenshot from 2024-01-12 17-54-54](https://github.com/enso-org/enso/assets/292128/280b1eff-e019-4241-a2a1-07445949d285) After ![Screenshot from 2024-01-12 17-54-36](https://github.com/enso-org/enso/assets/292128/b6524c8b-2a38-4e51-85eb-63142420f2ff)
This commit is contained in:
parent
972b359789
commit
5b91f16498
@ -413,7 +413,7 @@ case object AliasAnalysis extends IRPass {
|
||||
Occurrence.Def(
|
||||
occurrenceId,
|
||||
name.name,
|
||||
binding.getId,
|
||||
binding.getId(),
|
||||
binding.getExternalId,
|
||||
isSuspended
|
||||
)
|
||||
@ -525,7 +525,7 @@ case object AliasAnalysis extends IRPass {
|
||||
val definition = Graph.Occurrence.Def(
|
||||
occurrenceId,
|
||||
selfName.name,
|
||||
arg.getId,
|
||||
arg.getId(),
|
||||
arg.getExternalId
|
||||
)
|
||||
scope.addDefinition(definition)
|
||||
@ -557,7 +557,7 @@ case object AliasAnalysis extends IRPass {
|
||||
val definition = Graph.Occurrence.Def(
|
||||
occurrenceId,
|
||||
name.name,
|
||||
arg.getId,
|
||||
arg.getId(),
|
||||
arg.getExternalId,
|
||||
susp
|
||||
)
|
||||
|
@ -1,7 +1,6 @@
|
||||
package org.enso.compiler.pass.desugar
|
||||
|
||||
import org.enso.compiler.context.{FreshNameSupply, InlineContext, ModuleContext}
|
||||
import org.enso.compiler.core.IR
|
||||
import org.enso.compiler.core.ir.{
|
||||
CallArgument,
|
||||
DefinitionArgument,
|
||||
@ -412,7 +411,7 @@ case object LambdaShorthandToLambda extends IRPass {
|
||||
)
|
||||
|
||||
val lambdaArg = DefinitionArgument.Specified(
|
||||
scrutineeName.copy(id = IR.randomId),
|
||||
scrutineeName.copy(id = null),
|
||||
None,
|
||||
None,
|
||||
suspended = false,
|
||||
|
@ -88,7 +88,7 @@ trait IRUtils {
|
||||
for {
|
||||
metadata <- ir.getMetadata(DataflowAnalysis)
|
||||
key = DataflowAnalysis.DependencyInfo.Type
|
||||
.Static(literal.getId, literal.getExternalId)
|
||||
.Static(literal.getId(), literal.getExternalId)
|
||||
dependents <- metadata.dependents.get(key)
|
||||
} yield {
|
||||
dependents
|
||||
|
@ -384,7 +384,7 @@ final class EnsureCompiledJob(
|
||||
_
|
||||
) =>
|
||||
DataflowAnalysis.DependencyInfo.Type.Static(
|
||||
err.getId,
|
||||
err.getId(),
|
||||
err.getExternalId
|
||||
)
|
||||
}
|
||||
|
@ -100,13 +100,8 @@ public interface IR extends Serializable {
|
||||
*
|
||||
* @return the node's identifier
|
||||
*/
|
||||
default @Identifier UUID getId() {
|
||||
return id();
|
||||
}
|
||||
|
||||
/** A unique identifier for a piece of IR. */
|
||||
@Identifier
|
||||
UUID id();
|
||||
UUID getId();
|
||||
|
||||
/** Storage for compiler diagnostics related to the IR node. */
|
||||
DiagnosticStorage diagnostics();
|
||||
|
@ -1,7 +1,6 @@
|
||||
package org.enso.compiler.core.ir
|
||||
|
||||
import org.enso.compiler.core.{IR, Identifier}
|
||||
import org.enso.compiler.core.IR.randomId
|
||||
import org.enso.compiler.core.Implicits.{ShowPassData, ToStringHelper}
|
||||
|
||||
import java.util.UUID
|
||||
@ -49,8 +48,8 @@ object CallArgument {
|
||||
passData: MetadataStorage = new MetadataStorage(),
|
||||
diagnostics: DiagnosticStorage = DiagnosticStorage()
|
||||
) extends CallArgument
|
||||
with IRKind.Primitive {
|
||||
var id: UUID @Identifier = randomId
|
||||
with IRKind.Primitive
|
||||
with LazyId {
|
||||
|
||||
/** Creates a copy of `this`.
|
||||
*
|
||||
@ -110,7 +109,7 @@ object CallArgument {
|
||||
if (keepMetadata) passData.duplicate else new MetadataStorage(),
|
||||
diagnostics =
|
||||
if (keepDiagnostics) diagnostics.copy else DiagnosticStorage(),
|
||||
id = if (keepIdentifiers) id else randomId
|
||||
id = if (keepIdentifiers) id else null
|
||||
)
|
||||
|
||||
/** @inheritdoc */
|
||||
|
@ -2,7 +2,6 @@ package org.enso.compiler.core.ir
|
||||
|
||||
import org.enso.compiler.core.Implicits.{ShowPassData, ToStringHelper}
|
||||
import org.enso.compiler.core.{IR, Identifier}
|
||||
import org.enso.compiler.core.IR.randomId
|
||||
|
||||
import java.util.UUID
|
||||
import scala.jdk.FunctionConverters.enrichAsScalaFromFunction
|
||||
@ -64,8 +63,8 @@ object DefinitionArgument {
|
||||
passData: MetadataStorage = new MetadataStorage(),
|
||||
diagnostics: DiagnosticStorage = DiagnosticStorage()
|
||||
) extends DefinitionArgument
|
||||
with IRKind.Primitive {
|
||||
var id: UUID @Identifier = randomId
|
||||
with IRKind.Primitive
|
||||
with LazyId {
|
||||
|
||||
/** Creates a copy of `this`.
|
||||
*
|
||||
@ -140,7 +139,7 @@ object DefinitionArgument {
|
||||
if (keepMetadata) passData.duplicate else new MetadataStorage(),
|
||||
diagnostics =
|
||||
if (keepDiagnostics) diagnostics.copy else DiagnosticStorage(),
|
||||
id = if (keepIdentifiers) id else randomId
|
||||
id = if (keepIdentifiers) id else null
|
||||
)
|
||||
|
||||
/** @inheritdoc */
|
||||
|
@ -2,7 +2,6 @@ package org.enso.compiler.core.ir
|
||||
|
||||
import org.enso.compiler.core.Implicits.{ShowPassData, ToStringHelper}
|
||||
import org.enso.compiler.core.{IR, Identifier}
|
||||
import org.enso.compiler.core.IR.randomId
|
||||
|
||||
import java.util.UUID
|
||||
|
||||
@ -19,8 +18,8 @@ sealed case class Empty(
|
||||
) extends IR
|
||||
with Expression
|
||||
with Diagnostic
|
||||
with IRKind.Primitive {
|
||||
var id: UUID @Identifier = randomId
|
||||
with IRKind.Primitive
|
||||
with LazyId {
|
||||
|
||||
/** Creates a copy of `this`
|
||||
*
|
||||
@ -54,7 +53,7 @@ sealed case class Empty(
|
||||
if (keepMetadata) passData.duplicate else new MetadataStorage(),
|
||||
diagnostics =
|
||||
if (keepDiagnostics) diagnostics.copy else DiagnosticStorage(),
|
||||
id = if (keepIdentifiers) id else randomId
|
||||
id = if (keepIdentifiers) id else null
|
||||
)
|
||||
|
||||
/** @inheritdoc */
|
||||
|
@ -3,7 +3,7 @@ package org.enso.compiler.core.ir
|
||||
import org.enso.compiler.core.Implicits.{ShowPassData, ToStringHelper}
|
||||
import org.enso.compiler.core.IR
|
||||
import org.enso.compiler.core.Identifier
|
||||
import org.enso.compiler.core.IR.{indentLevel, mkIndent, randomId}
|
||||
import org.enso.compiler.core.IR.{indentLevel, mkIndent}
|
||||
|
||||
import java.util.UUID
|
||||
import scala.jdk.FunctionConverters.enrichAsScalaFromFunction
|
||||
@ -63,8 +63,8 @@ object Expression {
|
||||
passData: MetadataStorage = new MetadataStorage(),
|
||||
diagnostics: DiagnosticStorage = DiagnosticStorage()
|
||||
) extends Expression
|
||||
with IRKind.Primitive {
|
||||
var id: UUID @Identifier = randomId
|
||||
with IRKind.Primitive
|
||||
with LazyId {
|
||||
|
||||
/** Creates a copy of `this`.
|
||||
*
|
||||
@ -125,7 +125,7 @@ object Expression {
|
||||
if (keepMetadata) passData.duplicate else new MetadataStorage(),
|
||||
diagnostics =
|
||||
if (keepDiagnostics) diagnostics.copy else DiagnosticStorage(),
|
||||
id = if (keepIdentifiers) id else randomId
|
||||
id = if (keepIdentifiers) id else null
|
||||
)
|
||||
|
||||
/** @inheritdoc */
|
||||
@ -189,9 +189,8 @@ object Expression {
|
||||
passData: MetadataStorage = new MetadataStorage(),
|
||||
diagnostics: DiagnosticStorage = DiagnosticStorage()
|
||||
) extends Expression
|
||||
with IRKind.Primitive {
|
||||
|
||||
var id: UUID @Identifier = randomId
|
||||
with IRKind.Primitive
|
||||
with LazyId {
|
||||
|
||||
/** Creates a copy of `this`.
|
||||
*
|
||||
@ -241,7 +240,7 @@ object Expression {
|
||||
if (keepMetadata) passData.duplicate else new MetadataStorage(),
|
||||
diagnostics =
|
||||
if (keepDiagnostics) diagnostics.copy else DiagnosticStorage(),
|
||||
id = if (keepIdentifiers) id else randomId
|
||||
id = if (keepIdentifiers) id else null
|
||||
)
|
||||
|
||||
/** @inheritdoc */
|
||||
|
@ -2,7 +2,6 @@ package org.enso.compiler.core.ir
|
||||
|
||||
import org.enso.compiler.core.Implicits.{ShowPassData, ToStringHelper}
|
||||
import org.enso.compiler.core.{IR, Identifier}
|
||||
import org.enso.compiler.core.IR.randomId
|
||||
|
||||
import java.util.UUID
|
||||
|
||||
@ -51,7 +50,8 @@ object Function {
|
||||
passData: MetadataStorage,
|
||||
diagnostics: DiagnosticStorage
|
||||
) extends Function
|
||||
with IRKind.Primitive {
|
||||
with IRKind.Primitive
|
||||
with LazyId {
|
||||
def this(
|
||||
arguments: List[DefinitionArgument],
|
||||
body: Expression,
|
||||
@ -62,8 +62,7 @@ object Function {
|
||||
) = {
|
||||
this(arguments, Seq(body), location, canBeTCO, passData, diagnostics)
|
||||
}
|
||||
var id: UUID @Identifier = randomId
|
||||
override lazy val body = bodySeq.head
|
||||
override lazy val body = bodySeq.head
|
||||
|
||||
/** Creates a copy of `this`.
|
||||
*
|
||||
@ -118,7 +117,7 @@ object Function {
|
||||
if (keepMetadata) passData.duplicate else new MetadataStorage(),
|
||||
diagnostics =
|
||||
if (keepDiagnostics) diagnostics.copy else DiagnosticStorage(),
|
||||
id = if (keepIdentifiers) id else randomId
|
||||
id = if (keepIdentifiers) id else null
|
||||
)
|
||||
|
||||
/** @inheritdoc */
|
||||
@ -204,8 +203,8 @@ object Function {
|
||||
passData: MetadataStorage = new MetadataStorage(),
|
||||
diagnostics: DiagnosticStorage = DiagnosticStorage()
|
||||
) extends Function
|
||||
with IRKind.Sugar {
|
||||
var id: UUID @Identifier = randomId
|
||||
with IRKind.Sugar
|
||||
with LazyId {
|
||||
|
||||
/** Creates a copy of `this`.
|
||||
*
|
||||
@ -276,7 +275,7 @@ object Function {
|
||||
if (keepMetadata) passData.duplicate else new MetadataStorage(),
|
||||
diagnostics =
|
||||
if (keepDiagnostics) diagnostics.copy else DiagnosticStorage(),
|
||||
id = if (keepIdentifiers) id else randomId
|
||||
id = if (keepIdentifiers) id else null
|
||||
)
|
||||
|
||||
/** @inheritdoc */
|
||||
|
@ -0,0 +1,26 @@
|
||||
package org.enso.compiler.core.ir
|
||||
|
||||
import org.enso.compiler.core.IR.randomId
|
||||
import org.enso.compiler.core.{IR, Identifier}
|
||||
|
||||
import java.util.UUID
|
||||
|
||||
trait LazyId { self: IR =>
|
||||
private[this] var _id: UUID @Identifier = null
|
||||
|
||||
protected def id: UUID @Identifier = {
|
||||
_id
|
||||
}
|
||||
|
||||
override def getId(): UUID @Identifier = {
|
||||
if (_id == null) {
|
||||
_id = randomId()
|
||||
}
|
||||
_id
|
||||
}
|
||||
|
||||
def id_=(id: UUID @Identifier) = {
|
||||
assert(_id == null)
|
||||
_id = id
|
||||
}
|
||||
}
|
@ -2,7 +2,6 @@ package org.enso.compiler.core.ir
|
||||
|
||||
import org.enso.compiler.core.Implicits.{ShowPassData, ToStringHelper}
|
||||
import org.enso.compiler.core.{CompilerError, IR, Identifier}
|
||||
import org.enso.compiler.core.IR.randomId
|
||||
|
||||
import java.util.UUID
|
||||
|
||||
@ -42,8 +41,8 @@ object Literal {
|
||||
location: Option[IdentifiedLocation],
|
||||
passData: MetadataStorage = new MetadataStorage(),
|
||||
diagnostics: DiagnosticStorage = DiagnosticStorage()
|
||||
) extends Literal {
|
||||
var id: UUID @Identifier = randomId
|
||||
) extends Literal
|
||||
with LazyId {
|
||||
|
||||
/** Creates a copy of `this`.
|
||||
*
|
||||
@ -81,7 +80,7 @@ object Literal {
|
||||
if (keepMetadata) passData.duplicate else new MetadataStorage(),
|
||||
diagnostics =
|
||||
if (keepDiagnostics) diagnostics.copy else DiagnosticStorage(),
|
||||
id = if (keepIdentifiers) id else randomId
|
||||
id = if (keepIdentifiers) id else null
|
||||
)
|
||||
|
||||
/** @inheritdoc */
|
||||
@ -169,8 +168,8 @@ object Literal {
|
||||
location: Option[IdentifiedLocation],
|
||||
passData: MetadataStorage = new MetadataStorage(),
|
||||
diagnostics: DiagnosticStorage = DiagnosticStorage()
|
||||
) extends Literal {
|
||||
var id: UUID @Identifier = randomId
|
||||
) extends Literal
|
||||
with LazyId {
|
||||
|
||||
/** Creates a copy of `this`.
|
||||
*
|
||||
@ -206,7 +205,7 @@ object Literal {
|
||||
if (keepMetadata) passData.duplicate else new MetadataStorage(),
|
||||
diagnostics =
|
||||
if (keepDiagnostics) diagnostics.copy else DiagnosticStorage(),
|
||||
id = if (keepIdentifiers) id else randomId
|
||||
id = if (keepIdentifiers) id else null
|
||||
)
|
||||
|
||||
/** @inheritdoc */
|
||||
|
@ -1,7 +1,6 @@
|
||||
package org.enso.compiler.core.ir
|
||||
|
||||
import org.enso.compiler.core.{IR, Identifier}
|
||||
import org.enso.compiler.core.IR.randomId
|
||||
import org.enso.compiler.core.Implicits.{ShowPassData, ToStringHelper}
|
||||
import org.enso.compiler.core.ir.module.scope.{Definition, Export, Import}
|
||||
|
||||
@ -32,8 +31,8 @@ final case class Module(
|
||||
passData: MetadataStorage = new MetadataStorage(),
|
||||
diagnostics: DiagnosticStorage = DiagnosticStorage()
|
||||
) extends IR
|
||||
with IRKind.Primitive {
|
||||
var id: UUID @Identifier = randomId
|
||||
with IRKind.Primitive
|
||||
with LazyId {
|
||||
|
||||
/** Creates a copy of `this`.
|
||||
*
|
||||
@ -98,7 +97,7 @@ final case class Module(
|
||||
if (keepMetadata) passData.duplicate else new MetadataStorage(),
|
||||
diagnostics =
|
||||
if (keepDiagnostics) diagnostics.copy else DiagnosticStorage(),
|
||||
id = if (keepIdentifiers) id else randomId
|
||||
id = if (keepIdentifiers) id else null
|
||||
)
|
||||
|
||||
/** @inheritdoc */
|
||||
|
@ -1,7 +1,6 @@
|
||||
package org.enso.compiler.core.ir
|
||||
|
||||
import org.enso.compiler.core.{ConstantsNames, IR, Identifier}
|
||||
import org.enso.compiler.core.IR.randomId
|
||||
import org.enso.compiler.core.Implicits.{ShowPassData, ToStringHelper}
|
||||
|
||||
import java.util.UUID
|
||||
@ -51,10 +50,10 @@ object Name {
|
||||
passData: MetadataStorage = new MetadataStorage(),
|
||||
diagnostics: DiagnosticStorage = DiagnosticStorage()
|
||||
) extends Name
|
||||
with IRKind.Sugar {
|
||||
with IRKind.Sugar
|
||||
with LazyId {
|
||||
|
||||
override val name: String = showCode()
|
||||
var id: UUID @Identifier = randomId
|
||||
|
||||
/** Creates a copy of `this`.
|
||||
*
|
||||
@ -113,7 +112,7 @@ object Name {
|
||||
if (keepMetadata) passData.duplicate else new MetadataStorage(),
|
||||
diagnostics =
|
||||
if (keepDiagnostics) diagnostics.copy else DiagnosticStorage(),
|
||||
id = if (keepIdentifiers) id else randomId
|
||||
id = if (keepIdentifiers) id else null
|
||||
)
|
||||
|
||||
/** @inheritdoc */
|
||||
@ -212,7 +211,8 @@ object Name {
|
||||
passData: MetadataStorage = new MetadataStorage(),
|
||||
diagnostics: DiagnosticStorage = DiagnosticStorage()
|
||||
) extends Name
|
||||
with IRKind.Primitive {
|
||||
with IRKind.Primitive
|
||||
with LazyId {
|
||||
|
||||
override val name: String = parts.map(_.name).mkString(".")
|
||||
|
||||
@ -271,15 +271,12 @@ object Name {
|
||||
if (keepMetadata) passData.duplicate else new MetadataStorage(),
|
||||
diagnostics =
|
||||
if (keepDiagnostics) diagnostics.copy else DiagnosticStorage(),
|
||||
id = if (keepIdentifiers) id else randomId
|
||||
id = if (keepIdentifiers) id else null
|
||||
)
|
||||
|
||||
/** @inheritdoc */
|
||||
override def children: List[IR] = parts
|
||||
|
||||
/** @inheritdoc */
|
||||
var id: UUID @Identifier = randomId
|
||||
|
||||
/** @inheritdoc */
|
||||
override def showCode(indent: Int): String = name
|
||||
}
|
||||
@ -295,9 +292,9 @@ object Name {
|
||||
passData: MetadataStorage = new MetadataStorage(),
|
||||
diagnostics: DiagnosticStorage = DiagnosticStorage()
|
||||
) extends Name
|
||||
with IRKind.Sugar {
|
||||
with IRKind.Sugar
|
||||
with LazyId {
|
||||
override val name: String = "_"
|
||||
var id: UUID @Identifier = randomId
|
||||
|
||||
/** Creates a copy of `this`.
|
||||
*
|
||||
@ -331,7 +328,7 @@ object Name {
|
||||
if (keepMetadata) passData.duplicate else new MetadataStorage(),
|
||||
diagnostics =
|
||||
if (keepDiagnostics) diagnostics.copy else DiagnosticStorage(),
|
||||
id = if (keepIdentifiers) id else randomId
|
||||
id = if (keepIdentifiers) id else null
|
||||
)
|
||||
|
||||
/** @inheritdoc */
|
||||
@ -368,9 +365,9 @@ object Name {
|
||||
passData: MetadataStorage = new MetadataStorage(),
|
||||
diagnostics: DiagnosticStorage = DiagnosticStorage()
|
||||
) extends Name
|
||||
with IRKind.Sugar {
|
||||
with IRKind.Sugar
|
||||
with LazyId {
|
||||
override val name: String = s"<special::${specialName}>"
|
||||
var id: UUID @Identifier = randomId
|
||||
|
||||
/** Creates a copy of `this`.
|
||||
*
|
||||
@ -404,7 +401,7 @@ object Name {
|
||||
if (keepMetadata) passData.duplicate else new MetadataStorage(),
|
||||
diagnostics =
|
||||
if (keepDiagnostics) diagnostics.copy else DiagnosticStorage(),
|
||||
id = if (keepIdentifiers) id else randomId
|
||||
id = if (keepIdentifiers) id else null
|
||||
)
|
||||
|
||||
override def mapExpressions(
|
||||
@ -461,8 +458,8 @@ object Name {
|
||||
originalName: Option[Name] = None,
|
||||
passData: MetadataStorage = new MetadataStorage(),
|
||||
diagnostics: DiagnosticStorage = DiagnosticStorage()
|
||||
) extends Name {
|
||||
var id: UUID @Identifier = randomId
|
||||
) extends Name
|
||||
with LazyId {
|
||||
|
||||
/** Creates a copy of `this`.
|
||||
*
|
||||
@ -503,7 +500,7 @@ object Name {
|
||||
if (keepMetadata) passData.duplicate else new MetadataStorage(),
|
||||
diagnostics =
|
||||
if (keepDiagnostics) diagnostics.copy else DiagnosticStorage(),
|
||||
id = if (keepIdentifiers) id else randomId
|
||||
id = if (keepIdentifiers) id else null
|
||||
)
|
||||
|
||||
/** @inheritdoc */
|
||||
@ -568,8 +565,8 @@ object Name {
|
||||
passData: MetadataStorage = new MetadataStorage(),
|
||||
diagnostics: DiagnosticStorage = DiagnosticStorage()
|
||||
) extends Annotation
|
||||
with IRKind.Primitive {
|
||||
var id: UUID @Identifier = randomId
|
||||
with IRKind.Primitive
|
||||
with LazyId {
|
||||
|
||||
/** Creates a copy of `this`.
|
||||
*
|
||||
@ -605,7 +602,7 @@ object Name {
|
||||
if (keepMetadata) passData.duplicate else new MetadataStorage(),
|
||||
diagnostics =
|
||||
if (keepDiagnostics) diagnostics.copy else DiagnosticStorage(),
|
||||
id = if (keepIdentifiers) id else randomId
|
||||
id = if (keepIdentifiers) id else null
|
||||
)
|
||||
|
||||
/** @inheritdoc */
|
||||
@ -653,8 +650,8 @@ object Name {
|
||||
location: Option[IdentifiedLocation],
|
||||
passData: MetadataStorage = new MetadataStorage(),
|
||||
diagnostics: DiagnosticStorage = DiagnosticStorage()
|
||||
) extends Annotation {
|
||||
var id: UUID @Identifier = randomId
|
||||
) extends Annotation
|
||||
with LazyId {
|
||||
|
||||
/** Creates a copy of `this`.
|
||||
*
|
||||
@ -693,7 +690,7 @@ object Name {
|
||||
if (keepMetadata) passData.duplicate else new MetadataStorage(),
|
||||
diagnostics =
|
||||
if (keepDiagnostics) diagnostics.copy else DiagnosticStorage(),
|
||||
id = if (keepIdentifiers) id else randomId
|
||||
id = if (keepIdentifiers) id else null
|
||||
)
|
||||
|
||||
/** @inheritdoc */
|
||||
@ -740,8 +737,8 @@ object Name {
|
||||
synthetic: Boolean = false,
|
||||
passData: MetadataStorage = new MetadataStorage(),
|
||||
diagnostics: DiagnosticStorage = DiagnosticStorage()
|
||||
) extends Name {
|
||||
var id: UUID @Identifier = randomId
|
||||
) extends Name
|
||||
with LazyId {
|
||||
override val name: String = ConstantsNames.SELF_ARGUMENT
|
||||
|
||||
/** Creates a copy of `self`.
|
||||
@ -777,7 +774,7 @@ object Name {
|
||||
if (keepMetadata) passData.duplicate else new MetadataStorage(),
|
||||
diagnostics =
|
||||
if (keepDiagnostics) diagnostics.copy else DiagnosticStorage(),
|
||||
id = if (keepIdentifiers) id else randomId
|
||||
id = if (keepIdentifiers) id else null
|
||||
)
|
||||
|
||||
/** @inheritdoc */
|
||||
@ -818,8 +815,8 @@ object Name {
|
||||
location: Option[IdentifiedLocation],
|
||||
passData: MetadataStorage = new MetadataStorage(),
|
||||
diagnostics: DiagnosticStorage = DiagnosticStorage()
|
||||
) extends Name {
|
||||
var id: UUID @Identifier = randomId
|
||||
) extends Name
|
||||
with LazyId {
|
||||
override val name: String = ConstantsNames.SELF_TYPE_ARGUMENT
|
||||
|
||||
/** Creates a copy of `Self`.
|
||||
@ -854,7 +851,7 @@ object Name {
|
||||
if (keepMetadata) passData.duplicate else new MetadataStorage(),
|
||||
diagnostics =
|
||||
if (keepDiagnostics) diagnostics.copy else DiagnosticStorage(),
|
||||
id = if (keepIdentifiers) id else randomId
|
||||
id = if (keepIdentifiers) id else null
|
||||
)
|
||||
|
||||
/** @inheritdoc */
|
||||
|
@ -3,7 +3,6 @@ package org.enso.compiler.core.ir
|
||||
import org.enso.compiler.core.{CompilerError, IR, Identifier}
|
||||
import org.enso.compiler.core.ir.{Literal => IRLiteral, Name => IRName}
|
||||
import org.enso.compiler.core.ir.expression.errors
|
||||
import org.enso.compiler.core.IR.randomId
|
||||
import org.enso.compiler.core.Implicits.{ShowPassData, ToStringHelper}
|
||||
|
||||
import java.util.UUID
|
||||
@ -46,8 +45,8 @@ object Pattern {
|
||||
override val location: Option[IdentifiedLocation],
|
||||
override val passData: MetadataStorage = new MetadataStorage(),
|
||||
override val diagnostics: DiagnosticStorage = DiagnosticStorage()
|
||||
) extends Pattern {
|
||||
var id: UUID @Identifier = randomId
|
||||
) extends Pattern
|
||||
with LazyId {
|
||||
|
||||
/** Creates a copy of `this`.
|
||||
*
|
||||
@ -89,7 +88,7 @@ object Pattern {
|
||||
if (keepMetadata) passData.duplicate else new MetadataStorage(),
|
||||
diagnostics =
|
||||
if (keepDiagnostics) diagnostics.copy else DiagnosticStorage(),
|
||||
id = if (keepIdentifiers) id else randomId
|
||||
id = if (keepIdentifiers) id else null
|
||||
)
|
||||
|
||||
/** @inheritdoc */
|
||||
@ -139,8 +138,8 @@ object Pattern {
|
||||
override val location: Option[IdentifiedLocation],
|
||||
override val passData: MetadataStorage = new MetadataStorage(),
|
||||
override val diagnostics: DiagnosticStorage = DiagnosticStorage()
|
||||
) extends Pattern {
|
||||
var id: UUID @Identifier = randomId
|
||||
) extends Pattern
|
||||
with LazyId {
|
||||
|
||||
/** Creates a copy of `this`.
|
||||
*
|
||||
@ -193,7 +192,7 @@ object Pattern {
|
||||
if (keepMetadata) passData.duplicate else new MetadataStorage(),
|
||||
diagnostics =
|
||||
if (keepDiagnostics) diagnostics.copy else DiagnosticStorage(),
|
||||
id = if (keepIdentifiers) id else randomId
|
||||
id = if (keepIdentifiers) id else null
|
||||
)
|
||||
|
||||
/** Checks if the constructor pattern has been desugared.
|
||||
@ -290,8 +289,8 @@ object Pattern {
|
||||
override val location: Option[IdentifiedLocation],
|
||||
override val passData: MetadataStorage = new MetadataStorage(),
|
||||
override val diagnostics: DiagnosticStorage = DiagnosticStorage()
|
||||
) extends Pattern {
|
||||
var id: UUID @Identifier = randomId
|
||||
) extends Pattern
|
||||
with LazyId {
|
||||
|
||||
/** Creates a copy of `this`.
|
||||
*
|
||||
@ -333,7 +332,7 @@ object Pattern {
|
||||
if (keepMetadata) passData.duplicate else new MetadataStorage(),
|
||||
diagnostics =
|
||||
if (keepDiagnostics) diagnostics.copy else DiagnosticStorage(),
|
||||
id = if (keepIdentifiers) id else randomId
|
||||
id = if (keepIdentifiers) id else null
|
||||
)
|
||||
|
||||
/** @inheritdoc */
|
||||
@ -385,8 +384,8 @@ object Pattern {
|
||||
override val location: Option[IdentifiedLocation],
|
||||
override val passData: MetadataStorage = new MetadataStorage(),
|
||||
override val diagnostics: DiagnosticStorage = DiagnosticStorage()
|
||||
) extends Pattern {
|
||||
var id: UUID @Identifier = randomId
|
||||
) extends Pattern
|
||||
with LazyId {
|
||||
|
||||
/** Creates a copy of `this`.
|
||||
*
|
||||
@ -436,7 +435,7 @@ object Pattern {
|
||||
if (keepMetadata) passData.duplicate else new MetadataStorage(),
|
||||
diagnostics =
|
||||
if (keepDiagnostics) diagnostics.copy else DiagnosticStorage(),
|
||||
id = if (keepIdentifiers) id else randomId
|
||||
id = if (keepIdentifiers) id else null
|
||||
)
|
||||
|
||||
/** @inheritdoc */
|
||||
@ -488,8 +487,8 @@ object Pattern {
|
||||
override val location: Option[IdentifiedLocation],
|
||||
override val passData: MetadataStorage = new MetadataStorage(),
|
||||
override val diagnostics: DiagnosticStorage = DiagnosticStorage()
|
||||
) extends Pattern {
|
||||
var id: UUID @Identifier = randomId
|
||||
) extends Pattern
|
||||
with LazyId {
|
||||
|
||||
/** @inheritdoc */
|
||||
override def mapExpressions(
|
||||
@ -538,7 +537,7 @@ object Pattern {
|
||||
if (keepMetadata) passData.duplicate else new MetadataStorage(),
|
||||
diagnostics =
|
||||
if (keepDiagnostics) diagnostics.copy else DiagnosticStorage(),
|
||||
id = if (keepIdentifiers) id else randomId
|
||||
id = if (keepIdentifiers) id else null
|
||||
)
|
||||
|
||||
/** @inheritdoc */
|
||||
|
@ -2,7 +2,6 @@ package org.enso.compiler.core.ir
|
||||
|
||||
import org.enso.compiler.core.Implicits.{ShowPassData, ToStringHelper}
|
||||
import org.enso.compiler.core.{IR, Identifier}
|
||||
import org.enso.compiler.core.IR.randomId
|
||||
|
||||
import java.util.UUID
|
||||
import scala.jdk.FunctionConverters.enrichAsScalaFromFunction
|
||||
@ -40,8 +39,8 @@ object Type {
|
||||
override val location: Option[IdentifiedLocation],
|
||||
override val passData: MetadataStorage = new MetadataStorage(),
|
||||
override val diagnostics: DiagnosticStorage = DiagnosticStorage()
|
||||
) extends Type {
|
||||
var id: UUID @Identifier = randomId
|
||||
) extends Type
|
||||
with LazyId {
|
||||
|
||||
def copy(
|
||||
args: List[Expression] = args,
|
||||
@ -83,7 +82,7 @@ object Type {
|
||||
if (keepMetadata) passData.duplicate else new MetadataStorage(),
|
||||
diagnostics =
|
||||
if (keepDiagnostics) diagnostics.copy else DiagnosticStorage(),
|
||||
id = if (keepIdentifiers) id else randomId
|
||||
id = if (keepIdentifiers) id else null
|
||||
)
|
||||
|
||||
/** @inheritdoc */
|
||||
@ -136,8 +135,8 @@ object Type {
|
||||
override val diagnostics: DiagnosticStorage = DiagnosticStorage()
|
||||
) extends Type
|
||||
with module.scope.Definition
|
||||
with IRKind.Primitive {
|
||||
var id: UUID @Identifier = randomId
|
||||
with IRKind.Primitive
|
||||
with LazyId {
|
||||
|
||||
/** Creates a copy of `this`.
|
||||
*
|
||||
@ -190,7 +189,7 @@ object Type {
|
||||
if (keepMetadata) passData.duplicate else new MetadataStorage(),
|
||||
diagnostics =
|
||||
if (keepDiagnostics) diagnostics.copy else DiagnosticStorage(),
|
||||
id = if (keepIdentifiers) id else randomId
|
||||
id = if (keepIdentifiers) id else null
|
||||
)
|
||||
|
||||
/** @inheritdoc */
|
||||
@ -246,8 +245,8 @@ object Type {
|
||||
override val passData: MetadataStorage = new MetadataStorage(),
|
||||
override val diagnostics: DiagnosticStorage = DiagnosticStorage()
|
||||
) extends Type
|
||||
with IRKind.Primitive {
|
||||
var id: UUID @Identifier = randomId
|
||||
with IRKind.Primitive
|
||||
with LazyId {
|
||||
|
||||
/** Creates ac opy of `this`.
|
||||
*
|
||||
@ -297,7 +296,7 @@ object Type {
|
||||
if (keepMetadata) passData.duplicate else new MetadataStorage(),
|
||||
diagnostics =
|
||||
if (keepDiagnostics) diagnostics.copy else DiagnosticStorage(),
|
||||
id = if (keepIdentifiers) id else randomId
|
||||
id = if (keepIdentifiers) id else null
|
||||
)
|
||||
|
||||
/** @inheritdoc */
|
||||
@ -350,8 +349,8 @@ object Type {
|
||||
override val passData: MetadataStorage = new MetadataStorage(),
|
||||
override val diagnostics: DiagnosticStorage = DiagnosticStorage()
|
||||
) extends Type
|
||||
with IRKind.Primitive {
|
||||
var id: UUID @Identifier = randomId
|
||||
with IRKind.Primitive
|
||||
with LazyId {
|
||||
|
||||
/** Creates a copy of `this`.
|
||||
*
|
||||
@ -401,7 +400,7 @@ object Type {
|
||||
if (keepMetadata) passData.duplicate else new MetadataStorage(),
|
||||
diagnostics =
|
||||
if (keepDiagnostics) diagnostics.copy else DiagnosticStorage(),
|
||||
id = if (keepIdentifiers) id else randomId
|
||||
id = if (keepIdentifiers) id else null
|
||||
)
|
||||
|
||||
/** @inheritdoc */
|
||||
|
@ -3,7 +3,6 @@ package expression
|
||||
|
||||
import org.enso.compiler.core.Implicits.{ShowPassData, ToStringHelper}
|
||||
import org.enso.compiler.core.{IR, Identifier}
|
||||
import org.enso.compiler.core.IR.randomId
|
||||
|
||||
import java.util.UUID
|
||||
import scala.jdk.FunctionConverters.enrichAsScalaFromFunction
|
||||
@ -31,8 +30,8 @@ object Application {
|
||||
override val passData: MetadataStorage = new MetadataStorage(),
|
||||
override val diagnostics: DiagnosticStorage = DiagnosticStorage()
|
||||
) extends Application
|
||||
with IRKind.Primitive {
|
||||
var id: UUID @Identifier = randomId
|
||||
with IRKind.Primitive
|
||||
with LazyId {
|
||||
|
||||
/** Creates a copy of `this`.
|
||||
*
|
||||
@ -95,7 +94,7 @@ object Application {
|
||||
if (keepMetadata) passData.duplicate else new MetadataStorage(),
|
||||
diagnostics =
|
||||
if (keepDiagnostics) diagnostics.copy else DiagnosticStorage(),
|
||||
id = if (keepIdentifiers) id else randomId
|
||||
id = if (keepIdentifiers) id else null
|
||||
)
|
||||
|
||||
/** @inheritdoc */
|
||||
@ -147,8 +146,8 @@ object Application {
|
||||
override val passData: MetadataStorage = new MetadataStorage(),
|
||||
override val diagnostics: DiagnosticStorage = DiagnosticStorage()
|
||||
) extends Application
|
||||
with IRKind.Primitive {
|
||||
var id: UUID @Identifier = randomId
|
||||
with IRKind.Primitive
|
||||
with LazyId {
|
||||
|
||||
/** Creates a copy of `this`.
|
||||
*
|
||||
@ -190,7 +189,7 @@ object Application {
|
||||
if (keepMetadata) passData.duplicate else new MetadataStorage(),
|
||||
diagnostics =
|
||||
if (keepDiagnostics) diagnostics.copy else DiagnosticStorage(),
|
||||
id = if (keepIdentifiers) id else randomId
|
||||
id = if (keepIdentifiers) id else null
|
||||
)
|
||||
|
||||
/** @inheritdoc */
|
||||
@ -259,8 +258,8 @@ object Application {
|
||||
override val passData: MetadataStorage = new MetadataStorage(),
|
||||
override val diagnostics: DiagnosticStorage = DiagnosticStorage()
|
||||
) extends Literal
|
||||
with IRKind.Primitive {
|
||||
var id: UUID @Identifier = randomId
|
||||
with IRKind.Primitive
|
||||
with LazyId {
|
||||
|
||||
override def mapExpressions(
|
||||
fn: java.util.function.Function[Expression, Expression]
|
||||
@ -309,7 +308,7 @@ object Application {
|
||||
if (keepMetadata) passData.duplicate else new MetadataStorage(),
|
||||
diagnostics =
|
||||
if (keepDiagnostics) diagnostics.copy else DiagnosticStorage(),
|
||||
id = if (keepIdentifiers) id else randomId
|
||||
id = if (keepIdentifiers) id else null
|
||||
)
|
||||
|
||||
/** @inheritdoc */
|
||||
@ -355,8 +354,8 @@ object Application {
|
||||
override val passData: MetadataStorage = new MetadataStorage(),
|
||||
override val diagnostics: DiagnosticStorage = DiagnosticStorage()
|
||||
) extends Literal
|
||||
with IRKind.Primitive {
|
||||
var id: UUID @Identifier = randomId
|
||||
with IRKind.Primitive
|
||||
with LazyId {
|
||||
|
||||
override def mapExpressions(
|
||||
fn: java.util.function.Function[Expression, Expression]
|
||||
@ -405,7 +404,7 @@ object Application {
|
||||
if (keepMetadata) passData.duplicate else new MetadataStorage(),
|
||||
diagnostics =
|
||||
if (keepDiagnostics) diagnostics.copy else DiagnosticStorage(),
|
||||
id = if (keepIdentifiers) id else randomId
|
||||
id = if (keepIdentifiers) id else null
|
||||
)
|
||||
|
||||
/** @inheritdoc */
|
||||
|
@ -3,7 +3,7 @@ package expression
|
||||
|
||||
import org.enso.compiler.core.Implicits.{ShowPassData, ToStringHelper}
|
||||
import org.enso.compiler.core.{IR, Identifier}
|
||||
import org.enso.compiler.core.IR.{indentLevel, mkIndent, randomId}
|
||||
import org.enso.compiler.core.IR.{indentLevel, mkIndent}
|
||||
|
||||
import java.util.UUID
|
||||
|
||||
@ -46,8 +46,8 @@ object Case {
|
||||
override val passData: MetadataStorage = new MetadataStorage(),
|
||||
override val diagnostics: DiagnosticStorage = DiagnosticStorage()
|
||||
) extends Case
|
||||
with IRKind.Primitive {
|
||||
var id: UUID @Identifier = randomId
|
||||
with IRKind.Primitive
|
||||
with LazyId {
|
||||
|
||||
def this(
|
||||
scrutinee: Expression,
|
||||
@ -113,7 +113,7 @@ object Case {
|
||||
if (keepMetadata) passData.duplicate else new MetadataStorage(),
|
||||
diagnostics =
|
||||
if (keepDiagnostics) diagnostics.copy else DiagnosticStorage(),
|
||||
id = if (keepIdentifiers) id else randomId
|
||||
id = if (keepIdentifiers) id else null
|
||||
)
|
||||
|
||||
/** @inheritdoc */
|
||||
@ -199,8 +199,8 @@ object Case {
|
||||
override val passData: MetadataStorage = new MetadataStorage(),
|
||||
override val diagnostics: DiagnosticStorage = DiagnosticStorage()
|
||||
) extends Case
|
||||
with IRKind.Primitive {
|
||||
var id: UUID @Identifier = randomId
|
||||
with IRKind.Primitive
|
||||
with LazyId {
|
||||
|
||||
def this(
|
||||
pattern: Pattern,
|
||||
@ -269,7 +269,7 @@ object Case {
|
||||
if (keepMetadata) passData.duplicate else new MetadataStorage(),
|
||||
diagnostics =
|
||||
if (keepDiagnostics) diagnostics.copy else DiagnosticStorage(),
|
||||
id = if (keepIdentifiers) id else randomId
|
||||
id = if (keepIdentifiers) id else null
|
||||
)
|
||||
|
||||
/** @inheritdoc */
|
||||
|
@ -3,7 +3,6 @@ package expression
|
||||
|
||||
import org.enso.compiler.core.Implicits.{ShowPassData, ToStringHelper}
|
||||
import org.enso.compiler.core.{IR, Identifier}
|
||||
import org.enso.compiler.core.IR.randomId
|
||||
|
||||
import java.util.UUID
|
||||
|
||||
@ -42,8 +41,8 @@ object Comment {
|
||||
override val passData: MetadataStorage = new MetadataStorage(),
|
||||
override val diagnostics: DiagnosticStorage = DiagnosticStorage()
|
||||
) extends Comment
|
||||
with IRKind.Primitive {
|
||||
var id: UUID @Identifier = randomId
|
||||
with IRKind.Primitive
|
||||
with LazyId {
|
||||
|
||||
/** Creates a copy of `this`.
|
||||
*
|
||||
@ -79,7 +78,7 @@ object Comment {
|
||||
if (keepMetadata) passData.duplicate else new MetadataStorage(),
|
||||
diagnostics =
|
||||
if (keepDiagnostics) diagnostics.copy else DiagnosticStorage(),
|
||||
id = if (keepIdentifiers) id else randomId
|
||||
id = if (keepIdentifiers) id else null
|
||||
)
|
||||
|
||||
/** @inheritdoc */
|
||||
|
@ -2,7 +2,6 @@ package org.enso.compiler.core.ir
|
||||
package expression
|
||||
|
||||
import org.enso.compiler.core.Implicits.{ShowPassData, ToStringHelper}
|
||||
import org.enso.compiler.core.IR.randomId
|
||||
import org.enso.compiler.core.ir.Expression
|
||||
import org.enso.compiler.core.{ir, IR, Identifier}
|
||||
|
||||
@ -42,8 +41,8 @@ object Error {
|
||||
override val diagnostics: DiagnosticStorage = DiagnosticStorage()
|
||||
) extends Error
|
||||
with Diagnostic.Kind.Static
|
||||
with IRKind.Primitive {
|
||||
var id: UUID @Identifier = randomId
|
||||
with IRKind.Primitive
|
||||
with LazyId {
|
||||
|
||||
/** Creates a copy of `this`.
|
||||
*
|
||||
@ -82,7 +81,7 @@ object Error {
|
||||
if (keepMetadata) passData.duplicate else new MetadataStorage(),
|
||||
diagnostics =
|
||||
if (keepDiagnostics) diagnostics.copy else DiagnosticStorage(),
|
||||
id = if (keepIdentifiers) id else randomId
|
||||
id = if (keepIdentifiers) id else null
|
||||
)
|
||||
|
||||
/** @inheritdoc */
|
||||
|
@ -3,7 +3,6 @@ package expression
|
||||
|
||||
import org.enso.compiler.core.Implicits.{ShowPassData, ToStringHelper}
|
||||
import org.enso.compiler.core.{IR, Identifier}
|
||||
import org.enso.compiler.core.IR.randomId
|
||||
import org.enso.compiler.core.ir.MetadataStorage
|
||||
|
||||
import java.util.UUID
|
||||
@ -47,8 +46,8 @@ object Foreign {
|
||||
override val passData: MetadataStorage = new MetadataStorage(),
|
||||
override val diagnostics: DiagnosticStorage = DiagnosticStorage()
|
||||
) extends Foreign
|
||||
with IRKind.Primitive {
|
||||
var id: UUID @Identifier = randomId
|
||||
with IRKind.Primitive
|
||||
with LazyId {
|
||||
|
||||
/** Creates a copy of `this`.
|
||||
*
|
||||
@ -86,7 +85,7 @@ object Foreign {
|
||||
if (keepMetadata) passData.duplicate else new MetadataStorage(),
|
||||
diagnostics =
|
||||
if (keepDiagnostics) diagnostics.copy else DiagnosticStorage(),
|
||||
id = if (keepIdentifiers) id else randomId
|
||||
id = if (keepIdentifiers) id else null
|
||||
)
|
||||
|
||||
/** @inheritdoc */
|
||||
|
@ -3,7 +3,6 @@ package expression
|
||||
|
||||
import org.enso.compiler.core.Implicits.{ShowPassData, ToStringHelper}
|
||||
import org.enso.compiler.core.{IR, Identifier}
|
||||
import org.enso.compiler.core.IR.randomId
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
@ -46,8 +45,8 @@ object Operator {
|
||||
override val passData: MetadataStorage = new MetadataStorage(),
|
||||
override val diagnostics: DiagnosticStorage = DiagnosticStorage()
|
||||
) extends Operator
|
||||
with IRKind.Sugar {
|
||||
var id: UUID @Identifier = randomId
|
||||
with IRKind.Sugar
|
||||
with LazyId {
|
||||
|
||||
/** Creates a copy of `this`.
|
||||
*
|
||||
@ -106,7 +105,7 @@ object Operator {
|
||||
if (keepMetadata) passData.duplicate else new MetadataStorage(),
|
||||
diagnostics =
|
||||
if (keepDiagnostics) diagnostics.copy else DiagnosticStorage(),
|
||||
id = if (keepIdentifiers) id else randomId
|
||||
id = if (keepIdentifiers) id else null
|
||||
)
|
||||
|
||||
/** @inheritdoc */
|
||||
|
@ -3,7 +3,6 @@ package expression
|
||||
|
||||
import org.enso.compiler.core.Implicits.{ShowPassData, ToStringHelper}
|
||||
import org.enso.compiler.core.{IR, Identifier}
|
||||
import org.enso.compiler.core.IR.randomId
|
||||
|
||||
import java.util.UUID
|
||||
|
||||
@ -44,8 +43,8 @@ object Section {
|
||||
override val passData: MetadataStorage = new MetadataStorage(),
|
||||
override val diagnostics: DiagnosticStorage = DiagnosticStorage()
|
||||
) extends Section
|
||||
with IRKind.Sugar {
|
||||
var id: UUID @Identifier = randomId
|
||||
with IRKind.Sugar
|
||||
with LazyId {
|
||||
|
||||
/** Creates a copy of `this`.
|
||||
*
|
||||
@ -96,7 +95,7 @@ object Section {
|
||||
if (keepMetadata) passData.duplicate else new MetadataStorage(),
|
||||
diagnostics =
|
||||
if (keepDiagnostics) diagnostics.copy else DiagnosticStorage(),
|
||||
id = if (keepIdentifiers) id else randomId
|
||||
id = if (keepIdentifiers) id else null
|
||||
)
|
||||
|
||||
/** @inheritdoc */
|
||||
@ -146,8 +145,8 @@ object Section {
|
||||
override val passData: MetadataStorage = new MetadataStorage(),
|
||||
override val diagnostics: DiagnosticStorage = DiagnosticStorage()
|
||||
) extends Section
|
||||
with IRKind.Sugar {
|
||||
var id: UUID @Identifier = randomId
|
||||
with IRKind.Sugar
|
||||
with LazyId {
|
||||
|
||||
/** Creates a copy of `this`.
|
||||
*
|
||||
@ -190,7 +189,7 @@ object Section {
|
||||
if (keepMetadata) passData.duplicate else new MetadataStorage(),
|
||||
diagnostics =
|
||||
if (keepDiagnostics) diagnostics.copy else DiagnosticStorage(),
|
||||
id = if (keepIdentifiers) id else randomId
|
||||
id = if (keepIdentifiers) id else null
|
||||
)
|
||||
|
||||
/** @inheritdoc */
|
||||
@ -239,8 +238,8 @@ object Section {
|
||||
override val passData: MetadataStorage = new MetadataStorage(),
|
||||
override val diagnostics: DiagnosticStorage = DiagnosticStorage()
|
||||
) extends Section
|
||||
with IRKind.Sugar {
|
||||
var id: UUID @Identifier = randomId
|
||||
with IRKind.Sugar
|
||||
with LazyId {
|
||||
|
||||
/** Creates a copy of `this`.
|
||||
*
|
||||
@ -291,7 +290,7 @@ object Section {
|
||||
if (keepMetadata) passData.duplicate else new MetadataStorage(),
|
||||
diagnostics =
|
||||
if (keepDiagnostics) diagnostics.copy else DiagnosticStorage(),
|
||||
id = if (keepIdentifiers) id else randomId
|
||||
id = if (keepIdentifiers) id else null
|
||||
)
|
||||
|
||||
/** @inheritdoc */
|
||||
|
@ -3,7 +3,6 @@ package expression
|
||||
package errors
|
||||
|
||||
import org.enso.compiler.core.{IR, Identifier}
|
||||
import org.enso.compiler.core.IR.randomId
|
||||
|
||||
import java.util.UUID
|
||||
|
||||
@ -22,7 +21,8 @@ sealed case class Conversion(
|
||||
) extends Error
|
||||
with Diagnostic.Kind.Interactive
|
||||
with IRKind.Primitive
|
||||
with Name {
|
||||
with Name
|
||||
with LazyId {
|
||||
override val name: String = "conversion_error"
|
||||
|
||||
override def mapExpressions(
|
||||
@ -75,16 +75,13 @@ sealed case class Conversion(
|
||||
if (keepMetadata) passData.duplicate else new MetadataStorage(),
|
||||
diagnostics =
|
||||
if (keepDiagnostics) diagnostics.copy else DiagnosticStorage(),
|
||||
id = if (keepIdentifiers) id else randomId
|
||||
id = if (keepIdentifiers) id else null
|
||||
)
|
||||
}
|
||||
|
||||
/** @inheritdoc */
|
||||
override def children: List[IR] = List(storedIr)
|
||||
|
||||
/** @inheritdoc */
|
||||
var id: UUID @Identifier = randomId
|
||||
|
||||
/** @inheritdoc */
|
||||
override def showCode(indent: Int): String =
|
||||
s"(Error: ${storedIr.showCode(indent)})"
|
||||
|
@ -4,7 +4,6 @@ package errors
|
||||
|
||||
import org.enso.compiler.core.Implicits.{ShowPassData, ToStringHelper}
|
||||
import org.enso.compiler.core.{IR, Identifier}
|
||||
import org.enso.compiler.core.IR.randomId
|
||||
|
||||
import java.util.UUID
|
||||
import scala.annotation.unused
|
||||
@ -25,8 +24,8 @@ sealed case class ImportExport(
|
||||
with Diagnostic.Kind.Interactive
|
||||
with org.enso.compiler.core.ir.module.scope.Import
|
||||
with org.enso.compiler.core.ir.module.scope.Export
|
||||
with IRKind.Primitive {
|
||||
var id: UUID @Identifier = randomId
|
||||
with IRKind.Primitive
|
||||
with LazyId {
|
||||
|
||||
/** Creates a copy of `this`.
|
||||
*
|
||||
@ -61,7 +60,7 @@ sealed case class ImportExport(
|
||||
if (keepMetadata) passData.duplicate else new MetadataStorage(),
|
||||
diagnostics =
|
||||
if (keepDiagnostics) diagnostics.copy else DiagnosticStorage(),
|
||||
id = if (keepIdentifiers) id else randomId
|
||||
id = if (keepIdentifiers) id else null
|
||||
)
|
||||
|
||||
/** @inheritdoc */
|
||||
|
@ -3,7 +3,6 @@ package expression
|
||||
package errors
|
||||
|
||||
import org.enso.compiler.core.{IR, Identifier}
|
||||
import org.enso.compiler.core.IR.randomId
|
||||
|
||||
import java.util.UUID
|
||||
|
||||
@ -22,7 +21,8 @@ sealed case class Pattern(
|
||||
diagnostics: DiagnosticStorage = DiagnosticStorage()
|
||||
) extends Error
|
||||
with Diagnostic.Kind.Interactive
|
||||
with org.enso.compiler.core.ir.Pattern {
|
||||
with org.enso.compiler.core.ir.Pattern
|
||||
with LazyId {
|
||||
override def mapExpressions(
|
||||
fn: java.util.function.Function[Expression, Expression]
|
||||
): Pattern =
|
||||
@ -71,7 +71,7 @@ sealed case class Pattern(
|
||||
if (keepMetadata) passData.duplicate else new MetadataStorage(),
|
||||
diagnostics =
|
||||
if (keepDiagnostics) diagnostics.copy else DiagnosticStorage(),
|
||||
id = if (keepIdentifiers) id else randomId
|
||||
id = if (keepIdentifiers) id else null
|
||||
)
|
||||
|
||||
override def message(source: (IdentifiedLocation => String)): String =
|
||||
@ -84,8 +84,6 @@ sealed case class Pattern(
|
||||
|
||||
override def children: List[IR] = List(originalPattern)
|
||||
|
||||
var id: UUID @Identifier = randomId
|
||||
|
||||
override def showCode(indent: Int): String =
|
||||
originalPattern.showCode(indent)
|
||||
}
|
||||
|
@ -4,7 +4,6 @@ package errors
|
||||
|
||||
import org.enso.compiler.core.Implicits.ShowPassData
|
||||
import org.enso.compiler.core.{IR, Identifier}
|
||||
import org.enso.compiler.core.IR.randomId
|
||||
|
||||
import java.util.UUID
|
||||
|
||||
@ -45,8 +44,8 @@ object Redefined {
|
||||
override val diagnostics: DiagnosticStorage = DiagnosticStorage()
|
||||
) extends Redefined
|
||||
with Diagnostic.Kind.Interactive
|
||||
with IRKind.Primitive {
|
||||
var id: UUID @Identifier = randomId
|
||||
with IRKind.Primitive
|
||||
with LazyId {
|
||||
|
||||
/** Creates a copy of `self`.
|
||||
*
|
||||
@ -80,7 +79,7 @@ object Redefined {
|
||||
if (keepMetadata) passData.duplicate else new MetadataStorage(),
|
||||
diagnostics =
|
||||
if (keepDiagnostics) diagnostics.copy else DiagnosticStorage(),
|
||||
id = if (keepIdentifiers) id else randomId
|
||||
id = if (keepIdentifiers) id else null
|
||||
)
|
||||
|
||||
/** @inheritdoc */
|
||||
@ -128,8 +127,8 @@ object Redefined {
|
||||
) extends Redefined
|
||||
with Diagnostic.Kind.Interactive
|
||||
with module.scope.Definition
|
||||
with IRKind.Primitive {
|
||||
var id: UUID @Identifier = randomId
|
||||
with IRKind.Primitive
|
||||
with LazyId {
|
||||
|
||||
/** Creates a copy of `this`.
|
||||
*
|
||||
@ -185,7 +184,7 @@ object Redefined {
|
||||
if (keepMetadata) passData.duplicate else new MetadataStorage(),
|
||||
diagnostics =
|
||||
if (keepDiagnostics) diagnostics.copy else DiagnosticStorage(),
|
||||
id = if (keepIdentifiers) id else randomId
|
||||
id = if (keepIdentifiers) id else null
|
||||
)
|
||||
|
||||
/** @inheritdoc */
|
||||
@ -253,8 +252,8 @@ object Redefined {
|
||||
) extends Redefined
|
||||
with Diagnostic.Kind.Interactive
|
||||
with module.scope.Definition
|
||||
with IRKind.Primitive {
|
||||
var id: UUID @Identifier = randomId
|
||||
with IRKind.Primitive
|
||||
with LazyId {
|
||||
|
||||
/** Creates a copy of `this`.
|
||||
*
|
||||
@ -309,7 +308,7 @@ object Redefined {
|
||||
if (keepMetadata) passData.duplicate else new MetadataStorage(),
|
||||
diagnostics =
|
||||
if (keepDiagnostics) diagnostics.copy else DiagnosticStorage(),
|
||||
id = if (keepIdentifiers) id else randomId
|
||||
id = if (keepIdentifiers) id else null
|
||||
)
|
||||
|
||||
/** @inheritdoc */
|
||||
@ -377,8 +376,8 @@ object Redefined {
|
||||
) extends Redefined
|
||||
with Diagnostic.Kind.Interactive
|
||||
with module.scope.Definition
|
||||
with IRKind.Primitive {
|
||||
var id: UUID @Identifier = randomId
|
||||
with IRKind.Primitive
|
||||
with LazyId {
|
||||
|
||||
/** Creates a copy of `this`.
|
||||
*
|
||||
@ -436,7 +435,7 @@ object Redefined {
|
||||
if (keepMetadata) passData.duplicate else new MetadataStorage(),
|
||||
diagnostics =
|
||||
if (keepDiagnostics) diagnostics.copy else DiagnosticStorage(),
|
||||
id = if (keepIdentifiers) id else randomId
|
||||
id = if (keepIdentifiers) id else null
|
||||
)
|
||||
|
||||
/** @inheritdoc */
|
||||
@ -496,8 +495,8 @@ object Redefined {
|
||||
) extends Redefined
|
||||
with Diagnostic.Kind.Interactive
|
||||
with module.scope.Definition
|
||||
with IRKind.Primitive {
|
||||
var id: UUID @Identifier = randomId
|
||||
with IRKind.Primitive
|
||||
with LazyId {
|
||||
|
||||
/** Creates a copy of `this`.
|
||||
*
|
||||
@ -542,7 +541,7 @@ object Redefined {
|
||||
if (keepMetadata) passData.duplicate else new MetadataStorage(),
|
||||
diagnostics =
|
||||
if (keepDiagnostics) diagnostics.copy else DiagnosticStorage(),
|
||||
id = if (keepIdentifiers) id else randomId
|
||||
id = if (keepIdentifiers) id else null
|
||||
)
|
||||
|
||||
/** @inheritdoc */
|
||||
@ -597,8 +596,8 @@ object Redefined {
|
||||
) extends Redefined
|
||||
with Diagnostic.Kind.Interactive
|
||||
with module.scope.Definition
|
||||
with IRKind.Primitive {
|
||||
var id: UUID @Identifier = randomId
|
||||
with IRKind.Primitive
|
||||
with LazyId {
|
||||
|
||||
/** Creates a copy of `this`.
|
||||
*
|
||||
@ -643,7 +642,7 @@ object Redefined {
|
||||
if (keepMetadata) passData.duplicate else new MetadataStorage(),
|
||||
diagnostics =
|
||||
if (keepDiagnostics) diagnostics.copy else DiagnosticStorage(),
|
||||
id = if (keepIdentifiers) id else randomId
|
||||
id = if (keepIdentifiers) id else null
|
||||
)
|
||||
|
||||
/** @inheritdoc */
|
||||
@ -697,8 +696,8 @@ object Redefined {
|
||||
override val diagnostics: DiagnosticStorage = DiagnosticStorage()
|
||||
) extends Redefined
|
||||
with Diagnostic.Kind.Interactive
|
||||
with IRKind.Primitive {
|
||||
var id: UUID @Identifier = randomId
|
||||
with IRKind.Primitive
|
||||
with LazyId {
|
||||
|
||||
/** Creates a copy of `this`.
|
||||
*
|
||||
@ -738,7 +737,7 @@ object Redefined {
|
||||
if (keepMetadata) passData.duplicate else new MetadataStorage(),
|
||||
diagnostics =
|
||||
if (keepDiagnostics) diagnostics.copy else DiagnosticStorage(),
|
||||
id = if (keepIdentifiers) id else randomId
|
||||
id = if (keepIdentifiers) id else null
|
||||
)
|
||||
|
||||
/** @inheritdoc */
|
||||
|
@ -3,7 +3,6 @@ package expression
|
||||
package errors
|
||||
|
||||
import org.enso.compiler.core.{IR, Identifier}
|
||||
import org.enso.compiler.core.IR.randomId
|
||||
|
||||
import java.util.UUID
|
||||
|
||||
@ -22,7 +21,8 @@ sealed case class Resolution(
|
||||
) extends Error
|
||||
with Diagnostic.Kind.Interactive
|
||||
with IRKind.Primitive
|
||||
with Name {
|
||||
with Name
|
||||
with LazyId {
|
||||
override val name: String = originalName.name
|
||||
|
||||
override def mapExpressions(
|
||||
@ -75,15 +75,12 @@ sealed case class Resolution(
|
||||
if (keepMetadata) passData.duplicate else new MetadataStorage(),
|
||||
diagnostics =
|
||||
if (keepDiagnostics) diagnostics.copy else DiagnosticStorage(),
|
||||
id = randomId
|
||||
id = if (keepIdentifiers) id else null
|
||||
)
|
||||
|
||||
/** @inheritdoc */
|
||||
override def children: List[IR] = List(originalName)
|
||||
|
||||
/** @inheritdoc */
|
||||
var id: UUID @Identifier = randomId
|
||||
|
||||
/** @inheritdoc */
|
||||
override def showCode(indent: Int): String = originalName.showCode(indent)
|
||||
|
||||
|
@ -4,7 +4,6 @@ package errors
|
||||
|
||||
import org.enso.compiler.core.Implicits.{ShowPassData, ToStringHelper}
|
||||
import org.enso.compiler.core.{IR, Identifier}
|
||||
import org.enso.compiler.core.IR.randomId
|
||||
|
||||
import java.util.UUID
|
||||
import scala.annotation.unused
|
||||
@ -26,8 +25,8 @@ sealed case class Syntax(
|
||||
with module.scope.Definition
|
||||
with module.scope.Export
|
||||
with module.scope.Import
|
||||
with IRKind.Primitive {
|
||||
var id: UUID @Identifier = randomId
|
||||
with IRKind.Primitive
|
||||
with LazyId {
|
||||
|
||||
/** Creates a copy of `this`.
|
||||
*
|
||||
@ -62,7 +61,7 @@ sealed case class Syntax(
|
||||
if (keepMetadata) passData.duplicate else new MetadataStorage(),
|
||||
diagnostics =
|
||||
if (keepDiagnostics) diagnostics.copy else DiagnosticStorage(),
|
||||
id = if (keepIdentifiers) id else randomId
|
||||
id = if (keepIdentifiers) id else null
|
||||
)
|
||||
|
||||
/** @inheritdoc */
|
||||
|
@ -3,7 +3,6 @@ package expression
|
||||
package errors
|
||||
|
||||
import org.enso.compiler.core.{IR, Identifier}
|
||||
import org.enso.compiler.core.IR.randomId
|
||||
|
||||
import java.util.UUID
|
||||
|
||||
@ -57,11 +56,10 @@ object Unexpected {
|
||||
diagnostics: DiagnosticStorage = DiagnosticStorage()
|
||||
) extends Unexpected
|
||||
with IRKind.Primitive
|
||||
with org.enso.compiler.core.ir.module.scope.Definition {
|
||||
with org.enso.compiler.core.ir.module.scope.Definition
|
||||
with LazyId {
|
||||
override val entity: String = "type signature"
|
||||
|
||||
var id: UUID @Identifier = randomId
|
||||
|
||||
/** Creates a copy of `this`.
|
||||
*
|
||||
* @param ir the erroneous signature
|
||||
@ -109,7 +107,7 @@ object Unexpected {
|
||||
if (keepMetadata) passData.duplicate else new MetadataStorage(),
|
||||
diagnostics =
|
||||
if (keepDiagnostics) diagnostics.copy else DiagnosticStorage(),
|
||||
id = if (keepIdentifiers) id else randomId
|
||||
id = if (keepIdentifiers) id else null
|
||||
)
|
||||
|
||||
/** @inheritdoc */
|
||||
|
@ -7,12 +7,13 @@ import org.enso.compiler.core.ir.{
|
||||
Expression,
|
||||
IRKind,
|
||||
IdentifiedLocation,
|
||||
LazyId,
|
||||
MetadataStorage,
|
||||
Name
|
||||
}
|
||||
import org.enso.compiler.core.ir.module.Scope
|
||||
import org.enso.compiler.core.Implicits.{ShowPassData, ToStringHelper}
|
||||
import org.enso.compiler.core.IR.{indentLevel, mkIndent, randomId}
|
||||
import org.enso.compiler.core.IR.{indentLevel, mkIndent}
|
||||
|
||||
import java.util.UUID
|
||||
|
||||
@ -60,8 +61,8 @@ object Definition {
|
||||
passData: MetadataStorage = new MetadataStorage(),
|
||||
diagnostics: DiagnosticStorage = DiagnosticStorage()
|
||||
) extends Definition
|
||||
with IRKind.Primitive {
|
||||
var id: UUID @Identifier = randomId
|
||||
with IRKind.Primitive
|
||||
with LazyId {
|
||||
|
||||
def copy(
|
||||
name: Name = name,
|
||||
@ -105,7 +106,7 @@ object Definition {
|
||||
if (keepMetadata) passData.duplicate else new MetadataStorage(),
|
||||
diagnostics =
|
||||
if (keepDiagnostics) diagnostics.copy else DiagnosticStorage(),
|
||||
id = if (keepIdentifiers) id else randomId
|
||||
id = if (keepIdentifiers) id else null
|
||||
)
|
||||
|
||||
/** @inheritdoc */
|
||||
@ -165,8 +166,8 @@ object Definition {
|
||||
passData: MetadataStorage = new MetadataStorage(),
|
||||
diagnostics: DiagnosticStorage = DiagnosticStorage()
|
||||
) extends IR
|
||||
with IRKind.Primitive {
|
||||
var id: UUID @Identifier = randomId
|
||||
with IRKind.Primitive
|
||||
with LazyId {
|
||||
|
||||
/** Creates a copy of `this`.
|
||||
*
|
||||
@ -227,7 +228,7 @@ object Definition {
|
||||
if (keepMetadata) passData.duplicate else new MetadataStorage(),
|
||||
diagnostics =
|
||||
if (keepDiagnostics) diagnostics.copy else DiagnosticStorage(),
|
||||
id = if (keepIdentifiers) id else randomId
|
||||
id = if (keepIdentifiers) id else null
|
||||
)
|
||||
|
||||
/** @inheritdoc */
|
||||
@ -288,8 +289,8 @@ object Definition {
|
||||
passData: MetadataStorage = new MetadataStorage(),
|
||||
diagnostics: DiagnosticStorage = DiagnosticStorage()
|
||||
) extends Definition
|
||||
with IRKind.Sugar {
|
||||
var id: UUID @Identifier = randomId
|
||||
with IRKind.Sugar
|
||||
with LazyId {
|
||||
|
||||
/** Creates a copy of `this`.
|
||||
*
|
||||
@ -358,7 +359,7 @@ object Definition {
|
||||
if (keepMetadata) passData.duplicate else new MetadataStorage(),
|
||||
diagnostics =
|
||||
if (keepDiagnostics) diagnostics.copy else DiagnosticStorage(),
|
||||
id = if (keepIdentifiers) id else randomId
|
||||
id = if (keepIdentifiers) id else null
|
||||
)
|
||||
|
||||
/** @inheritdoc */
|
||||
|
@ -2,13 +2,13 @@ package org.enso.compiler.core.ir.module.scope
|
||||
|
||||
import org.enso.compiler.core.Implicits.{ShowPassData, ToStringHelper}
|
||||
import org.enso.compiler.core.{IR, Identifier}
|
||||
import org.enso.compiler.core.IR.randomId
|
||||
import org.enso.compiler.core.ir.module.Scope
|
||||
import org.enso.compiler.core.ir.{
|
||||
DiagnosticStorage,
|
||||
Expression,
|
||||
IRKind,
|
||||
IdentifiedLocation,
|
||||
LazyId,
|
||||
MetadataStorage,
|
||||
Name
|
||||
}
|
||||
@ -61,8 +61,8 @@ object Export {
|
||||
override val diagnostics: DiagnosticStorage = DiagnosticStorage()
|
||||
) extends IR
|
||||
with IRKind.Primitive
|
||||
with Export {
|
||||
var id: UUID @Identifier = randomId
|
||||
with Export
|
||||
with LazyId {
|
||||
|
||||
/** Creates a copy of `this`.
|
||||
*
|
||||
@ -118,7 +118,7 @@ object Export {
|
||||
if (keepMetadata) passData.duplicate else new MetadataStorage(),
|
||||
diagnostics =
|
||||
if (keepDiagnostics) diagnostics.copy else DiagnosticStorage(),
|
||||
id = if (keepIdentifiers) id else randomId
|
||||
id = if (keepIdentifiers) id else null
|
||||
)
|
||||
|
||||
/** @inheritdoc */
|
||||
|
@ -2,13 +2,13 @@ package org.enso.compiler.core.ir.module.scope
|
||||
|
||||
import org.enso.compiler.core.Implicits.{ShowPassData, ToStringHelper}
|
||||
import org.enso.compiler.core.{IR, Identifier}
|
||||
import org.enso.compiler.core.IR.randomId
|
||||
import org.enso.compiler.core.ir.module.Scope
|
||||
import org.enso.compiler.core.ir.{
|
||||
DiagnosticStorage,
|
||||
Expression,
|
||||
IRKind,
|
||||
IdentifiedLocation,
|
||||
LazyId,
|
||||
MetadataStorage,
|
||||
Name
|
||||
}
|
||||
@ -60,8 +60,8 @@ object Import {
|
||||
override val passData: MetadataStorage = new MetadataStorage(),
|
||||
override val diagnostics: DiagnosticStorage = DiagnosticStorage()
|
||||
) extends Import
|
||||
with IRKind.Primitive {
|
||||
var id: UUID @Identifier = randomId
|
||||
with IRKind.Primitive
|
||||
with LazyId {
|
||||
|
||||
/** Creates a copy of `this`.
|
||||
*
|
||||
@ -133,7 +133,7 @@ object Import {
|
||||
if (keepMetadata) passData.duplicate else new MetadataStorage(),
|
||||
diagnostics =
|
||||
if (keepDiagnostics) diagnostics.copy else DiagnosticStorage(),
|
||||
id = if (keepIdentifiers) id else randomId
|
||||
id = if (keepIdentifiers) id else null
|
||||
)
|
||||
|
||||
/** @inheritdoc */
|
||||
|
@ -5,7 +5,6 @@ package definition
|
||||
|
||||
import org.enso.compiler.core.Implicits.{ShowPassData, ToStringHelper}
|
||||
import org.enso.compiler.core.{IR, Identifier}
|
||||
import org.enso.compiler.core.IR.randomId
|
||||
|
||||
import java.util.UUID
|
||||
|
||||
@ -56,7 +55,8 @@ object Method {
|
||||
override val passData: MetadataStorage,
|
||||
override val diagnostics: DiagnosticStorage
|
||||
) extends Method
|
||||
with IRKind.Primitive {
|
||||
with IRKind.Primitive
|
||||
with LazyId {
|
||||
def this(
|
||||
methodReference: Name.MethodReference,
|
||||
body: Expression,
|
||||
@ -75,8 +75,7 @@ object Method {
|
||||
);
|
||||
}
|
||||
|
||||
var id: UUID @Identifier = randomId
|
||||
lazy val body = bodySeq.head
|
||||
lazy val body = bodySeq.head
|
||||
|
||||
/** Creates a copy of `this`.
|
||||
*
|
||||
@ -138,7 +137,7 @@ object Method {
|
||||
diagnostics =
|
||||
if (keepDiagnostics) diagnostics.copy
|
||||
else DiagnosticStorage(),
|
||||
id = if (keepIdentifiers) id else randomId
|
||||
id = if (keepIdentifiers) id else null
|
||||
)
|
||||
|
||||
/** @inheritdoc */
|
||||
@ -242,8 +241,8 @@ object Method {
|
||||
override val passData: MetadataStorage = new MetadataStorage(),
|
||||
override val diagnostics: DiagnosticStorage = DiagnosticStorage()
|
||||
) extends Method
|
||||
with IRKind.Sugar {
|
||||
var id: UUID @Identifier = randomId
|
||||
with IRKind.Sugar
|
||||
with LazyId {
|
||||
|
||||
/** Creates a copy of `this`.
|
||||
*
|
||||
@ -311,7 +310,7 @@ object Method {
|
||||
diagnostics =
|
||||
if (keepDiagnostics) diagnostics.copy
|
||||
else DiagnosticStorage(),
|
||||
id = if (keepIdentifiers) id else randomId
|
||||
id = if (keepIdentifiers) id else null
|
||||
)
|
||||
|
||||
/** @inheritdoc */
|
||||
@ -382,8 +381,8 @@ object Method {
|
||||
override val passData: MetadataStorage = new MetadataStorage(),
|
||||
override val diagnostics: DiagnosticStorage = DiagnosticStorage()
|
||||
) extends Method
|
||||
with IRKind.Primitive {
|
||||
var id: UUID @Identifier = randomId
|
||||
with IRKind.Primitive
|
||||
with LazyId {
|
||||
|
||||
/** Creates a copy of `this`.
|
||||
*
|
||||
@ -451,7 +450,7 @@ object Method {
|
||||
diagnostics =
|
||||
if (keepDiagnostics) diagnostics.copy
|
||||
else DiagnosticStorage(),
|
||||
id = if (keepIdentifiers) id else randomId
|
||||
id = if (keepIdentifiers) id else null
|
||||
)
|
||||
}
|
||||
|
||||
|
@ -2,13 +2,13 @@ package org.enso.compiler.core.ir.module.scope.imports
|
||||
|
||||
import org.enso.compiler.core.Implicits.{ShowPassData, ToStringHelper}
|
||||
import org.enso.compiler.core.{IR, Identifier}
|
||||
import org.enso.compiler.core.IR.randomId
|
||||
import org.enso.compiler.core.ir.module.scope.Import
|
||||
import org.enso.compiler.core.ir.{
|
||||
DiagnosticStorage,
|
||||
Expression,
|
||||
IRKind,
|
||||
IdentifiedLocation,
|
||||
LazyId,
|
||||
MetadataStorage
|
||||
}
|
||||
|
||||
@ -30,8 +30,8 @@ sealed case class Polyglot(
|
||||
override val passData: MetadataStorage = new MetadataStorage(),
|
||||
override val diagnostics: DiagnosticStorage = DiagnosticStorage()
|
||||
) extends Import
|
||||
with IRKind.Primitive {
|
||||
var id: UUID @Identifier = randomId
|
||||
with IRKind.Primitive
|
||||
with LazyId {
|
||||
|
||||
/** Creates a copy of `this`.
|
||||
*
|
||||
@ -71,7 +71,7 @@ sealed case class Polyglot(
|
||||
if (keepMetadata) passData.duplicate else new MetadataStorage(),
|
||||
diagnostics =
|
||||
if (keepDiagnostics) diagnostics.copy else DiagnosticStorage(),
|
||||
id = if (keepIdentifiers) id else randomId
|
||||
id = if (keepIdentifiers) id else null
|
||||
)
|
||||
|
||||
/** @inheritdoc */
|
||||
|
@ -3,7 +3,6 @@ package `type`
|
||||
|
||||
import org.enso.compiler.core.Implicits.{ShowPassData, ToStringHelper}
|
||||
import org.enso.compiler.core.{IR, Identifier}
|
||||
import org.enso.compiler.core.IR.randomId
|
||||
import org.enso.compiler.core.ir.Type.Info
|
||||
|
||||
import java.util.UUID
|
||||
@ -48,8 +47,8 @@ object Set {
|
||||
override val passData: MetadataStorage = new MetadataStorage(),
|
||||
override val diagnostics: DiagnosticStorage = DiagnosticStorage()
|
||||
) extends Set
|
||||
with IRKind.Primitive {
|
||||
var id: UUID @Identifier = randomId
|
||||
with IRKind.Primitive
|
||||
with LazyId {
|
||||
|
||||
/** Creates a copy of `this`.
|
||||
*
|
||||
@ -109,7 +108,7 @@ object Set {
|
||||
if (keepMetadata) passData.duplicate else new MetadataStorage(),
|
||||
diagnostics =
|
||||
if (keepDiagnostics) diagnostics.copy else DiagnosticStorage(),
|
||||
id = if (keepIdentifiers) id else randomId
|
||||
id = if (keepIdentifiers) id else null
|
||||
)
|
||||
|
||||
/** @inheritdoc */
|
||||
@ -171,8 +170,8 @@ object Set {
|
||||
override val passData: MetadataStorage = new MetadataStorage(),
|
||||
override val diagnostics: DiagnosticStorage = DiagnosticStorage()
|
||||
) extends Set
|
||||
with IRKind.Primitive {
|
||||
var id: UUID @Identifier = randomId
|
||||
with IRKind.Primitive
|
||||
with LazyId {
|
||||
|
||||
/** Creates a copy of `this`.
|
||||
*
|
||||
@ -222,7 +221,7 @@ object Set {
|
||||
if (keepMetadata) passData.duplicate else new MetadataStorage(),
|
||||
diagnostics =
|
||||
if (keepDiagnostics) diagnostics.copy else DiagnosticStorage(),
|
||||
id = if (keepIdentifiers) id else randomId
|
||||
id = if (keepIdentifiers) id else null
|
||||
)
|
||||
|
||||
/** @inheritdoc */
|
||||
@ -276,8 +275,8 @@ object Set {
|
||||
override val passData: MetadataStorage = new MetadataStorage(),
|
||||
override val diagnostics: DiagnosticStorage = DiagnosticStorage()
|
||||
) extends Set
|
||||
with IRKind.Primitive {
|
||||
var id: UUID @Identifier = randomId
|
||||
with IRKind.Primitive
|
||||
with LazyId {
|
||||
|
||||
/** Creates a copy of `this`.
|
||||
*
|
||||
@ -327,7 +326,7 @@ object Set {
|
||||
if (keepMetadata) passData.duplicate else new MetadataStorage(),
|
||||
diagnostics =
|
||||
if (keepDiagnostics) diagnostics.copy else DiagnosticStorage(),
|
||||
id = if (keepIdentifiers) id else randomId
|
||||
id = if (keepIdentifiers) id else null
|
||||
)
|
||||
|
||||
/** @inheritdoc */
|
||||
@ -381,8 +380,8 @@ object Set {
|
||||
override val passData: MetadataStorage = new MetadataStorage(),
|
||||
override val diagnostics: DiagnosticStorage = DiagnosticStorage()
|
||||
) extends Set
|
||||
with IRKind.Primitive {
|
||||
var id: UUID @Identifier = randomId
|
||||
with IRKind.Primitive
|
||||
with LazyId {
|
||||
|
||||
/** Creates a copy of `this`.
|
||||
*
|
||||
@ -432,7 +431,7 @@ object Set {
|
||||
if (keepMetadata) passData.duplicate else new MetadataStorage(),
|
||||
diagnostics =
|
||||
if (keepDiagnostics) diagnostics.copy else DiagnosticStorage(),
|
||||
id = if (keepIdentifiers) id else randomId
|
||||
id = if (keepIdentifiers) id else null
|
||||
)
|
||||
|
||||
/** @inheritdoc */
|
||||
@ -483,8 +482,8 @@ object Set {
|
||||
override val passData: MetadataStorage = new MetadataStorage(),
|
||||
override val diagnostics: DiagnosticStorage = DiagnosticStorage()
|
||||
) extends Set
|
||||
with IRKind.Primitive {
|
||||
var id: UUID @Identifier = randomId
|
||||
with IRKind.Primitive
|
||||
with LazyId {
|
||||
|
||||
/** Creates a copy of `this`.
|
||||
*
|
||||
@ -529,7 +528,7 @@ object Set {
|
||||
if (keepMetadata) passData.duplicate else new MetadataStorage(),
|
||||
diagnostics =
|
||||
if (keepDiagnostics) diagnostics.copy else DiagnosticStorage(),
|
||||
id = if (keepIdentifiers) id else randomId
|
||||
id = if (keepIdentifiers) id else null
|
||||
)
|
||||
|
||||
/** @inheritdoc */
|
||||
@ -581,8 +580,8 @@ object Set {
|
||||
override val passData: MetadataStorage = new MetadataStorage(),
|
||||
override val diagnostics: DiagnosticStorage = DiagnosticStorage()
|
||||
) extends Set
|
||||
with IRKind.Primitive {
|
||||
var id: UUID @Identifier = randomId
|
||||
with IRKind.Primitive
|
||||
with LazyId {
|
||||
|
||||
/** Creates a copy of `this`.
|
||||
*
|
||||
@ -632,7 +631,7 @@ object Set {
|
||||
if (keepMetadata) passData.duplicate else new MetadataStorage(),
|
||||
diagnostics =
|
||||
if (keepDiagnostics) diagnostics.copy else DiagnosticStorage(),
|
||||
id = if (keepIdentifiers) id else randomId
|
||||
id = if (keepIdentifiers) id else null
|
||||
)
|
||||
|
||||
/** @inheritdoc */
|
||||
|
@ -356,31 +356,31 @@ class DataflowAnalysisTest extends CompilerTest {
|
||||
val plusSymbol = mkDynamicDep("+")
|
||||
|
||||
// The Identifiers
|
||||
val methodId = mkStaticDep(method.getId)
|
||||
val fnId = mkStaticDep(fn.getId)
|
||||
val fnArgAId = mkStaticDep(fnArgA.getId)
|
||||
val fnArgBId = mkStaticDep(fnArgB.getId)
|
||||
val fnBodyId = mkStaticDep(fnBody.getId)
|
||||
val printlnExprId = mkStaticDep(printlnExpr.getId)
|
||||
val printlnFnId = mkStaticDep(printlnFn.getId)
|
||||
val printlnArgIOId = mkStaticDep(printlnArgIO.getId)
|
||||
val printlnArgIOExprId = mkStaticDep(printlnArgIOExpr.getId)
|
||||
val printlnArgBId = mkStaticDep(printlnArgB.getId)
|
||||
val printlnArgBExprId = mkStaticDep(printlnArgBExpr.getId)
|
||||
val cBindExprId = mkStaticDep(cBindExpr.getId)
|
||||
val cBindNameId = mkStaticDep(cBindName.getId)
|
||||
val plusExprId = mkStaticDep(plusExpr.getId)
|
||||
val plusExprFnId = mkStaticDep(plusExprFn.getId)
|
||||
val plusExprArgAId = mkStaticDep(plusExprArgA.getId)
|
||||
val plusExprArgAExprId = mkStaticDep(plusExprArgAExpr.getId)
|
||||
val plusExprArgBId = mkStaticDep(plusExprArgB.getId)
|
||||
val plusExprArgBExprId = mkStaticDep(plusExprArgBExpr.getId)
|
||||
val frobExprId = mkStaticDep(frobExpr.getId)
|
||||
val frobFnId = mkStaticDep(frobFn.getId)
|
||||
val frobArgAId = mkStaticDep(frobArgA.getId)
|
||||
val frobArgAExprId = mkStaticDep(frobArgAExpr.getId)
|
||||
val frobArgCId = mkStaticDep(frobArgC.getId)
|
||||
val frobArgCExprId = mkStaticDep(frobArgCExpr.getId)
|
||||
val methodId = mkStaticDep(method.getId())
|
||||
val fnId = mkStaticDep(fn.getId())
|
||||
val fnArgAId = mkStaticDep(fnArgA.getId())
|
||||
val fnArgBId = mkStaticDep(fnArgB.getId())
|
||||
val fnBodyId = mkStaticDep(fnBody.getId())
|
||||
val printlnExprId = mkStaticDep(printlnExpr.getId())
|
||||
val printlnFnId = mkStaticDep(printlnFn.getId())
|
||||
val printlnArgIOId = mkStaticDep(printlnArgIO.getId())
|
||||
val printlnArgIOExprId = mkStaticDep(printlnArgIOExpr.getId())
|
||||
val printlnArgBId = mkStaticDep(printlnArgB.getId())
|
||||
val printlnArgBExprId = mkStaticDep(printlnArgBExpr.getId())
|
||||
val cBindExprId = mkStaticDep(cBindExpr.getId())
|
||||
val cBindNameId = mkStaticDep(cBindName.getId())
|
||||
val plusExprId = mkStaticDep(plusExpr.getId())
|
||||
val plusExprFnId = mkStaticDep(plusExprFn.getId())
|
||||
val plusExprArgAId = mkStaticDep(plusExprArgA.getId())
|
||||
val plusExprArgAExprId = mkStaticDep(plusExprArgAExpr.getId())
|
||||
val plusExprArgBId = mkStaticDep(plusExprArgB.getId())
|
||||
val plusExprArgBExprId = mkStaticDep(plusExprArgBExpr.getId())
|
||||
val frobExprId = mkStaticDep(frobExpr.getId())
|
||||
val frobFnId = mkStaticDep(frobFn.getId())
|
||||
val frobArgAId = mkStaticDep(frobArgA.getId())
|
||||
val frobArgAExprId = mkStaticDep(frobArgAExpr.getId())
|
||||
val frobArgCId = mkStaticDep(frobArgC.getId())
|
||||
val frobArgCExprId = mkStaticDep(frobArgCExpr.getId())
|
||||
|
||||
"correctly identify global symbol direct dependents" in {
|
||||
depInfo.dependents.getDirect(frobnicateSymbol) shouldEqual Some(
|
||||
@ -960,15 +960,15 @@ class DataflowAnalysisTest extends CompilerTest {
|
||||
val plusArgYExpr = plusArgY.value.asInstanceOf[Name.Literal]
|
||||
|
||||
// Identifiers
|
||||
val fnId = mkStaticDep(fn.getId)
|
||||
val fnArgXId = mkStaticDep(fnArgX.getId)
|
||||
val fnArgYId = mkStaticDep(fnArgY.getId)
|
||||
val fnBodyId = mkStaticDep(fnBody.getId)
|
||||
val plusFnId = mkStaticDep(plusFn.getId)
|
||||
val plusArgXId = mkStaticDep(plusArgX.getId)
|
||||
val plusArgXExprId = mkStaticDep(plusArgXExpr.getId)
|
||||
val plusArgYId = mkStaticDep(plusArgY.getId)
|
||||
val plusArgYExprId = mkStaticDep(plusArgYExpr.getId)
|
||||
val fnId = mkStaticDep(fn.getId())
|
||||
val fnArgXId = mkStaticDep(fnArgX.getId())
|
||||
val fnArgYId = mkStaticDep(fnArgY.getId())
|
||||
val fnBodyId = mkStaticDep(fnBody.getId())
|
||||
val plusFnId = mkStaticDep(plusFn.getId())
|
||||
val plusArgXId = mkStaticDep(plusArgX.getId())
|
||||
val plusArgXExprId = mkStaticDep(plusArgXExpr.getId())
|
||||
val plusArgYId = mkStaticDep(plusArgY.getId())
|
||||
val plusArgYExprId = mkStaticDep(plusArgYExpr.getId())
|
||||
|
||||
// Dynamic Symbols
|
||||
val plusSym = mkDynamicDep("+")
|
||||
@ -1029,20 +1029,20 @@ class DataflowAnalysisTest extends CompilerTest {
|
||||
val mulArg2Expr = mulArg2.value.asInstanceOf[Name.Literal]
|
||||
|
||||
// Identifiers
|
||||
val appId = mkStaticDep(app.getId)
|
||||
val appFnId = mkStaticDep(appFn.getId)
|
||||
val appArg10Id = mkStaticDep(appArg10.getId)
|
||||
val appArg10ExprId = mkStaticDep(appArg10Expr.getId)
|
||||
val appArg10NameId = mkStaticDep(appArg10Name.getId)
|
||||
val appArgFnId = mkStaticDep(appArgFn.getId)
|
||||
val lamId = mkStaticDep(lam.getId)
|
||||
val lamArgXId = mkStaticDep(lamArgX.getId)
|
||||
val mulId = mkStaticDep(mul.getId)
|
||||
val mulFnId = mkStaticDep(mulFn.getId)
|
||||
val mulArg1Id = mkStaticDep(mulArg1.getId)
|
||||
val mulArg1ExprId = mkStaticDep(mulArg1Expr.getId)
|
||||
val mulArg2Id = mkStaticDep(mulArg2.getId)
|
||||
val mulArg2ExprId = mkStaticDep(mulArg2Expr.getId)
|
||||
val appId = mkStaticDep(app.getId())
|
||||
val appFnId = mkStaticDep(appFn.getId())
|
||||
val appArg10Id = mkStaticDep(appArg10.getId())
|
||||
val appArg10ExprId = mkStaticDep(appArg10Expr.getId())
|
||||
val appArg10NameId = mkStaticDep(appArg10Name.getId())
|
||||
val appArgFnId = mkStaticDep(appArgFn.getId())
|
||||
val lamId = mkStaticDep(lam.getId())
|
||||
val lamArgXId = mkStaticDep(lamArgX.getId())
|
||||
val mulId = mkStaticDep(mul.getId())
|
||||
val mulFnId = mkStaticDep(mulFn.getId())
|
||||
val mulArg1Id = mkStaticDep(mulArg1.getId())
|
||||
val mulArg1ExprId = mkStaticDep(mulArg1Expr.getId())
|
||||
val mulArg2Id = mkStaticDep(mulArg2.getId())
|
||||
val mulArg2ExprId = mkStaticDep(mulArg2Expr.getId())
|
||||
|
||||
// Global Symbols
|
||||
val mulSym = mkDynamicDep("*")
|
||||
@ -1108,7 +1108,7 @@ class DataflowAnalysisTest extends CompilerTest {
|
||||
lam.arguments.head.asInstanceOf[DefinitionArgument.Specified]
|
||||
|
||||
// The IDs
|
||||
val argXId = mkStaticDep(argX.getId)
|
||||
val argXId = mkStaticDep(argX.getId())
|
||||
|
||||
// The info
|
||||
val dependencies = depInfo.dependencies
|
||||
@ -1134,10 +1134,10 @@ class DataflowAnalysisTest extends CompilerTest {
|
||||
val xBindExpr = xBind.expression.asInstanceOf[Literal.Number]
|
||||
|
||||
// The IDs
|
||||
val blockId = mkStaticDep(block.getId)
|
||||
val xBindId = mkStaticDep(xBind.getId)
|
||||
val xBindNameId = mkStaticDep(xBindName.getId)
|
||||
val xBindExprId = mkStaticDep(xBindExpr.getId)
|
||||
val blockId = mkStaticDep(block.getId())
|
||||
val xBindId = mkStaticDep(xBind.getId())
|
||||
val xBindNameId = mkStaticDep(xBindName.getId())
|
||||
val xBindExprId = mkStaticDep(xBindExpr.getId())
|
||||
|
||||
// The info
|
||||
val dependents = depInfo.dependents
|
||||
@ -1171,9 +1171,9 @@ class DataflowAnalysisTest extends CompilerTest {
|
||||
val bindingExpr = binding.expression.asInstanceOf[Literal.Number]
|
||||
|
||||
// The IDs
|
||||
val bindingId = mkStaticDep(binding.getId)
|
||||
val bindingNameId = mkStaticDep(bindingName.getId)
|
||||
val bindingExprId = mkStaticDep(bindingExpr.getId)
|
||||
val bindingId = mkStaticDep(binding.getId())
|
||||
val bindingNameId = mkStaticDep(bindingName.getId())
|
||||
val bindingExprId = mkStaticDep(bindingExpr.getId())
|
||||
|
||||
// The info
|
||||
val dependents = depInfo.dependents
|
||||
@ -1217,14 +1217,14 @@ class DataflowAnalysisTest extends CompilerTest {
|
||||
val undefinedName = undefinedExpr.originalName
|
||||
|
||||
// The IDs
|
||||
val bindingId = mkStaticDep(binding.getId)
|
||||
val bindingExprId = mkStaticDep(bindingExpr.getId)
|
||||
val bindingNameId = mkStaticDep(bindingName.getId)
|
||||
val plusFnId = mkStaticDep(plusFn.getId)
|
||||
val numArgId = mkStaticDep(numArg.getId)
|
||||
val numArgExprId = mkStaticDep(numArgExpr.getId)
|
||||
val undefinedArgId = mkStaticDep(undefinedArg.getId)
|
||||
val undefinedExprId = mkStaticDep(undefinedExpr.getId)
|
||||
val bindingId = mkStaticDep(binding.getId())
|
||||
val bindingExprId = mkStaticDep(bindingExpr.getId())
|
||||
val bindingNameId = mkStaticDep(bindingName.getId())
|
||||
val plusFnId = mkStaticDep(plusFn.getId())
|
||||
val numArgId = mkStaticDep(numArg.getId())
|
||||
val numArgExprId = mkStaticDep(numArgExpr.getId())
|
||||
val undefinedArgId = mkStaticDep(undefinedArg.getId())
|
||||
val undefinedExprId = mkStaticDep(undefinedExpr.getId())
|
||||
|
||||
val undefinedSym = mkDynamicDep(undefinedName.name)
|
||||
val plusSym = mkDynamicDep("+")
|
||||
@ -1277,12 +1277,12 @@ class DataflowAnalysisTest extends CompilerTest {
|
||||
val vector = ir.body
|
||||
.asInstanceOf[Application.Sequence]
|
||||
|
||||
val xUseId = mkStaticDep(vector.items(0).getId)
|
||||
val yId = mkStaticDep(vector.items(1).getId)
|
||||
val litId = mkStaticDep(vector.items(2).getId)
|
||||
val vecId = mkStaticDep(vector.getId)
|
||||
val appId = mkStaticDep(ir.body.getId)
|
||||
val lamId = mkStaticDep(ir.getId)
|
||||
val xUseId = mkStaticDep(vector.items(0).getId())
|
||||
val yId = mkStaticDep(vector.items(1).getId())
|
||||
val litId = mkStaticDep(vector.items(2).getId())
|
||||
val vecId = mkStaticDep(vector.getId())
|
||||
val appId = mkStaticDep(ir.body.getId())
|
||||
val lamId = mkStaticDep(ir.getId())
|
||||
|
||||
// The info
|
||||
val dependents = depInfo.dependents
|
||||
@ -1313,8 +1313,8 @@ class DataflowAnalysisTest extends CompilerTest {
|
||||
val literal = ir.asInstanceOf[Application.Typeset]
|
||||
val literalExpression = literal.expression.get
|
||||
|
||||
val literalId = mkStaticDep(literal.getId)
|
||||
val literalExpressionId = mkStaticDep(literalExpression.getId)
|
||||
val literalId = mkStaticDep(literal.getId())
|
||||
val literalExpressionId = mkStaticDep(literalExpression.getId())
|
||||
|
||||
depInfo.dependents.getDirect(literalExpressionId).get shouldEqual Set(
|
||||
literalId
|
||||
@ -1369,26 +1369,26 @@ class DataflowAnalysisTest extends CompilerTest {
|
||||
val plusSym = mkDynamicDep("+")
|
||||
|
||||
// The IDs
|
||||
val caseBlockId = mkStaticDep(caseBlock.getId)
|
||||
val caseBindingId = mkStaticDep(caseBinding.getId)
|
||||
val caseBindingExprId = mkStaticDep(caseBindingExpr.getId)
|
||||
val caseBindingNameId = mkStaticDep(caseBindingName.getId)
|
||||
val caseExprId = mkStaticDep(caseExpr.getId)
|
||||
val consBranchId = mkStaticDep(consBranch.getId)
|
||||
val caseBlockId = mkStaticDep(caseBlock.getId())
|
||||
val caseBindingId = mkStaticDep(caseBinding.getId())
|
||||
val caseBindingExprId = mkStaticDep(caseBindingExpr.getId())
|
||||
val caseBindingNameId = mkStaticDep(caseBindingName.getId())
|
||||
val caseExprId = mkStaticDep(caseExpr.getId())
|
||||
val consBranchId = mkStaticDep(consBranch.getId())
|
||||
|
||||
val consBranchPatternId = mkStaticDep(consBranchPattern.getId)
|
||||
val consBranchPatternConsId = mkStaticDep(consBranchPatternCons.getId)
|
||||
val consBranchAPatternId = mkStaticDep(consBranchAPattern.getId)
|
||||
val consBranchADefId = mkStaticDep(consBranchADef.getId)
|
||||
val consBranchBPatternId = mkStaticDep(consBranchBPattern.getId)
|
||||
val consBranchBDefId = mkStaticDep(consBranchBDef.getId)
|
||||
val consBranchPatternId = mkStaticDep(consBranchPattern.getId())
|
||||
val consBranchPatternConsId = mkStaticDep(consBranchPatternCons.getId())
|
||||
val consBranchAPatternId = mkStaticDep(consBranchAPattern.getId())
|
||||
val consBranchADefId = mkStaticDep(consBranchADef.getId())
|
||||
val consBranchBPatternId = mkStaticDep(consBranchBPattern.getId())
|
||||
val consBranchBDefId = mkStaticDep(consBranchBDef.getId())
|
||||
|
||||
val consBranchExpressionId = mkStaticDep(consBranchExpression.getId)
|
||||
val consBranchFnId = mkStaticDep(consBranchFn.getId)
|
||||
val aArgId = mkStaticDep(aArg.getId)
|
||||
val aUseId = mkStaticDep(aUse.getId)
|
||||
val bArgId = mkStaticDep(bArg.getId)
|
||||
val bUseId = mkStaticDep(bUse.getId)
|
||||
val consBranchExpressionId = mkStaticDep(consBranchExpression.getId())
|
||||
val consBranchFnId = mkStaticDep(consBranchFn.getId())
|
||||
val aArgId = mkStaticDep(aArg.getId())
|
||||
val aUseId = mkStaticDep(aUse.getId())
|
||||
val bArgId = mkStaticDep(bArg.getId())
|
||||
val bUseId = mkStaticDep(bUse.getId())
|
||||
|
||||
// The info
|
||||
val dependents = depInfo.dependents
|
||||
@ -1567,18 +1567,18 @@ class DataflowAnalysisTest extends CompilerTest {
|
||||
val fooSymbol = mkDynamicDep("Foo")
|
||||
|
||||
// The identifiers
|
||||
val conversionId = mkStaticDep(conversion.getId)
|
||||
val sourceTypeId = mkStaticDep(sourceType.getId)
|
||||
val lambdaId = mkStaticDep(lambda.getId)
|
||||
val fnArgThisId = mkStaticDep(fnArgThis.getId)
|
||||
val fnArgValueId = mkStaticDep(fnArgValue.getId)
|
||||
val fnBodyId = mkStaticDep(fnBody.getId)
|
||||
val fooExprId = mkStaticDep(fooExpr.getId)
|
||||
val fooFunctionId = mkStaticDep(fooFunction.getId)
|
||||
val fooArg1Id = mkStaticDep(fooArg1.getId)
|
||||
val fooArg1ExprId = mkStaticDep(fooArg1Expr.getId)
|
||||
val fooArg2Id = mkStaticDep(fooArg2.getId)
|
||||
val fooArg2ExprId = mkStaticDep(fooArg2Expr.getId)
|
||||
val conversionId = mkStaticDep(conversion.getId())
|
||||
val sourceTypeId = mkStaticDep(sourceType.getId())
|
||||
val lambdaId = mkStaticDep(lambda.getId())
|
||||
val fnArgThisId = mkStaticDep(fnArgThis.getId())
|
||||
val fnArgValueId = mkStaticDep(fnArgValue.getId())
|
||||
val fnBodyId = mkStaticDep(fnBody.getId())
|
||||
val fooExprId = mkStaticDep(fooExpr.getId())
|
||||
val fooFunctionId = mkStaticDep(fooFunction.getId())
|
||||
val fooArg1Id = mkStaticDep(fooArg1.getId())
|
||||
val fooArg1ExprId = mkStaticDep(fooArg1Expr.getId())
|
||||
val fooArg2Id = mkStaticDep(fooArg2.getId())
|
||||
val fooArg2ExprId = mkStaticDep(fooArg2Expr.getId())
|
||||
|
||||
// The info
|
||||
val dependents = depInfo.dependents
|
||||
|
@ -118,8 +118,8 @@ class SectionsToBinOpTest extends CompilerTest {
|
||||
|
||||
lamBodyFirstArg.name shouldEqual leftLamArgName.name
|
||||
lamBodySecondArg.name shouldEqual rightLamArgName.name
|
||||
lamBodyFirstArg.getId should not equal leftLamArgName.getId
|
||||
lamBodySecondArg.getId should not equal rightLamArgName.getId
|
||||
lamBodyFirstArg.getId() should not equal leftLamArgName.getId()
|
||||
lamBodySecondArg.getId() should not equal rightLamArgName.getId()
|
||||
}
|
||||
|
||||
"work for right sections" in {
|
||||
@ -148,7 +148,7 @@ class SectionsToBinOpTest extends CompilerTest {
|
||||
.asInstanceOf[Name.Literal]
|
||||
|
||||
lamBodyFirstArg.name shouldEqual lamArgName.name
|
||||
lamBodyFirstArg.getId should not equal lamArgName.getId
|
||||
lamBodyFirstArg.getId() should not equal lamArgName.getId()
|
||||
}
|
||||
|
||||
"work when the section is nested" in {
|
||||
|
Loading…
Reference in New Issue
Block a user