[前][次][番号順一覧][スレッド一覧]

ruby-changes:68772

From: Maxime <ko1@a...>
Date: Thu, 21 Oct 2021 08:13:30 +0900 (JST)
Subject: [ruby-changes:68772] 8ed77f96fc (master): Add another torture test to `make btest`

https://git.ruby-lang.org/ruby.git/commit/?id=8ed77f96fc

From 8ed77f96fc7df4ff0a1a91507cd7bf11e1f6788e Mon Sep 17 00:00:00 2001
From: Maxime Chevalier-Boisvert <maxime.chevalierboisvert@s...>
Date: Fri, 12 Feb 2021 12:16:48 -0500
Subject: Add another torture test to `make btest`

---
 bootstraptest/test_ujit_30k_ifelse.rb  | 241023 ++++++++++++++++++++++++++++++
 bootstraptest/test_ujit_30k_methods.rb | 121018 +++++++++++++++
 bootstraptest/test_ujit_many_funs.rb   | 121018 ---------------
 3 files changed, 362041 insertions(+), 121018 deletions(-)
 create mode 100644 bootstraptest/test_ujit_30k_ifelse.rb
 create mode 100644 bootstraptest/test_ujit_30k_methods.rb
 delete mode 100644 bootstraptest/test_ujit_many_funs.rb

diff --git a/bootstraptest/test_ujit_30k_ifelse.rb b/bootstraptest/test_ujit_30k_ifelse.rb
new file mode 100644
index 0000000000..be07b35c98
--- /dev/null
+++ b/bootstraptest/test_ujit_30k_ifelse.rb
@@ -0,0 +1,241023 @@ https://github.com/ruby/ruby/blob/trunk/bootstraptest/test_ujit_30k_ifelse.rb#L1
+# This is a torture test for the JIT.
+# There are 30K tiny methods with if-else statements in a 30-deep call hierarchy.
+assert_equal '100000', %q{
+
+def fun_l0_n0(x)
+    if (x < 1)
+        fun_l1_n310(x)
+    else
+        fun_l1_n485(x)
+    end
+end
+
+def fun_l0_n1(x)
+    if (x < 1)
+        fun_l1_n930(x)
+    else
+        fun_l1_n418(x)
+    end
+end
+
+def fun_l0_n2(x)
+    if (x < 1)
+        fun_l1_n549(x)
+    else
+        fun_l1_n44(x)
+    end
+end
+
+def fun_l0_n3(x)
+    if (x < 1)
+        fun_l1_n394(x)
+    else
+        fun_l1_n447(x)
+    end
+end
+
+def fun_l0_n4(x)
+    if (x < 1)
+        fun_l1_n683(x)
+    else
+        fun_l1_n547(x)
+    end
+end
+
+def fun_l0_n5(x)
+    if (x < 1)
+        fun_l1_n320(x)
+    else
+        fun_l1_n896(x)
+    end
+end
+
+def fun_l0_n6(x)
+    if (x < 1)
+        fun_l1_n649(x)
+    else
+        fun_l1_n243(x)
+    end
+end
+
+def fun_l0_n7(x)
+    if (x < 1)
+        fun_l1_n100(x)
+    else
+        fun_l1_n243(x)
+    end
+end
+
+def fun_l0_n8(x)
+    if (x < 1)
+        fun_l1_n839(x)
+    else
+        fun_l1_n720(x)
+    end
+end
+
+def fun_l0_n9(x)
+    if (x < 1)
+        fun_l1_n177(x)
+    else
+        fun_l1_n555(x)
+    end
+end
+
+def fun_l0_n10(x)
+    if (x < 1)
+        fun_l1_n814(x)
+    else
+        fun_l1_n900(x)
+    end
+end
+
+def fun_l0_n11(x)
+    if (x < 1)
+        fun_l1_n585(x)
+    else
+        fun_l1_n901(x)
+    end
+end
+
+def fun_l0_n12(x)
+    if (x < 1)
+        fun_l1_n952(x)
+    else
+        fun_l1_n270(x)
+    end
+end
+
+def fun_l0_n13(x)
+    if (x < 1)
+        fun_l1_n172(x)
+    else
+        fun_l1_n209(x)
+    end
+end
+
+def fun_l0_n14(x)
+    if (x < 1)
+        fun_l1_n514(x)
+    else
+        fun_l1_n414(x)
+    end
+end
+
+def fun_l0_n15(x)
+    if (x < 1)
+        fun_l1_n190(x)
+    else
+        fun_l1_n100(x)
+    end
+end
+
+def fun_l0_n16(x)
+    if (x < 1)
+        fun_l1_n696(x)
+    else
+        fun_l1_n997(x)
+    end
+end
+
+def fun_l0_n17(x)
+    if (x < 1)
+        fun_l1_n568(x)
+    else
+        fun_l1_n820(x)
+    end
+end
+
+def fun_l0_n18(x)
+    if (x < 1)
+        fun_l1_n837(x)
+    else
+        fun_l1_n588(x)
+    end
+end
+
+def fun_l0_n19(x)
+    if (x < 1)
+        fun_l1_n206(x)
+    else
+        fun_l1_n126(x)
+    end
+end
+
+def fun_l0_n20(x)
+    if (x < 1)
+        fun_l1_n317(x)
+    else
+        fun_l1_n722(x)
+    end
+end
+
+def fun_l0_n21(x)
+    if (x < 1)
+        fun_l1_n614(x)
+    else
+        fun_l1_n372(x)
+    end
+end
+
+def fun_l0_n22(x)
+    if (x < 1)
+        fun_l1_n530(x)
+    else
+        fun_l1_n862(x)
+    end
+end
+
+def fun_l0_n23(x)
+    if (x < 1)
+        fun_l1_n889(x)
+    else
+        fun_l1_n271(x)
+    end
+end
+
+def fun_l0_n24(x)
+    if (x < 1)
+        fun_l1_n996(x)
+    else
+        fun_l1_n717(x)
+    end
+end
+
+def fun_l0_n25(x)
+    if (x < 1)
+        fun_l1_n726(x)
+    else
+        fun_l1_n939(x)
+    end
+end
+
+def fun_l0_n26(x)
+    if (x < 1)
+        fun_l1_n316(x)
+    else
+        fun_l1_n293(x)
+    end
+end
+
+def fun_l0_n27(x)
+    if (x < 1)
+        fun_l1_n90(x)
+    else
+        fun_l1_n596(x)
+    end
+end
+
+def fun_l0_n28(x)
+    if (x < 1)
+        fun_l1_n743(x)
+    else
+        fun_l1_n782(x)
+    end
+end
+
+def fun_l0_n29(x)
+    if (x < 1)
+        fun_l1_n896(x)
+    else
+        fun_l1_n247(x)
+    end
+end
+
+def fun_l0_n30(x)
+    if (x < 1)
+        fun_l1_n2(x)
+    else
+        fun_l1_n377(x)
+    end
+end
+
+def fun_l0_n31(x)
+    if (x < 1)
+        fun_l1_n380(x)
+    else
+        fun_l1_n655(x)
+    end
+end
+
+def fun_l0_n32(x)
+    if (x < 1)
+        fun_l1_n572(x)
+    else
+        fun_l1_n778(x)
+    end
+end
+
+def fun_l0_n33(x)
+    if (x < 1)
+        fun_l1_n485(x)
+    else
+        fun_l1_n282(x)
+    end
+end
+
+def fun_l0_n34(x)
+    if (x < 1)
+        fun_l1_n703(x)
+    else
+        fun_l1_n179(x)
+    end
+end
+
+def fun_l0_n35(x)
+    if (x < 1)
+        fun_l1_n281(x)
+    else
+        fun_l1_n572(x)
+    end
+end
+
+def fun_l0_n36(x)
+    if (x < 1)
+        fun_l1_n48(x)
+    else
+        fun_l1_n286(x)
+    end
+end
+
+def fun_l0_n37(x)
+    if (x < 1)
+        fun_l1_n539(x)
+    else
+        fun_l1_n86(x)
+    end
+end
+
+def fun_l0_n38(x)
+    if (x < 1)
+        fun_l1_n918(x)
+    else
+        fun_l1_n778(x)
+    end
+end
+
+def fun_l0_n39(x)
+    if (x < 1)
+        fun_l1_n832(x)
+    else
+        fun_l1_n94(x)
+    end
+end
+
+def fun_l0_n40(x)
+    if (x < 1)
+        fun_l1_n213(x)
+    else
+        fun_l1_n580(x)
+    end
+end
+
+def fun_l0_n41(x)
+    if (x < 1)
+        fun_l1_n413(x)
+    else
+        fun_l1_n793(x)
+    end
+end
+
+def fun_l0_n42(x)
+    if (x < 1)
+        fun_l1_n451(x)
+    else
+        fun_l1_n779(x)
+    end
+end
+
+def fun_l0_n43(x)
+    if (x < 1)
+        fun_l1_n118(x)
+    else
+        fun_l1_n778(x)
+    end
+end
+
+def fun_l0_n44(x)
+    if (x < 1)
+        fun_l1_n162(x)
+    else
+        fun_l1_n901(x)
+    end
+end
+
+def fun_l0_n45(x)
+    if (x < 1)
+        fun_l1_n157(x)
+    else
+        fun_l1_n280(x)
+    end
+end
+
+def fun_l0_n46(x)
+    if (x < 1)
+        fun_l1_n748(x)
+    else
+        fun_l1_n881(x)
+    end
+end
+
+def fun_l0_n47(x)
+    if (x < 1)
+        fun_l1_n529(x)
+    else
+        fun_l1_n732(x)
+    end
+end
+
+def fun_l0_n48(x)
+    if (x < 1)
+        fun_l1_n417(x)
+    else
+        fun_l1_n483(x)
+    end
+end
+
+def fun_l0_n49(x)
+    if (x < 1)
+        fun_l1_n743(x)
+    else
+        fun_l1_n525(x)
+    end
+end
+
+def fun_l0_n50(x)
+    if (x < 1)
+        fun_l1_n14(x)
+    else
+        fun_l1_n309(x)
+    end
+end
+
+def fun_l0_n51(x)
+    if (x < 1)
+        fun_l1_n436(x)
+    else
+        fun_l1_n304(x)
+    end
+end
+
+def fun_l0_n52(x)
+    if (x < 1)
+        fun_l1_n623(x)
+    else
+        fun_l1_n590(x)
+    end
+end
+
+def fun_l0_n53(x)
+    if (x < 1)
+        fun_l1_n696(x)
+    else
+        fun_l1_n53(x)
+    end
+end
+
+def fun_l0_n54(x)
+    if (x < 1)
+        fun_l1_n807(x)
+    else
+        fun_l1_n523(x)
+    end
+end
+
+def fun_l0_n55(x)
+    if (x < 1)
+        fun_l1_n607(x)
+    else
+        fun_l1_n609(x)
+    end
+end
+
+def fun_l0_n56(x)
+    if (x < 1)
+        fun_l1_n721(x)
+    else
+        fun_l1_n994(x)
+    end
+end
+
+def fun_l0_n57(x)
+    if (x < 1)
+        fun_l1_n472(x)
+    else
+        fun_l1_n818(x)
+    end
+end
+
+def fun_l0_n58(x)
+    if (x < 1)
+        fun_l1_n30(x)
+    else
+        fun_l1_n954(x)
+    end
+end
+
+def fun_l0_n59(x)
+    if (x < 1)
+        fun_l1_n223(x)
+    else
+        fun_l1_n148(x)
+    end
+end
+
+def fun_l0_n60(x)
+    if (x < 1)
+        fun_l1_n761(x)
+    else
+        fun_l1_n40(x)
+    end
+end
+
+def fun_l0_n61(x)
+    if (x < 1)
+        fun_l1_n57(x)
+    else
+        fun_l1_n858(x)
+    end
+end
+
+def fun_l0_n62(x)
+    if (x < 1)
+        fun_l1_n114(x)
+    else
+        fun_l1_n767(x)
+    end
+end
+
+def fun_l0_n63(x)
+    if (x < 1)
+        fun_l1_n287(x)
+    else
+        fun_l1_n752(x)
+    end
+end
+
+def fun_l0_n64(x)
+    if (x < 1)
+        fun_l1_n16(x)
+    else
+        fun_l1_n229(x)
+    end
+end
+
+def fun_l0_n65(x)
+    if (x < 1)
+        fun_l1_n230(x)
+    else
+        fun_l1_n954(x)
+    end
+end
+
+def fun_l0_n66(x)
+    if (x < 1)
+        fun_l1_n98(x)
+    else
+        fun_l1_n320(x)
+    end
+end
+
+def fun_l0_n67(x)
+    if (x < 1)
+        fun_l1_n878(x)
+    else
+        fun_l1_n985(x)
+    end
+end
+
+def fun_l0_n68(x)
+    if (x < 1)
+        fun_l1_n32(x)
+    else
+        fun_l1_n648(x)
+    end
+end
+
+def fun_l0_n69(x)
+    if (x < 1)
+        fun_l1_n453(x)
+    else
+        fun_l1_n466(x)
+    end
+end
+
+def fun_l0_n70(x)
+    if (x < 1)
+        fun_l1_n787(x)
+    else
+        fun_l1_n802(x)
+    end
+end
+
+def fun_l0_n71(x)
+    if (x < 1)
+        fun_l1_n656(x)
+    else
+        fun_l1_n347(x)
+    end
+end
+
+def fun_l0_n72(x)
+    if (x < 1)
+        fun_l1_n358(x)
+    else
+        fun_l1_n336(x)
+    end
+end
+
+def fun_l0_n73(x)
+    if (x < 1)
+        fun_l1_n291(x)
+    else
+        fun_l1_n536(x)
+    end
+end
+
+def fun_l0_n74(x)
+    if (x < 1)
+        fun_l1_n795(x)
+    else
+        fun_l1_n606(x)
+    end
+end
+
+def fun_l0_n75(x)
+    if (x < 1)
+        fun_l1_n21(x)
+    else
+        fun_l1_n720(x)
+    end
+end
+
+def fun_l0_n76(x)
+    if (x < 1)
+        fun_l1_n513(x)
+    else
+        fun_l1_n300(x)
+    end
+end
+
+def fun_l0_n77(x)
+    if (x < 1)
+        fun_l1_n358(x)
+    else
+        fun_l1_n332(x)
+    end
+end
+
+def fun_l0_n78(x)
+    if (x < 1)
+        fun_l1_n712(x)
+    else
+        fun_l1_n906(x)
+    end
+end
+
+def fun_l0_n79(x)
+    if (x < 1)
+        fun_l1_n555(x)
+    else
+        fun_l1_n850(x)
+    end
+end
+
+def fun_l0_n80(x)
+    if (x < 1)
+        fun_l1_n320(x)
+    else
+        fun_l1_n892(x)
+    end
+end
+
+def fun_l0_n81(x)
+    if (x < 1)
+        fun_l1_n191(x)
+     (... truncated)

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]