@@ -37,7 +37,7 @@ object HelperFunctions {
3737
3838 private def genStringLiteral ()(implicit ctx : WasmContext ): Unit = {
3939 import WasmTypeName .WasmArrayTypeName
40- import WasmImmediate . _
40+
4141 val fctx = WasmFunctionContext (
4242 WasmFunctionName .stringLiteral,
4343 List (" offset" -> WasmInt32 , " size" -> WasmInt32 , " stringIndex" -> WasmInt32 ),
@@ -74,7 +74,6 @@ object HelperFunctions {
7474
7575 /** `createStringFromData: (ref array u16) -> (ref any)` (representing a `string`). */
7676 private def genCreateStringFromData ()(implicit ctx : WasmContext ): Unit = {
77- import WasmImmediate ._
7877 import WasmTypeName .WasmArrayTypeName
7978
8079 val dataType = WasmRefType (WasmArrayTypeName .i16Array)
@@ -152,7 +151,6 @@ object HelperFunctions {
152151 * [[https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Class.html#getName() ]]
153152 */
154153 private def genTypeDataName ()(implicit ctx : WasmContext ): Unit = {
155- import WasmImmediate ._
156154 import WasmTypeName ._
157155
158156 val typeDataType = WasmRefType (WasmStructType .typeData.name)
@@ -291,7 +289,6 @@ object HelperFunctions {
291289 * with the non-null case as a fast-path.
292290 */
293291 private def genCreateClassOf ()(implicit ctx : WasmContext ): Unit = {
294- import WasmImmediate ._
295292 import WasmTypeName .WasmStructTypeName
296293
297294 val typeDataType = WasmRefType (WasmStructType .typeData.name)
@@ -412,7 +409,6 @@ object HelperFunctions {
412409 * performance-sensitive.
413410 */
414411 private def genGetClassOf ()(implicit ctx : WasmContext ): Unit = {
415- import WasmImmediate ._
416412 import WasmTypeName .WasmStructTypeName
417413
418414 val typeDataType = WasmRefType (WasmStructType .typeData.name)
@@ -446,7 +442,6 @@ object HelperFunctions {
446442 * must be be strictly positive.
447443 */
448444 private def genArrayTypeData ()(implicit ctx : WasmContext ): Unit = {
449- import WasmImmediate ._
450445 import WasmTypeName ._
451446
452447 val typeDataType = WasmRefType (WasmStructType .typeData.name)
@@ -549,7 +544,6 @@ object HelperFunctions {
549544 * [[https://lampwww.epfl.ch/~doeraene/sjsir-semantics/#sec-sjsir-createclassdataof ]].
550545 */
551546 private def genIsInstance ()(implicit ctx : WasmContext ): Unit = {
552- import WasmImmediate ._
553547 import WasmTypeName .WasmStructTypeName
554548 import WasmFieldIdx .typeData ._
555549
@@ -719,8 +713,6 @@ object HelperFunctions {
719713 * This is the underlying func for the `isAssignableFrom()` closure inside class data objects.
720714 */
721715 private def genIsAssignableFromExternal ()(implicit ctx : WasmContext ): Unit = {
722- import WasmImmediate ._
723-
724716 val typeDataType = WasmRefType (WasmStructType .typeData.name)
725717
726718 val fctx = WasmFunctionContext (
@@ -753,7 +745,6 @@ object HelperFunctions {
753745 * Specified by `java.lang.Class.isAssignableFrom(Class)`.
754746 */
755747 private def genIsAssignableFrom ()(implicit ctx : WasmContext ): Unit = {
756- import WasmImmediate ._
757748 import WasmTypeName ._
758749 import WasmFieldIdx .typeData ._
759750
@@ -913,7 +904,6 @@ object HelperFunctions {
913904 * This is the underlying func for the `getComponentType()` closure inside class data objects.
914905 */
915906 private def genGetComponentType ()(implicit ctx : WasmContext ): Unit = {
916- import WasmImmediate ._
917907 import WasmTypeName .WasmStructTypeName
918908
919909 val typeDataType = WasmRefType (WasmStructType .typeData.name)
@@ -952,7 +942,6 @@ object HelperFunctions {
952942 * This is the underlying func for the `newArrayOfThisClass()` closure inside class data objects.
953943 */
954944 private def genNewArrayOfThisClass ()(implicit ctx : WasmContext ): Unit = {
955- import WasmImmediate ._
956945 import WasmTypeName .WasmStructTypeName
957946
958947 val typeDataType = WasmRefType (WasmStructType .typeData.name)
@@ -1033,7 +1022,6 @@ object HelperFunctions {
10331022 * [[https://www.scala-js.org/doc/semantics.html#getclass ]].
10341023 */
10351024 private def genAnyGetClass ()(implicit ctx : WasmContext ): Unit = {
1036- import WasmImmediate ._
10371025 import WasmTypeName .WasmStructTypeName
10381026
10391027 val typeDataType = WasmRefType (WasmStructType .typeData.name)
@@ -1185,7 +1173,6 @@ object HelperFunctions {
11851173 * lengths, lengthIndex - 1)`.
11861174 */
11871175 def genNewArrayObject ()(implicit ctx : WasmContext ): Unit = {
1188- import WasmImmediate ._
11891176 import WasmTypeName ._
11901177 import WasmFieldIdx .typeData ._
11911178
@@ -1374,7 +1361,6 @@ object HelperFunctions {
13741361 * See https://github.com/tanishiking/scala-wasm/issues/27#issuecomment-2008252049
13751362 */
13761363 def genInstanceTest (clazz : LinkedClass )(implicit ctx : WasmContext ): Unit = {
1377- import WasmImmediate ._
13781364 assert(clazz.kind == ClassKind .Interface )
13791365
13801366 val fctx = WasmFunctionContext (
@@ -1429,7 +1415,6 @@ object HelperFunctions {
14291415 * called on the class instance.
14301416 */
14311417 def genCloneFunction (clazz : LinkedClass )(implicit ctx : WasmContext ): Unit = {
1432- import WasmImmediate ._
14331418 val info = ctx.getClassInfo(clazz.name.name)
14341419 if (info.ancestors.contains(IRNames .CloneableClass ) && ! info.isAbstract) {
14351420 val heapType =
0 commit comments