From ad1ca4880b30f8c8e9fb5d805a32eeca4e58a3c1 Mon Sep 17 00:00:00 2001 From: maxonfjvipon Date: Sat, 2 Nov 2024 13:15:44 +0300 Subject: [PATCH] fix(#3257): some XSLs are optimied --- .../resources/org/eolang/parser/add-refs.xsl | 10 ++++++++-- .../errors/external-weak-typed-atoms.xsl | 2 +- .../org/eolang/parser/explicit-data.xsl | 20 ++++++++++++------- .../org/eolang/parser/resolve-aliases.xsl | 10 ++++++++-- .../org/eolang/parser/stars-to-tuples.xsl | 2 +- .../parser/warnings/unit-test-without-phi.xsl | 2 +- .../org/eolang/parser/XslBenchmarkIT.java | 6 +++++- 7 files changed, 37 insertions(+), 15 deletions(-) diff --git a/eo-parser/src/main/resources/org/eolang/parser/add-refs.xsl b/eo-parser/src/main/resources/org/eolang/parser/add-refs.xsl index 883f9763a1..ae2a15f8c6 100644 --- a/eo-parser/src/main/resources/org/eolang/parser/add-refs.xsl +++ b/eo-parser/src/main/resources/org/eolang/parser/add-refs.xsl @@ -32,7 +32,13 @@ SOFTWARE. global or just a mistake. --> - + + + + + + + @@ -76,7 +82,7 @@ SOFTWARE. - + diff --git a/eo-parser/src/main/resources/org/eolang/parser/errors/external-weak-typed-atoms.xsl b/eo-parser/src/main/resources/org/eolang/parser/errors/external-weak-typed-atoms.xsl index d7b0064939..dcb2bdc431 100644 --- a/eo-parser/src/main/resources/org/eolang/parser/errors/external-weak-typed-atoms.xsl +++ b/eo-parser/src/main/resources/org/eolang/parser/errors/external-weak-typed-atoms.xsl @@ -24,7 +24,7 @@ SOFTWARE. --> - + diff --git a/eo-parser/src/main/resources/org/eolang/parser/explicit-data.xsl b/eo-parser/src/main/resources/org/eolang/parser/explicit-data.xsl index de92135f0b..001828848b 100644 --- a/eo-parser/src/main/resources/org/eolang/parser/explicit-data.xsl +++ b/eo-parser/src/main/resources/org/eolang/parser/explicit-data.xsl @@ -61,9 +61,12 @@ SOFTWARE. - + + + + - + @@ -91,7 +94,10 @@ SOFTWARE. - + + + + @@ -101,10 +107,10 @@ SOFTWARE. bytes - + - + @@ -114,10 +120,10 @@ SOFTWARE. bytes - + - + diff --git a/eo-parser/src/main/resources/org/eolang/parser/resolve-aliases.xsl b/eo-parser/src/main/resources/org/eolang/parser/resolve-aliases.xsl index b19c8f2da6..a1ef1675a4 100644 --- a/eo-parser/src/main/resources/org/eolang/parser/resolve-aliases.xsl +++ b/eo-parser/src/main/resources/org/eolang/parser/resolve-aliases.xsl @@ -32,7 +32,13 @@ SOFTWARE. If some alias is badly formatted, a runtime error is issued. --> - + + + + + + + @@ -60,7 +66,7 @@ SOFTWARE. - + diff --git a/eo-parser/src/main/resources/org/eolang/parser/stars-to-tuples.xsl b/eo-parser/src/main/resources/org/eolang/parser/stars-to-tuples.xsl index 633a796b72..08cbbfb810 100644 --- a/eo-parser/src/main/resources/org/eolang/parser/stars-to-tuples.xsl +++ b/eo-parser/src/main/resources/org/eolang/parser/stars-to-tuples.xsl @@ -24,7 +24,7 @@ SOFTWARE. --> - + diff --git a/eo-parser/src/main/resources/org/eolang/parser/warnings/unit-test-without-phi.xsl b/eo-parser/src/main/resources/org/eolang/parser/warnings/unit-test-without-phi.xsl index f029e3fbee..63dd364b56 100644 --- a/eo-parser/src/main/resources/org/eolang/parser/warnings/unit-test-without-phi.xsl +++ b/eo-parser/src/main/resources/org/eolang/parser/warnings/unit-test-without-phi.xsl @@ -27,7 +27,7 @@ SOFTWARE. - + unit-test-without-phi diff --git a/eo-parser/src/test/java/org/eolang/parser/XslBenchmarkIT.java b/eo-parser/src/test/java/org/eolang/parser/XslBenchmarkIT.java index 6ba8b8a9b4..22e4f91ba4 100644 --- a/eo-parser/src/test/java/org/eolang/parser/XslBenchmarkIT.java +++ b/eo-parser/src/test/java/org/eolang/parser/XslBenchmarkIT.java @@ -62,7 +62,11 @@ public class XslBenchmarkIT { /** * Pairs of XSL and worst XMIR for the XSL. */ - @Param("/org/eolang/parser/add-default-package.xsl|org/eolang/parser/benchmark/native.xmir") + @Param({ + "/org/eolang/parser/add-default-package.xsl|org/eolang/parser/benchmark/native.xmir", + "/org/eolang/parser/add-refs.xsl|org/eolang/parser/benchmark/native.xmir", + "/org/eolang/parser/explicit-data.xsl|org/eolang/parser/benchmark/native.xmir" + }) private String pairs; @Benchmark