Skip to content

Commit

Permalink
Refactor analysis framework for pluggable abstract domains / Add `Typ…
Browse files Browse the repository at this point in the history
…eCheckSmallTest` (#212)
  • Loading branch information
jhnaldo authored Feb 8, 2024
1 parent 327d796 commit c7b7152
Show file tree
Hide file tree
Showing 243 changed files with 8,424 additions and 7,798 deletions.
2 changes: 1 addition & 1 deletion .completion
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ _esmeta_completions() {
buildcfgOpt="-build-cfg:log -build-cfg:dot -build-cfg:pdf"
tycheckOpt="-tycheck:target -tycheck:repl -tycheck:repl-continue -tycheck:ignore -tycheck:update-ignore -tycheck:log"
parseOpt="-parse:debug"
evalOpt="-eval:timeout -eval:tycheck -eval:multiple -eval:log"
evalOpt="-eval:timeout -eval:multiple -eval:log"
webOpt="-web:port"
test262testOpt="-test262-test:target -test262-test:progress -test262-test:coverage -test262-test:timeout -test262-test:with-yet -test262-test:log -test262-test:concurrent -test262-test:verbose"
injectOpt="-inject:defs -inject:out -inject:log"
Expand Down
12 changes: 9 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,18 @@ jobs:
with:
submodules: true

- name: Fetch all tags from ecma262
env:
ESMETA_HOME: ${{ github.workspace }}
run:
cd ecma262 && git fetch --tags

- name: Run test
env:
ESMETA_HOME: ${{ github.workspace }}
run: sbt basicTest
run: sbt basicTest || (cat tests/detail && exit 1)

- name: Report Status
- name: Report status
if: failure()
uses: 8398a7/action-slack@v3
with:
Expand All @@ -35,7 +41,7 @@ jobs:
- name: Check code format
run: sbt formatCheck

- name: Report Status
- name: Report status
if: failure()
uses: 8398a7/action-slack@v3
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
if: always()
with:
name: playwright-report
path: playwright-report/
path: $ESMETA_HOME/client/playwright-report/
retention-days: 30

- name: Report Status
Expand Down
5 changes: 5 additions & 0 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,8 @@ lazy val stateStringifyTest =
lazy val analyzerTest = taskKey[Unit]("Launch analyzer tests")
lazy val analyzerStringifyTest =
taskKey[Unit]("Launch stringify tests for analyzer (tiny)")
lazy val analyzerTypeCheckTest =
taskKey[Unit]("Launch typecheck tests for analyzer (small)")

// es
lazy val esTest = taskKey[Unit]("Launch ECMAScript tests")
Expand Down Expand Up @@ -259,6 +261,9 @@ lazy val root = project
analyzerStringifyTest := (Test / testOnly)
.toTask(" *.analyzer.Stringify*Test")
.value,
analyzerTypeCheckTest := (Test / testOnly)
.toTask(" *.analyzer.TypeCheck*Test")
.value,
// es
esTest := (Test / testOnly).toTask(" *.es.*Test").value,
esEvalTest := (Test / testOnly).toTask(" *.es.Eval*Test").value,
Expand Down
2 changes: 1 addition & 1 deletion client
1 change: 0 additions & 1 deletion src/main/resources/manuals/d048f32e861c2ed4/tag

This file was deleted.

1 change: 0 additions & 1 deletion src/main/resources/manuals/d711ba960cd12b76/tag

This file was deleted.

1 change: 1 addition & 0 deletions src/main/resources/manuals/default/hash
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3a773fc9fae58be023228b13dbbd402ac18eeb6b
45 changes: 45 additions & 0 deletions src/main/resources/manuals/default/tycheck-ignore.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
[
"AddEntriesFromIterable",
"ArrayAssignmentPattern[0,0].DestructuringAssignmentEvaluation",
"ArrayAssignmentPattern[0,1].DestructuringAssignmentEvaluation",
"ArrayAssignmentPattern[0,2].DestructuringAssignmentEvaluation",
"ArrayAssignmentPattern[0,3].DestructuringAssignmentEvaluation",
"ArrayAssignmentPattern[1,0].DestructuringAssignmentEvaluation",
"ArrayAssignmentPattern[2,0].DestructuringAssignmentEvaluation",
"ArrayAssignmentPattern[2,1].DestructuringAssignmentEvaluation",
"ArrayAssignmentPattern[2,2].DestructuringAssignmentEvaluation",
"ArrayAssignmentPattern[2,3].DestructuringAssignmentEvaluation",
"ArrayCreate",
"AsyncGeneratorBody[0,0].EvaluateAsyncGeneratorBody",
"BindingPattern[1,0].BindingInitialization",
"BoundFunctionCreate",
"Catch[0,0].CatchClauseEvaluation",
"Catch[1,0].CatchClauseEvaluation",
"ClassStaticBlockBody[0,0].EvaluateClassStaticBlockBody",
"CreateBuiltinFunction",
"FlattenIntoArray",
"ForIn/OfBodyEvaluation",
"FunctionBody[0,0].EvaluateFunctionBody",
"GeneratorBody[0,0].EvaluateGeneratorBody",
"GetGlobalObject",
"GetMethod",
"GetPromiseResolve",
"GetThisValue",
"InnerModuleEvaluation",
"LabelledItem[1,0].LabelledEvaluation",
"LengthOfArrayLike",
"MethodDefinition[0,0].DefineMethod",
"ModuleNamespaceCreate",
"ProxyCreate",
"ScriptEvaluation",
"SerializeJSONObject",
"SetFunctionLength",
"SourceTextModuleRecord.ExecuteModule",
"SourceTextModuleRecord.ResolveExport",
"SpeciesConstructor",
"Statement[0,0].LabelledEvaluation",
"Statement[1,0].LabelledEvaluation",
"Statement[2,0].LabelledEvaluation",
"StringCreate",
"StringPad"
]
1 change: 1 addition & 0 deletions src/main/resources/manuals/es2022/hash
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
d711ba960cd12b7658d6bb26d7556e690290190c
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,12 @@
"BoundFunctionCreate",
"Catch[0,0].CatchClauseEvaluation",
"Catch[1,0].CatchClauseEvaluation",
"ClassElement[0,0].ClassElementEvaluation",
"ClassElement[1,0].ClassElementEvaluation",
"ClassStaticBlockBody[0,0].EvaluateClassStaticBlockBody",
"CreateArrayIterator",
"CreateBuiltinFunction",
"CreateMappedArgumentsObject",
"CreateUnmappedArgumentsObject",
"ECMAScriptFunctionObject.Construct",
"FlattenIntoArray",
Expand All @@ -36,15 +39,13 @@
"LabelledItem[1,0].LabelledEvaluation",
"LengthOfArrayLike",
"ModuleNamespaceCreate",
"ModuleNamespaceExoticObject.OwnPropertyKeys",
"OptionalChain[1,0].ChainEvaluation",
"OptionalChain[2,0].ChainEvaluation",
"OptionalChain[4,0].ChainEvaluation",
"OptionalChain[6,0].ChainEvaluation",
"OptionalChain[7,0].ChainEvaluation",
"OptionalChain[9,0].ChainEvaluation",
"OrdinaryFunctionCreate",
"OrdinaryObject.OwnPropertyKeys",
"ProxyCreate",
"SerializeJSONObject",
"SetFunctionLength",
Expand All @@ -57,4 +58,4 @@
"StringCreate",
"ToBigInt",
"ToNumber"
]
]
1 change: 1 addition & 0 deletions src/main/resources/manuals/es2023/hash
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
d048f32e861c2ed4a26f59a50d392918f26da3ba
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,4 @@
"Statement[1,0].LabelledEvaluation",
"Statement[2,0].LabelledEvaluation",
"StringCreate"
]
]
3 changes: 3 additions & 0 deletions src/main/scala/esmeta/Command.scala
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ sealed abstract class Command[Result](
parser(args)
ESMeta(this, runner(_), cmdConfig)

/** run command with command-line arguments */
def apply(args: String): Result = apply(args.split(" +").toList)

/** a list of phases without specific IO types */
def phases: Vector[Phase[_, _]] = pList.phases

Expand Down
Loading

0 comments on commit c7b7152

Please sign in to comment.