Skip to content

Commit

Permalink
minimize-modules: Removed CoreLibReflection.scala
Browse files Browse the repository at this point in the history
  • Loading branch information
aslesarenko committed Aug 25, 2023
1 parent fdeda45 commit 9676d88
Show file tree
Hide file tree
Showing 7 changed files with 400 additions and 415 deletions.
405 changes: 0 additions & 405 deletions common/shared/src/main/scala/sigma/CoreLibReflection.scala

This file was deleted.

2 changes: 0 additions & 2 deletions common/shared/src/main/scala/sigma/package.scala
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ import scala.reflect.ClassTag
* @see [[RType]] class
*/
package object sigma {
/** Forces reflection data initialization */
val coreLibReflection = CoreLibReflection

val AnyType: RType[Any] = GeneralType[Any](ClassTag.Any)

Expand Down
394 changes: 393 additions & 1 deletion common/shared/src/main/scala/sigma/reflection/CommonReflection.scala

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ package sigmastate

import org.ergoplatform.ErgoBox.RegisterId
import sigma.reflection.CommonReflection.registerClassEntry
import sigma.reflection.{mkConstructor, mkMethod}
import sigma.reflection.{CommonReflection, mkConstructor, mkMethod}
import sigma.Coll
import sigma.{AvlTree, CoreLibReflection, SigmaDslBuilder}
import sigma.{AvlTree, SigmaDslBuilder}
import sigmastate.SAvlTree.KeyValueColl
import sigmastate.SCollection.{SBooleanArray, SByteArray, SIntArray}
import sigmastate.Values._
Expand All @@ -21,7 +21,7 @@ import sigmastate.utxo._
* Only information that is needed at runtime is registered.
*/
object InterpreterReflection {
val reflection = CoreLibReflection
val reflection = CommonReflection

registerClassEntry(classOf[AND],
constructors = Array(
Expand Down
3 changes: 1 addition & 2 deletions sc/shared/src/main/scala/scalan/GraphIRReflection.scala
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package scalan
import scalan.primitives.Thunks
import sigma.reflection.CommonReflection.registerClassEntry
import sigma.reflection.{CommonReflection, mkConstructor, mkMethod}
import sigma.CoreLibReflection
import sigmastate.eval.SigmaLibrary
import sigma.Colls
import sigma.SigmaDsl
Expand All @@ -18,7 +17,7 @@ import wrappers.scalan.WRTypes
*/
object GraphIRReflection {
/** Forces initialization of reflection data. */
val reflection = (CommonReflection, CoreLibReflection)
val reflection = CommonReflection

{ val clazz = classOf[wrappers.scala.WOptions#WOption[_]]
val ctx = null.asInstanceOf[scalan.Library] // ok! type level only
Expand Down
4 changes: 2 additions & 2 deletions sc/shared/src/test/scala/scalan/TestContexts.scala
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package scalan

import sigma.reflection.RMethod
import sigma.{BaseNestedTests, BaseShouldTests, BaseTests, CoreLibReflection, TestUtils}
import sigma.{BaseNestedTests, BaseShouldTests, BaseTests, TestUtils}

trait TestContexts extends TestUtils {

Expand Down Expand Up @@ -35,7 +35,7 @@ trait TestContexts extends TestUtils {
}

abstract class BaseCtxTests extends BaseTests with TestContexts {
val reflection = (CoreLibReflection, GraphIRReflection)
val reflection = GraphIRReflection
}

abstract class BaseNestedCtxTests extends BaseNestedTests with TestContexts
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import org.ergoplatform.sdk.wallet.secrets.{DerivationPath, ExtendedSecretKey}
import org.ergoplatform.sdk.wallet.{Constants, TokensMap}
import org.ergoplatform.settings.ErgoAlgos
import scorex.crypto.authds.ADKey
import sigmastate.utils.Helpers._ // don't remove, required for Scala 2.11
import scorex.util.encode.Base16
import scorex.util.{ModifierId, bytesToId, idToBytes}
import sigma.data.ExactIntegral.LongIsExactIntegral
Expand Down

0 comments on commit 9676d88

Please sign in to comment.