From 0f1b0e48f66226c8d333be07debeead476f4d696 Mon Sep 17 00:00:00 2001 From: Jihyeok Park Date: Sun, 6 Oct 2024 00:39:56 +0900 Subject: [PATCH] Update tyOpTest --- src/main/resources/result/spec-summary | 8 ++++---- src/main/scala/esmeta/ty/package.scala | 4 +++- src/test/scala/esmeta/ty/OpTinyTest.scala | 2 +- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/main/resources/result/spec-summary b/src/main/resources/result/spec-summary index a1c5e601cc..c1cb4654a1 100644 --- a/src/main/resources/result/spec-summary +++ b/src/main/resources/result/spec-summary @@ -11,9 +11,9 @@ - algorithm steps: 20532 (96.91%) - complete: 19898 - incomplete: 634 -- types: 7330 (95.08%) - - known: 6969 - - yet: 361 +- types: 7330 (95.10%) + - known: 6971 + - yet: 359 - unknown: 625 - tables: 94 -- type model: 90 \ No newline at end of file +- type model: 92 \ No newline at end of file diff --git a/src/main/scala/esmeta/ty/package.scala b/src/main/scala/esmeta/ty/package.scala index d88f7e733c..5c7a3fff87 100644 --- a/src/main/scala/esmeta/ty/package.scala +++ b/src/main/scala/esmeta/ty/package.scala @@ -220,8 +220,10 @@ lazy val AbruptT: ValueTy = ValueTy(record = RecordTy("AbruptCompletion")) def AbruptT(xs: String*): ValueTy = AbruptT(xs.toSet) def AbruptT(xs: Set[String]): ValueTy = ValueTy(record = RecordTy("AbruptCompletion", Map("Type" -> EnumT(xs.toSet)))) -lazy val ThrowT: ValueTy = RecordT("ThrowCompletion") +lazy val BreakT: ValueTy = RecordT("BreakCompletion") +lazy val ContinueT: ValueTy = RecordT("ContinueCompletion") lazy val ReturnT: ValueTy = RecordT("ReturnCompletion") +lazy val ThrowT: ValueTy = RecordT("ThrowCompletion") lazy val NormalT: ValueTy = ValueTy(record = RecordTy("NormalCompletion")) def NormalT(value: ValueTy): ValueTy = if (value.isBottom) BotT diff --git a/src/test/scala/esmeta/ty/OpTinyTest.scala b/src/test/scala/esmeta/ty/OpTinyTest.scala index c7c870fa09..b54b59be11 100644 --- a/src/test/scala/esmeta/ty/OpTinyTest.scala +++ b/src/test/scala/esmeta/ty/OpTinyTest.scala @@ -8,7 +8,7 @@ class OpTinyTest extends TyTest { def init: Unit = { checkEqual("or")( (ObjectT || FunctionT) -> ObjectT, - (ReturnT || AbruptT("break")) -> AbruptT("break", "return"), + (ReturnT || AbruptT("break")) -> (ReturnT || BreakT), (FunctionT || RecordT("ECMAScriptFunctionObject")) -> FunctionT, )