1
+ subject : " BEGIN block"
2
+ description : " when multiple occurrences in a program"
3
+ notes : >
4
+ Put content of the BEGIN blocks in order they are located in a program.
5
+ So sequence of expressions is:
6
+
7
+ ```ruby
8
+ a
9
+ b
10
+ c
11
+ ```
12
+ focused_on_node : " org.truffleruby.language.RubyTopLevelRootNode"
13
+ ruby : |
14
+ BEGIN {
15
+ a
16
+ }
17
+
18
+ BEGIN {
19
+ b
20
+ }
21
+
22
+ BEGIN {
23
+ c
24
+ }
25
+ ast : |
26
+ RubyTopLevelRootNode
27
+ attributes:
28
+ arityForCheck = Arity{preRequired = 0, optional = 0, hasRest = true, isImplicitRest = false, postRequired = 0, keywordArguments = [], requiredKeywordArgumentsCount = 0, hasKeywordsRest = false}
29
+ callTarget = <top (required)>
30
+ checkArityProfile = false
31
+ frameDescriptor = FrameDescriptor@...{#0:(self), #1:%$~_}
32
+ instrumentationBits = 0
33
+ keywordArguments = false
34
+ localReturnProfile = false
35
+ lock = java.util.concurrent.locks.ReentrantLock@...[Unlocked]
36
+ matchingReturnProfile = false
37
+ nextProfile = false
38
+ nonMatchingReturnProfile = false
39
+ polyglotRef = org.truffleruby.RubyLanguage@...
40
+ retryProfile = false
41
+ returnID = org.truffleruby.language.control.ReturnID@...
42
+ sharedMethodInfo = SharedMethodInfo(staticLexicalScope = :: Object, arity = Arity{preRequired = 0, optional = 0, hasRest = false, isImplicitRest = false, postRequired = 0, keywordArguments = [], requiredKeywordArgumentsCount = 0, hasKeywordsRest = false}, originName = <top (required)>, blockDepth = 0, parseName = <top (required)>, notes = null, argumentDescriptors = null)
43
+ split = HEURISTIC
44
+ children:
45
+ body =
46
+ SequenceNode
47
+ attributes:
48
+ flags = 12
49
+ children:
50
+ body = [
51
+ WriteLocalVariableNode
52
+ attributes:
53
+ flags = 0
54
+ frameSlot = 0 # (self)
55
+ children:
56
+ valueNode =
57
+ ProfileArgumentNodeGen
58
+ attributes:
59
+ flags = 0
60
+ children:
61
+ childNode_ =
62
+ ReadSelfNode
63
+ attributes:
64
+ flags = 0
65
+ RubyCallNode
66
+ attributes:
67
+ descriptor = NoKeywordArgumentsDescriptor
68
+ dispatchConfig = PRIVATE
69
+ emptyKeywordsProfile = false
70
+ flags = 1
71
+ isAttrAssign = false
72
+ isSafeNavigation = false
73
+ isSplatted = false
74
+ isVCall = true
75
+ lastArgIsNotHashProfile = false
76
+ methodName = "a"
77
+ notEmptyKeywordsProfile = false
78
+ notRuby2KeywordsHashProfile = false
79
+ children:
80
+ receiver =
81
+ SelfNode
82
+ attributes:
83
+ flags = 0
84
+ RubyCallNode
85
+ attributes:
86
+ descriptor = NoKeywordArgumentsDescriptor
87
+ dispatchConfig = PRIVATE
88
+ emptyKeywordsProfile = false
89
+ flags = 1
90
+ isAttrAssign = false
91
+ isSafeNavigation = false
92
+ isSplatted = false
93
+ isVCall = true
94
+ lastArgIsNotHashProfile = false
95
+ methodName = "b"
96
+ notEmptyKeywordsProfile = false
97
+ notRuby2KeywordsHashProfile = false
98
+ children:
99
+ receiver =
100
+ SelfNode
101
+ attributes:
102
+ flags = 0
103
+ RubyCallNode
104
+ attributes:
105
+ descriptor = NoKeywordArgumentsDescriptor
106
+ dispatchConfig = PRIVATE
107
+ emptyKeywordsProfile = false
108
+ flags = 1
109
+ isAttrAssign = false
110
+ isSafeNavigation = false
111
+ isSplatted = false
112
+ isVCall = true
113
+ lastArgIsNotHashProfile = false
114
+ methodName = "c"
115
+ notEmptyKeywordsProfile = false
116
+ notRuby2KeywordsHashProfile = false
117
+ children:
118
+ receiver =
119
+ SelfNode
120
+ attributes:
121
+ flags = 0
122
+ NilLiteralNode
123
+ attributes:
124
+ flags = 0
125
+ ]
0 commit comments