Skip to content
This repository was archived by the owner on Jul 12, 2024. It is now read-only.

Commit f1a5b5f

Browse files
committed
Remove the patched class for FloatingPointBits.
We now have enough infrastructure to support the original implementation.
1 parent 1f39644 commit f1a5b5f

File tree

1 file changed

+1
-32
lines changed

1 file changed

+1
-32
lines changed

Diff for: wasm/src/main/scala/ir2wasm/LibraryPatches.scala

+1-32
Original file line numberDiff line numberDiff line change
@@ -40,42 +40,11 @@ object LibraryPatches {
4040
}
4141

4242
patched1.map { irFiles1 =>
43-
val extra = List(FloatingPointBitsIRFile, derivedCharBox.get(), derivedLongBox.get())
43+
val extra = List(derivedCharBox.get(), derivedLongBox.get())
4444
extra ++ irFiles1
4545
}
4646
}
4747

48-
private val FloatingPointBitsIRFile: IRFile = {
49-
val classDef = ClassDef(
50-
ClassIdent("java.lang.FloatingPointBits$"),
51-
NON,
52-
ModuleClass,
53-
None,
54-
Some(ClassIdent(ObjectClass)),
55-
Nil,
56-
None,
57-
None,
58-
Nil,
59-
List(
60-
trivialCtor("java.lang.FloatingPointBits$"),
61-
MethodDef(
62-
EMF, MethodIdent(m("numberHashCode", List(D), I)), NON,
63-
List(paramDef("value", DoubleType)), IntType,
64-
Some(Block(
65-
// TODO This is not a compliant but it's good enough for now
66-
UnaryOp(UnaryOp.DoubleToInt, VarRef("value")(DoubleType))
67-
))
68-
)(EOH, NOV)
69-
),
70-
None,
71-
Nil,
72-
Nil,
73-
Nil
74-
)(EOH)
75-
76-
MemClassDefIRFile(classDef)
77-
}
78-
7948
/** Generates the accompanying Box class of `Character` or `Long`.
8049
*
8150
* These box classes will be used as the generic representation of `char`s

0 commit comments

Comments
 (0)