This repository was archived by the owner on Jul 12, 2024. It is now read-only.
File tree 2 files changed +10
-5
lines changed
wasm/src/main/scala/ir2wasm
2 files changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -226,8 +226,6 @@ lazy val `scalajs-test-suite` = project
226
226
227
227
lazy val IgnoredTestNames : Set [String ] = {
228
228
Set (
229
- // reflective call: should be throw an exception when reflective proxy not found
230
- " org.scalajs.testsuite.compiler.WasPublicBeforeTyperTestScala2" ,
231
229
// javaLangClassGetNameRenamedThroughSemantics failed: org.junit.ComparisonFailure:
232
230
// expected:<[renamed.test.]Class> but was:<[org.scalajs.testsuite.compiler.ReflectionTest$RenamedTest]Class>
233
231
" org.scalajs.testsuite.compiler.ReflectionTest" ,
Original file line number Diff line number Diff line change @@ -1650,9 +1650,16 @@ object HelperFunctions {
1650
1650
instrs += I32_ADD
1651
1651
instrs += LOCAL_SET (i)
1652
1652
}
1653
- // method not found, trap
1654
- // TODO? maybe we should throw an exception
1655
- instrs += UNREACHABLE
1653
+ // throw new TypeError("...")
1654
+ instrs ++= ctx.getConstantStringInstr(" TypeError" )
1655
+ instrs += CALL (WasmFunctionName .jsGlobalRefGet)
1656
+ instrs += CALL (WasmFunctionName .jsNewArray)
1657
+ // Originally, exception is thrown from JS saying e.g. "obj2.z1__ is not a function"
1658
+ instrs ++= ctx.getConstantStringInstr(" Method not found" )
1659
+ instrs += CALL (WasmFunctionName .jsArrayPush)
1660
+ instrs += CALL (WasmFunctionName .jsNew)
1661
+ instrs += EXTERN_CONVERT_ANY
1662
+ instrs += THROW (ctx.exceptionTagName)
1656
1663
1657
1664
fctx.buildAndAddToContext()
1658
1665
}
You can’t perform that action at this time.
0 commit comments