diff options
author | Kevin Newton <kddnewton@gmail.com> | 2023-08-30 15:28:10 -0400 |
---|---|---|
committer | git <svn-admin@ruby-lang.org> | 2023-08-30 19:59:28 +0000 |
commit | 00dbee94ac71527cffbfa959a99f17457eb440fc (patch) | |
tree | bc05023d97aa0abe6a50b0e2a08a3db066a5fbd4 /test | |
parent | 151e94fee5a54f07fa031942de72009c7f7b1d1d (diff) | |
download | ruby-00dbee94ac71527cffbfa959a99f17457eb440fc.tar.gz |
[ruby/yarp] Add class variables to the constant pool
https://github.com/ruby/yarp/commit/be5cb60c83
Diffstat (limited to 'test')
-rw-r--r-- | test/yarp/snapshots/methods.txt | 2 | ||||
-rw-r--r-- | test/yarp/snapshots/patterns.txt | 2 | ||||
-rw-r--r-- | test/yarp/snapshots/seattlerb/case_in.txt | 2 | ||||
-rw-r--r-- | test/yarp/snapshots/strings.txt | 2 | ||||
-rw-r--r-- | test/yarp/snapshots/unparser/corpus/literal/assignment.txt | 5 | ||||
-rw-r--r-- | test/yarp/snapshots/unparser/corpus/literal/dstr.txt | 2 | ||||
-rw-r--r-- | test/yarp/snapshots/unparser/corpus/literal/literal.txt | 2 | ||||
-rw-r--r-- | test/yarp/snapshots/unparser/corpus/literal/variables.txt | 2 | ||||
-rw-r--r-- | test/yarp/snapshots/unparser/corpus/semantic/dstr.txt | 2 | ||||
-rw-r--r-- | test/yarp/snapshots/variables.txt | 8 | ||||
-rw-r--r-- | test/yarp/snapshots/whitequark/cvar.txt | 5 | ||||
-rw-r--r-- | test/yarp/snapshots/whitequark/cvasgn.txt | 7 | ||||
-rw-r--r-- | test/yarp/snapshots/whitequark/masgn_splat.txt | 2 | ||||
-rw-r--r-- | test/yarp/snapshots/whitequark/string_dvar.txt | 5 | ||||
-rw-r--r-- | test/yarp/snapshots/whitequark/var_op_asgn.txt | 2 |
15 files changed, 33 insertions, 17 deletions
diff --git a/test/yarp/snapshots/methods.txt b/test/yarp/snapshots/methods.txt index 70e030811c..b5ec66aae3 100644 --- a/test/yarp/snapshots/methods.txt +++ b/test/yarp/snapshots/methods.txt @@ -910,7 +910,7 @@ ProgramNode(0...1194)( ), DefNode(811...826)( (821...822), - ClassVariableReadNode(815...820)(), + ClassVariableReadNode(815...820)(:@@var), nil, nil, [], diff --git a/test/yarp/snapshots/patterns.txt b/test/yarp/snapshots/patterns.txt index 63764bca0b..01292cbf3c 100644 --- a/test/yarp/snapshots/patterns.txt +++ b/test/yarp/snapshots/patterns.txt @@ -941,7 +941,7 @@ ProgramNode(0...3743)( "foo" ), PinnedVariableNode(974...980)( - ClassVariableReadNode(975...980)(), + ClassVariableReadNode(975...980)(:@@bar), (974...975) ), (971...973) diff --git a/test/yarp/snapshots/seattlerb/case_in.txt b/test/yarp/snapshots/seattlerb/case_in.txt index 2e508d8c9a..aaee410ef3 100644 --- a/test/yarp/snapshots/seattlerb/case_in.txt +++ b/test/yarp/snapshots/seattlerb/case_in.txt @@ -502,7 +502,7 @@ ProgramNode(0...747)( (633...634) ), PinnedVariableNode(638...642)( - ClassVariableReadNode(639...642)(), + ClassVariableReadNode(639...642)(:@@c), (638...639) )], nil, diff --git a/test/yarp/snapshots/strings.txt b/test/yarp/snapshots/strings.txt index ee8bc79f17..86a732d85d 100644 --- a/test/yarp/snapshots/strings.txt +++ b/test/yarp/snapshots/strings.txt @@ -20,7 +20,7 @@ ProgramNode(0...498)( (122...123), [EmbeddedVariableNode(123...129)( (123...124), - ClassVariableReadNode(124...129)() + ClassVariableReadNode(124...129)(:@@foo) )], (129...130) ), diff --git a/test/yarp/snapshots/unparser/corpus/literal/assignment.txt b/test/yarp/snapshots/unparser/corpus/literal/assignment.txt index 7e193e0e87..78ab4d3d78 100644 --- a/test/yarp/snapshots/unparser/corpus/literal/assignment.txt +++ b/test/yarp/snapshots/unparser/corpus/literal/assignment.txt @@ -54,8 +54,8 @@ ProgramNode(0...704)( (54...55) ), MultiWriteNode(65...84)( - [ClassVariableTargetNode(66...69)(), - ClassVariableTargetNode(71...74)()], + [ClassVariableTargetNode(66...69)(:@@a), + ClassVariableTargetNode(71...74)(:@@b)], (76...77), ArrayNode(78...84)( [IntegerNode(79...80)(), IntegerNode(82...83)()], @@ -291,6 +291,7 @@ ProgramNode(0...704)( ) ), ClassVariableWriteNode(302...309)( + :@@a, (302...305), IntegerNode(308...309)(), (306...307) diff --git a/test/yarp/snapshots/unparser/corpus/literal/dstr.txt b/test/yarp/snapshots/unparser/corpus/literal/dstr.txt index 1abbed681f..facf0171e7 100644 --- a/test/yarp/snapshots/unparser/corpus/literal/dstr.txt +++ b/test/yarp/snapshots/unparser/corpus/literal/dstr.txt @@ -84,7 +84,7 @@ ProgramNode(0...299)( [StringNode(167...168)(nil, (167...168), nil, "a"), EmbeddedVariableNode(168...172)( (168...169), - ClassVariableReadNode(169...172)() + ClassVariableReadNode(169...172)(:@@a) )], (172...173) ), diff --git a/test/yarp/snapshots/unparser/corpus/literal/literal.txt b/test/yarp/snapshots/unparser/corpus/literal/literal.txt index 03f9aecbd5..3b85d3e95f 100644 --- a/test/yarp/snapshots/unparser/corpus/literal/literal.txt +++ b/test/yarp/snapshots/unparser/corpus/literal/literal.txt @@ -158,7 +158,7 @@ ProgramNode(0...916)( StringNode(210...211)(nil, (210...211), nil, " "), EmbeddedVariableNode(211...215)( (211...212), - ClassVariableReadNode(212...215)() + ClassVariableReadNode(212...215)(:@@a) ), StringNode(215...216)(nil, (215...216), nil, " "), EmbeddedVariableNode(216...219)( diff --git a/test/yarp/snapshots/unparser/corpus/literal/variables.txt b/test/yarp/snapshots/unparser/corpus/literal/variables.txt index 051fb2f498..dfb85ec013 100644 --- a/test/yarp/snapshots/unparser/corpus/literal/variables.txt +++ b/test/yarp/snapshots/unparser/corpus/literal/variables.txt @@ -3,7 +3,7 @@ ProgramNode(0...66)( StatementsNode(0...66)( [CallNode(0...1)(nil, nil, (0...1), nil, nil, nil, nil, 2, "a"), InstanceVariableReadNode(2...4)(:@a), - ClassVariableReadNode(5...8)(), + ClassVariableReadNode(5...8)(:@@a), GlobalVariableReadNode(9...11)(), NumberedReferenceReadNode(12...14)(), BackReferenceReadNode(15...17)(), diff --git a/test/yarp/snapshots/unparser/corpus/semantic/dstr.txt b/test/yarp/snapshots/unparser/corpus/semantic/dstr.txt index 47d37b1c38..8822eb5333 100644 --- a/test/yarp/snapshots/unparser/corpus/semantic/dstr.txt +++ b/test/yarp/snapshots/unparser/corpus/semantic/dstr.txt @@ -246,7 +246,7 @@ ProgramNode(0...608)( [StringNode(598...599)(nil, (598...599), nil, "a"), EmbeddedVariableNode(599...603)( (599...600), - ClassVariableReadNode(600...603)() + ClassVariableReadNode(600...603)(:@@a) )], (603...604) ), diff --git a/test/yarp/snapshots/variables.txt b/test/yarp/snapshots/variables.txt index 2dd87366c5..419942d1eb 100644 --- a/test/yarp/snapshots/variables.txt +++ b/test/yarp/snapshots/variables.txt @@ -1,21 +1,23 @@ ProgramNode(0...293)( [:abc, :foo, :bar, :baz], StatementsNode(0...293)( - [ClassVariableReadNode(0...5)(), + [ClassVariableReadNode(0...5)(:@@abc), ClassVariableWriteNode(7...16)( + :@@abc, (7...12), IntegerNode(15...16)(), (13...14) ), MultiWriteNode(18...34)( - [ClassVariableTargetNode(18...23)(), - ClassVariableTargetNode(25...30)()], + [ClassVariableTargetNode(18...23)(:@@foo), + ClassVariableTargetNode(25...30)(:@@bar)], (31...32), IntegerNode(33...34)(), nil, nil ), ClassVariableWriteNode(36...48)( + :@@foo, (36...41), ArrayNode(44...48)( [IntegerNode(44...45)(), IntegerNode(47...48)()], diff --git a/test/yarp/snapshots/whitequark/cvar.txt b/test/yarp/snapshots/whitequark/cvar.txt index 069ff24b17..6a1f2e50f4 100644 --- a/test/yarp/snapshots/whitequark/cvar.txt +++ b/test/yarp/snapshots/whitequark/cvar.txt @@ -1 +1,4 @@ -ProgramNode(0...5)([], StatementsNode(0...5)([ClassVariableReadNode(0...5)()])) +ProgramNode(0...5)( + [], + StatementsNode(0...5)([ClassVariableReadNode(0...5)(:@@foo)]) +) diff --git a/test/yarp/snapshots/whitequark/cvasgn.txt b/test/yarp/snapshots/whitequark/cvasgn.txt index b972caaab7..7e07810eb6 100644 --- a/test/yarp/snapshots/whitequark/cvasgn.txt +++ b/test/yarp/snapshots/whitequark/cvasgn.txt @@ -1,6 +1,11 @@ ProgramNode(0...10)( [], StatementsNode(0...10)( - [ClassVariableWriteNode(0...10)((0...5), IntegerNode(8...10)(), (6...7))] + [ClassVariableWriteNode(0...10)( + :@@var, + (0...5), + IntegerNode(8...10)(), + (6...7) + )] ) ) diff --git a/test/yarp/snapshots/whitequark/masgn_splat.txt b/test/yarp/snapshots/whitequark/masgn_splat.txt index b093187ef6..d21760a65b 100644 --- a/test/yarp/snapshots/whitequark/masgn_splat.txt +++ b/test/yarp/snapshots/whitequark/masgn_splat.txt @@ -52,7 +52,7 @@ ProgramNode(0...139)( ), MultiWriteNode(47...65)( [InstanceVariableTargetNode(47...51)(:@foo), - ClassVariableTargetNode(53...58)()], + ClassVariableTargetNode(53...58)(:@@bar)], (59...60), ArrayNode(61...65)( [SplatNode(61...65)( diff --git a/test/yarp/snapshots/whitequark/string_dvar.txt b/test/yarp/snapshots/whitequark/string_dvar.txt index 981ea318c4..12f083660b 100644 --- a/test/yarp/snapshots/whitequark/string_dvar.txt +++ b/test/yarp/snapshots/whitequark/string_dvar.txt @@ -8,7 +8,10 @@ ProgramNode(0...14)( InstanceVariableReadNode(2...4)(:@a) ), StringNode(4...5)(nil, (4...5), nil, " "), - EmbeddedVariableNode(5...9)((5...6), ClassVariableReadNode(6...9)()), + EmbeddedVariableNode(5...9)( + (5...6), + ClassVariableReadNode(6...9)(:@@a) + ), StringNode(9...10)(nil, (9...10), nil, " "), EmbeddedVariableNode(10...13)( (10...11), diff --git a/test/yarp/snapshots/whitequark/var_op_asgn.txt b/test/yarp/snapshots/whitequark/var_op_asgn.txt index 5618d0944c..0927e8b8f3 100644 --- a/test/yarp/snapshots/whitequark/var_op_asgn.txt +++ b/test/yarp/snapshots/whitequark/var_op_asgn.txt @@ -2,6 +2,7 @@ ProgramNode(0...53)( [:a], StatementsNode(0...53)( [ClassVariableOperatorWriteNode(0...11)( + :@@var, (0...5), (6...8), IntegerNode(9...11)(), @@ -28,6 +29,7 @@ ProgramNode(0...53)( nil, StatementsNode(37...48)( [ClassVariableOperatorWriteNode(37...48)( + :@@var, (37...42), (43...45), IntegerNode(46...48)(), |