prism 1.3.0 → 1.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (87) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +46 -1
  3. data/Makefile +2 -1
  4. data/README.md +1 -0
  5. data/config.yml +273 -37
  6. data/docs/parser_translation.md +8 -23
  7. data/docs/releasing.md +1 -1
  8. data/docs/ripper_translation.md +1 -1
  9. data/docs/ruby_api.md +1 -1
  10. data/ext/prism/api_node.c +1816 -1303
  11. data/ext/prism/extension.c +244 -110
  12. data/ext/prism/extension.h +4 -4
  13. data/include/prism/ast.h +291 -49
  14. data/include/prism/defines.h +4 -1
  15. data/include/prism/diagnostic.h +4 -0
  16. data/include/prism/options.h +89 -3
  17. data/include/prism/regexp.h +2 -2
  18. data/include/prism/util/pm_buffer.h +18 -0
  19. data/include/prism/util/pm_integer.h +4 -0
  20. data/include/prism/util/pm_list.h +6 -0
  21. data/include/prism/util/pm_string.h +12 -2
  22. data/include/prism/version.h +2 -2
  23. data/include/prism.h +41 -16
  24. data/lib/prism/compiler.rb +456 -151
  25. data/lib/prism/desugar_compiler.rb +1 -0
  26. data/lib/prism/dispatcher.rb +16 -0
  27. data/lib/prism/dot_visitor.rb +21 -1
  28. data/lib/prism/dsl.rb +13 -2
  29. data/lib/prism/ffi.rb +62 -34
  30. data/lib/prism/inspect_visitor.rb +5 -1
  31. data/lib/prism/lex_compat.rb +1 -0
  32. data/lib/prism/mutation_compiler.rb +3 -0
  33. data/lib/prism/node.rb +554 -345
  34. data/lib/prism/node_ext.rb +4 -1
  35. data/lib/prism/pack.rb +2 -0
  36. data/lib/prism/parse_result/comments.rb +1 -0
  37. data/lib/prism/parse_result/errors.rb +1 -0
  38. data/lib/prism/parse_result/newlines.rb +2 -1
  39. data/lib/prism/parse_result.rb +53 -0
  40. data/lib/prism/pattern.rb +1 -0
  41. data/lib/prism/polyfill/append_as_bytes.rb +15 -0
  42. data/lib/prism/polyfill/scan_byte.rb +14 -0
  43. data/lib/prism/polyfill/warn.rb +42 -0
  44. data/lib/prism/reflection.rb +5 -2
  45. data/lib/prism/relocation.rb +1 -0
  46. data/lib/prism/serialize.rb +1275 -783
  47. data/lib/prism/string_query.rb +1 -0
  48. data/lib/prism/translation/parser/builder.rb +62 -0
  49. data/lib/prism/translation/parser/compiler.rb +230 -152
  50. data/lib/prism/translation/parser/lexer.rb +446 -64
  51. data/lib/prism/translation/parser.rb +64 -4
  52. data/lib/prism/translation/parser33.rb +1 -0
  53. data/lib/prism/translation/parser34.rb +1 -0
  54. data/lib/prism/translation/parser35.rb +13 -0
  55. data/lib/prism/translation/parser_current.rb +24 -0
  56. data/lib/prism/translation/ripper/sexp.rb +1 -0
  57. data/lib/prism/translation/ripper.rb +30 -4
  58. data/lib/prism/translation/ruby_parser.rb +291 -7
  59. data/lib/prism/translation.rb +3 -0
  60. data/lib/prism/visitor.rb +457 -152
  61. data/lib/prism.rb +5 -3
  62. data/prism.gemspec +9 -1
  63. data/rbi/prism/dsl.rbi +9 -6
  64. data/rbi/prism/node.rbi +43 -16
  65. data/rbi/prism/parse_result.rbi +17 -0
  66. data/rbi/prism/translation/parser35.rbi +6 -0
  67. data/rbi/prism.rbi +39 -36
  68. data/sig/prism/dispatcher.rbs +3 -0
  69. data/sig/prism/dsl.rbs +7 -5
  70. data/sig/prism/node.rbs +461 -37
  71. data/sig/prism/node_ext.rbs +84 -17
  72. data/sig/prism/parse_result/comments.rbs +38 -0
  73. data/sig/prism/parse_result.rbs +14 -0
  74. data/sig/prism/reflection.rbs +1 -1
  75. data/sig/prism/serialize.rbs +4 -2
  76. data/sig/prism.rbs +22 -1
  77. data/src/diagnostic.c +9 -3
  78. data/src/node.c +23 -0
  79. data/src/options.c +33 -2
  80. data/src/prettyprint.c +32 -0
  81. data/src/prism.c +620 -242
  82. data/src/serialize.c +8 -0
  83. data/src/token_type.c +36 -34
  84. data/src/util/pm_buffer.c +40 -0
  85. data/src/util/pm_constant_pool.c +6 -2
  86. data/src/util/pm_strncasecmp.c +13 -1
  87. metadata +11 -7
@@ -1,9 +1,12 @@
1
1
  # frozen_string_literal: true
2
+ # :markup: markdown
2
3
 
3
4
  =begin
5
+ --
4
6
  This file is generated by the templates/template.rb script and should not be
5
7
  modified manually. See templates/lib/prism/serialize.rb.erb
6
8
  if you are looking to modify the template
9
+ ++
7
10
  =end
8
11
 
9
12
  require "stringio"
@@ -18,21 +21,47 @@ module Prism
18
21
 
19
22
  # The minor version of prism that we are expecting to find in the serialized
20
23
  # strings.
21
- MINOR_VERSION = 3
24
+ MINOR_VERSION = 5
22
25
 
23
26
  # The patch version of prism that we are expecting to find in the serialized
24
27
  # strings.
25
28
  PATCH_VERSION = 0
26
29
 
27
- # Deserialize the AST represented by the given string into a parse result.
28
- def self.load(input, serialized)
30
+ # Deserialize the dumped output from a request to parse or parse_file.
31
+ #
32
+ # The formatting of the source of this method is purposeful to illustrate
33
+ # the structure of the serialized data.
34
+ def self.load_parse(input, serialized, freeze)
29
35
  input = input.dup
30
36
  source = Source.for(input)
31
-
32
37
  loader = Loader.new(source, serialized)
33
- result = loader.load_result
34
38
 
35
- input.force_encoding(loader.encoding)
39
+ loader.load_header
40
+ encoding = loader.load_encoding
41
+ start_line = loader.load_varsint
42
+ offsets = loader.load_line_offsets(freeze)
43
+
44
+ source.replace_start_line(start_line)
45
+ source.replace_offsets(offsets)
46
+
47
+ comments = loader.load_comments(freeze)
48
+ magic_comments = loader.load_magic_comments(freeze)
49
+ data_loc = loader.load_optional_location_object(freeze)
50
+ errors = loader.load_errors(encoding, freeze)
51
+ warnings = loader.load_warnings(encoding, freeze)
52
+ cpool_base = loader.load_uint32
53
+ cpool_size = loader.load_varuint
54
+
55
+ constant_pool = ConstantPool.new(input, serialized, cpool_base, cpool_size)
56
+
57
+ node = loader.load_node(constant_pool, encoding, freeze)
58
+ loader.load_constant_pool(constant_pool)
59
+ raise unless loader.eof?
60
+
61
+ result = ParseResult.new(node, comments, magic_comments, data_loc, errors, warnings, source)
62
+ result.freeze if freeze
63
+
64
+ input.force_encoding(encoding)
36
65
 
37
66
  # This is an extremely niche use-case where the file was marked as binary
38
67
  # but it contained UTF-8-encoded characters. In that case we will actually
@@ -43,96 +72,267 @@ module Prism
43
72
  input.force_encoding(Encoding::BINARY) unless input.valid_encoding?
44
73
  end
45
74
 
75
+ if freeze
76
+ input.freeze
77
+ source.deep_freeze
78
+ end
79
+
46
80
  result
47
81
  end
48
82
 
49
- # Deserialize the tokens represented by the given string into a parse
50
- # result.
51
- def self.load_tokens(source, serialized)
52
- Loader.new(source, serialized).load_tokens_result
83
+ # Deserialize the dumped output from a request to lex or lex_file.
84
+ #
85
+ # The formatting of the source of this method is purposeful to illustrate
86
+ # the structure of the serialized data.
87
+ def self.load_lex(input, serialized, freeze)
88
+ source = Source.for(input)
89
+ loader = Loader.new(source, serialized)
90
+
91
+ tokens = loader.load_tokens
92
+ encoding = loader.load_encoding
93
+ start_line = loader.load_varsint
94
+ offsets = loader.load_line_offsets(freeze)
95
+
96
+ source.replace_start_line(start_line)
97
+ source.replace_offsets(offsets)
98
+
99
+ comments = loader.load_comments(freeze)
100
+ magic_comments = loader.load_magic_comments(freeze)
101
+ data_loc = loader.load_optional_location_object(freeze)
102
+ errors = loader.load_errors(encoding, freeze)
103
+ warnings = loader.load_warnings(encoding, freeze)
104
+ raise unless loader.eof?
105
+
106
+ result = LexResult.new(tokens, comments, magic_comments, data_loc, errors, warnings, source)
107
+
108
+ tokens.each do |token|
109
+ token[0].value.force_encoding(encoding)
110
+
111
+ if freeze
112
+ token[0].deep_freeze
113
+ token.freeze
114
+ end
115
+ end
116
+
117
+ if freeze
118
+ source.deep_freeze
119
+ tokens.freeze
120
+ result.freeze
121
+ end
122
+
123
+ result
53
124
  end
54
125
 
55
- class Loader # :nodoc:
56
- if RUBY_ENGINE == "truffleruby"
57
- # StringIO is synchronized and that adds a high overhead on TruffleRuby.
58
- class FastStringIO # :nodoc:
59
- attr_accessor :pos
60
-
61
- def initialize(string)
62
- @string = string
63
- @pos = 0
64
- end
126
+ # Deserialize the dumped output from a request to parse_comments or
127
+ # parse_file_comments.
128
+ #
129
+ # The formatting of the source of this method is purposeful to illustrate
130
+ # the structure of the serialized data.
131
+ def self.load_parse_comments(input, serialized, freeze)
132
+ source = Source.for(input)
133
+ loader = Loader.new(source, serialized)
65
134
 
66
- def getbyte
67
- byte = @string.getbyte(@pos)
68
- @pos += 1
69
- byte
70
- end
135
+ loader.load_header
136
+ loader.load_encoding
137
+ start_line = loader.load_varsint
71
138
 
72
- def read(n)
73
- slice = @string.byteslice(@pos, n)
74
- @pos += n
75
- slice
76
- end
139
+ source.replace_start_line(start_line)
140
+
141
+ result = loader.load_comments(freeze)
142
+ raise unless loader.eof?
143
+
144
+ source.deep_freeze if freeze
145
+ result
146
+ end
147
+
148
+ # Deserialize the dumped output from a request to parse_lex or
149
+ # parse_lex_file.
150
+ #
151
+ # The formatting of the source of this method is purposeful to illustrate
152
+ # the structure of the serialized data.
153
+ def self.load_parse_lex(input, serialized, freeze)
154
+ source = Source.for(input)
155
+ loader = Loader.new(source, serialized)
156
+
157
+ tokens = loader.load_tokens
158
+ loader.load_header
159
+ encoding = loader.load_encoding
160
+ start_line = loader.load_varsint
161
+ offsets = loader.load_line_offsets(freeze)
162
+
163
+ source.replace_start_line(start_line)
164
+ source.replace_offsets(offsets)
165
+
166
+ comments = loader.load_comments(freeze)
167
+ magic_comments = loader.load_magic_comments(freeze)
168
+ data_loc = loader.load_optional_location_object(freeze)
169
+ errors = loader.load_errors(encoding, freeze)
170
+ warnings = loader.load_warnings(encoding, freeze)
171
+ cpool_base = loader.load_uint32
172
+ cpool_size = loader.load_varuint
173
+
174
+ constant_pool = ConstantPool.new(input, serialized, cpool_base, cpool_size)
175
+
176
+ node = loader.load_node(constant_pool, encoding, freeze)
177
+ loader.load_constant_pool(constant_pool)
178
+ raise unless loader.eof?
179
+
180
+ value = [node, tokens]
181
+ result = ParseLexResult.new(value, comments, magic_comments, data_loc, errors, warnings, source)
182
+
183
+ tokens.each do |token|
184
+ token[0].value.force_encoding(encoding)
185
+
186
+ if freeze
187
+ token[0].deep_freeze
188
+ token.freeze
189
+ end
190
+ end
191
+
192
+ if freeze
193
+ source.deep_freeze
194
+ tokens.freeze
195
+ value.freeze
196
+ result.freeze
197
+ end
198
+
199
+ result
200
+ end
201
+
202
+ class ConstantPool # :nodoc:
203
+ attr_reader :size
204
+
205
+ def initialize(input, serialized, base, size)
206
+ @input = input
207
+ @serialized = serialized
208
+ @base = base
209
+ @size = size
210
+ @pool = Array.new(size, nil)
211
+ end
77
212
 
78
- def eof?
79
- @pos >= @string.bytesize
213
+ def get(index, encoding)
214
+ @pool[index] ||=
215
+ begin
216
+ offset = @base + index * 8
217
+ start = @serialized.unpack1("L", offset: offset)
218
+ length = @serialized.unpack1("L", offset: offset + 4)
219
+
220
+ if start.nobits?(1 << 31)
221
+ @input.byteslice(start, length).force_encoding(encoding).to_sym
222
+ else
223
+ @serialized.byteslice(start & ((1 << 31) - 1), length).force_encoding(encoding).to_sym
224
+ end
80
225
  end
226
+ end
227
+ end
228
+
229
+ if RUBY_ENGINE == "truffleruby"
230
+ # StringIO is synchronized and that adds a high overhead on TruffleRuby.
231
+ class FastStringIO # :nodoc:
232
+ attr_accessor :pos
233
+
234
+ def initialize(string)
235
+ @string = string
236
+ @pos = 0
237
+ end
238
+
239
+ def getbyte
240
+ byte = @string.getbyte(@pos)
241
+ @pos += 1
242
+ byte
243
+ end
244
+
245
+ def read(n)
246
+ slice = @string.byteslice(@pos, n)
247
+ @pos += n
248
+ slice
249
+ end
250
+
251
+ def eof?
252
+ @pos >= @string.bytesize
81
253
  end
82
- else
83
- FastStringIO = ::StringIO
84
254
  end
85
- private_constant :FastStringIO
255
+ else
256
+ FastStringIO = ::StringIO # :nodoc:
257
+ end
86
258
 
87
- attr_reader :encoding, :input, :serialized, :io
88
- attr_reader :constant_pool_offset, :constant_pool, :source
89
- attr_reader :start_line
259
+ class Loader # :nodoc:
260
+ attr_reader :input, :io, :source
90
261
 
91
262
  def initialize(source, serialized)
92
- @encoding = Encoding::UTF_8
93
-
94
263
  @input = source.source.dup
95
264
  raise unless serialized.encoding == Encoding::BINARY
96
- @serialized = serialized
97
265
  @io = FastStringIO.new(serialized)
266
+ @source = source
267
+ define_load_node_lambdas if RUBY_ENGINE != "ruby"
268
+ end
269
+
270
+ def eof?
271
+ io.getbyte
272
+ io.eof?
273
+ end
98
274
 
99
- @constant_pool_offset = nil
100
- @constant_pool = nil
275
+ def load_constant_pool(constant_pool)
276
+ trailer = 0
101
277
 
102
- @source = source
103
- define_load_node_lambdas unless RUBY_ENGINE == "ruby"
278
+ constant_pool.size.times do |index|
279
+ start, length = io.read(8).unpack("L2")
280
+ trailer += length if start.anybits?(1 << 31)
281
+ end
282
+
283
+ io.read(trailer)
104
284
  end
105
285
 
106
286
  def load_header
107
287
  raise "Invalid serialization" if io.read(5) != "PRISM"
108
288
  raise "Invalid serialization" if io.read(3).unpack("C3") != [MAJOR_VERSION, MINOR_VERSION, PATCH_VERSION]
109
- only_semantic_fields = io.getbyte
110
- unless only_semantic_fields == 0
111
- raise "Invalid serialization (location fields must be included but are not)"
112
- end
289
+ raise "Invalid serialization (location fields must be included but are not)" if io.getbyte != 0
113
290
  end
114
291
 
115
292
  def load_encoding
116
- @encoding = Encoding.find(io.read(load_varuint))
117
- @input = input.force_encoding(@encoding).freeze
118
- @encoding
293
+ encoding = Encoding.find(io.read(load_varuint))
294
+ @input = input.force_encoding(encoding).freeze
295
+ encoding
119
296
  end
120
297
 
121
- def load_start_line
122
- source.instance_variable_set :@start_line, load_varsint
298
+ def load_line_offsets(freeze)
299
+ offsets = Array.new(load_varuint) { load_varuint }
300
+ offsets.freeze if freeze
301
+ offsets
123
302
  end
124
303
 
125
- def load_line_offsets
126
- source.instance_variable_set :@offsets, Array.new(load_varuint) { load_varuint }
304
+ def load_comments(freeze)
305
+ comments =
306
+ Array.new(load_varuint) do
307
+ comment =
308
+ case load_varuint
309
+ when 0 then InlineComment.new(load_location_object(freeze))
310
+ when 1 then EmbDocComment.new(load_location_object(freeze))
311
+ end
312
+
313
+ comment.freeze if freeze
314
+ comment
315
+ end
316
+
317
+ comments.freeze if freeze
318
+ comments
127
319
  end
128
320
 
129
- def load_comments
130
- Array.new(load_varuint) do
131
- case load_varuint
132
- when 0 then InlineComment.new(load_location_object)
133
- when 1 then EmbDocComment.new(load_location_object)
321
+ def load_magic_comments(freeze)
322
+ magic_comments =
323
+ Array.new(load_varuint) do
324
+ magic_comment =
325
+ MagicComment.new(
326
+ load_location_object(freeze),
327
+ load_location_object(freeze)
328
+ )
329
+
330
+ magic_comment.freeze if freeze
331
+ magic_comment
134
332
  end
135
- end
333
+
334
+ magic_comments.freeze if freeze
335
+ magic_comments
136
336
  end
137
337
 
138
338
  DIAGNOSTIC_TYPES = [
@@ -238,6 +438,8 @@ module Prism
238
438
  :expect_for_delimiter,
239
439
  :expect_ident_req_parameter,
240
440
  :expect_in_delimiter,
441
+ :expect_lparen_after_not_lparen,
442
+ :expect_lparen_after_not_other,
241
443
  :expect_lparen_req_parameter,
242
444
  :expect_message,
243
445
  :expect_rbracket,
@@ -459,60 +661,88 @@ module Prism
459
661
 
460
662
  private_constant :DIAGNOSTIC_TYPES
461
663
 
462
- def load_metadata
463
- comments = load_comments
464
- magic_comments = Array.new(load_varuint) { MagicComment.new(load_location_object, load_location_object) }
465
- data_loc = load_optional_location_object
466
- errors = Array.new(load_varuint) { ParseError.new(DIAGNOSTIC_TYPES.fetch(load_varuint), load_embedded_string, load_location_object, load_error_level) }
467
- warnings = Array.new(load_varuint) { ParseWarning.new(DIAGNOSTIC_TYPES.fetch(load_varuint), load_embedded_string, load_location_object, load_warning_level) }
468
- [comments, magic_comments, data_loc, errors, warnings]
469
- end
664
+ def load_error_level
665
+ level = io.getbyte
470
666
 
471
- def load_tokens
472
- tokens = []
473
- while type = TOKEN_TYPES.fetch(load_varuint)
474
- start = load_varuint
475
- length = load_varuint
476
- lex_state = load_varuint
477
- location = Location.new(@source, start, length)
478
- tokens << [Token.new(source, type, location.slice, location), lex_state]
667
+ case level
668
+ when 0
669
+ :syntax
670
+ when 1
671
+ :argument
672
+ when 2
673
+ :load
674
+ else
675
+ raise "Unknown level: #{level}"
479
676
  end
480
-
481
- tokens
482
677
  end
483
678
 
484
- def load_tokens_result
485
- tokens = load_tokens
486
- encoding = load_encoding
487
- load_start_line
488
- load_line_offsets
489
- comments, magic_comments, data_loc, errors, warnings = load_metadata
490
- tokens.each { |token,| token.value.force_encoding(encoding) }
679
+ def load_errors(encoding, freeze)
680
+ errors =
681
+ Array.new(load_varuint) do
682
+ error =
683
+ ParseError.new(
684
+ DIAGNOSTIC_TYPES.fetch(load_varuint),
685
+ load_embedded_string(encoding),
686
+ load_location_object(freeze),
687
+ load_error_level
688
+ )
689
+
690
+ error.freeze if freeze
691
+ error
692
+ end
491
693
 
492
- raise "Expected to consume all bytes while deserializing" unless @io.eof?
493
- LexResult.new(tokens, comments, magic_comments, data_loc, errors, warnings, @source)
694
+ errors.freeze if freeze
695
+ errors
494
696
  end
495
697
 
496
- def load_nodes
497
- load_header
498
- load_encoding
499
- load_start_line
500
- load_line_offsets
698
+ def load_warning_level
699
+ level = io.getbyte
501
700
 
502
- comments, magic_comments, data_loc, errors, warnings = load_metadata
701
+ case level
702
+ when 0
703
+ :default
704
+ when 1
705
+ :verbose
706
+ else
707
+ raise "Unknown level: #{level}"
708
+ end
709
+ end
503
710
 
504
- @constant_pool_offset = load_uint32
505
- @constant_pool = Array.new(load_varuint, nil)
711
+ def load_warnings(encoding, freeze)
712
+ warnings =
713
+ Array.new(load_varuint) do
714
+ warning =
715
+ ParseWarning.new(
716
+ DIAGNOSTIC_TYPES.fetch(load_varuint),
717
+ load_embedded_string(encoding),
718
+ load_location_object(freeze),
719
+ load_warning_level
720
+ )
721
+
722
+ warning.freeze if freeze
723
+ warning
724
+ end
506
725
 
507
- [load_node, comments, magic_comments, data_loc, errors, warnings]
726
+ warnings.freeze if freeze
727
+ warnings
508
728
  end
509
729
 
510
- def load_result
511
- node, comments, magic_comments, data_loc, errors, warnings = load_nodes
512
- ParseResult.new(node, comments, magic_comments, data_loc, errors, warnings, @source)
513
- end
730
+ def load_tokens
731
+ tokens = []
514
732
 
515
- private
733
+ while (type = TOKEN_TYPES.fetch(load_varuint))
734
+ start = load_varuint
735
+ length = load_varuint
736
+ lex_state = load_varuint
737
+
738
+ location = Location.new(@source, start, length)
739
+ token = Token.new(@source, type, location.slice, location)
740
+
741
+ tokens << [token, lex_state]
742
+ end
743
+
744
+ tokens
745
+ end
516
746
 
517
747
  # variable-length integer using https://en.wikipedia.org/wiki/LEB128
518
748
  # This is also what protobuf uses: https://protobuf.dev/programming-guides/encoding/#varints
@@ -554,1179 +784,1436 @@ module Prism
554
784
  io.read(4).unpack1("L")
555
785
  end
556
786
 
557
- def load_optional_node
787
+ def load_optional_node(constant_pool, encoding, freeze)
558
788
  if io.getbyte != 0
559
789
  io.pos -= 1
560
- load_node
790
+ load_node(constant_pool, encoding, freeze)
561
791
  end
562
792
  end
563
793
 
564
- def load_embedded_string
565
- io.read(load_varuint).force_encoding(encoding)
794
+ def load_embedded_string(encoding)
795
+ io.read(load_varuint).force_encoding(encoding).freeze
566
796
  end
567
797
 
568
- def load_string
569
- type = io.getbyte
570
- case type
798
+ def load_string(encoding)
799
+ case (type = io.getbyte)
571
800
  when 1
572
- input.byteslice(load_varuint, load_varuint).force_encoding(encoding)
801
+ input.byteslice(load_varuint, load_varuint).force_encoding(encoding).freeze
573
802
  when 2
574
- load_embedded_string
803
+ load_embedded_string(encoding)
575
804
  else
576
805
  raise "Unknown serialized string type: #{type}"
577
806
  end
578
807
  end
579
808
 
580
- def load_location
581
- (load_varuint << 32) | load_varuint
809
+ def load_location_object(freeze)
810
+ location = Location.new(source, load_varuint, load_varuint)
811
+ location.freeze if freeze
812
+ location
582
813
  end
583
814
 
584
- def load_location_object
585
- Location.new(source, load_varuint, load_varuint)
586
- end
587
-
588
- def load_optional_location
589
- load_location if io.getbyte != 0
590
- end
591
-
592
- def load_optional_location_object
593
- load_location_object if io.getbyte != 0
815
+ def load_location(freeze)
816
+ return load_location_object(freeze) if freeze
817
+ (load_varuint << 32) | load_varuint
594
818
  end
595
819
 
596
- def load_constant(index)
597
- constant = constant_pool[index]
598
-
599
- unless constant
600
- offset = constant_pool_offset + index * 8
601
- start = @serialized.unpack1("L", offset: offset)
602
- length = @serialized.unpack1("L", offset: offset + 4)
603
-
604
- constant =
605
- if start.nobits?(1 << 31)
606
- input.byteslice(start, length).force_encoding(@encoding).to_sym
607
- else
608
- @serialized.byteslice(start & ((1 << 31) - 1), length).force_encoding(@encoding).to_sym
609
- end
610
-
611
- constant_pool[index] = constant
612
- end
613
-
614
- constant
820
+ def load_optional_location(freeze)
821
+ load_location(freeze) if io.getbyte != 0
615
822
  end
616
823
 
617
- def load_required_constant
618
- load_constant(load_varuint - 1)
824
+ def load_optional_location_object(freeze)
825
+ load_location_object(freeze) if io.getbyte != 0
619
826
  end
620
827
 
621
- def load_optional_constant
828
+ def load_constant(constant_pool, encoding)
622
829
  index = load_varuint
623
- load_constant(index - 1) if index != 0
624
- end
625
-
626
- def load_error_level
627
- level = io.getbyte
628
-
629
- case level
630
- when 0
631
- :syntax
632
- when 1
633
- :argument
634
- when 2
635
- :load
636
- else
637
- raise "Unknown level: #{level}"
638
- end
830
+ constant_pool.get(index - 1, encoding)
639
831
  end
640
832
 
641
- def load_warning_level
642
- level = io.getbyte
643
-
644
- case level
645
- when 0
646
- :default
647
- when 1
648
- :verbose
649
- else
650
- raise "Unknown level: #{level}"
651
- end
833
+ def load_optional_constant(constant_pool, encoding)
834
+ index = load_varuint
835
+ constant_pool.get(index - 1, encoding) if index != 0
652
836
  end
653
837
 
654
838
  if RUBY_ENGINE == "ruby"
655
- def load_node
839
+ def load_node(constant_pool, encoding, freeze)
656
840
  type = io.getbyte
657
841
  node_id = load_varuint
658
- location = load_location
659
-
660
- case type
842
+ location = load_location(freeze)
843
+ value = case type
661
844
  when 1 then
662
- AliasGlobalVariableNode.new(source, node_id, location, load_varuint, load_node, load_node, load_location)
845
+ AliasGlobalVariableNode.new(source, node_id, location, load_varuint, load_node(constant_pool, encoding, freeze), load_node(constant_pool, encoding, freeze), load_location(freeze))
663
846
  when 2 then
664
- AliasMethodNode.new(source, node_id, location, load_varuint, load_node, load_node, load_location)
847
+ AliasMethodNode.new(source, node_id, location, load_varuint, load_node(constant_pool, encoding, freeze), load_node(constant_pool, encoding, freeze), load_location(freeze))
665
848
  when 3 then
666
- AlternationPatternNode.new(source, node_id, location, load_varuint, load_node, load_node, load_location)
849
+ AlternationPatternNode.new(source, node_id, location, load_varuint, load_node(constant_pool, encoding, freeze), load_node(constant_pool, encoding, freeze), load_location(freeze))
667
850
  when 4 then
668
- AndNode.new(source, node_id, location, load_varuint, load_node, load_node, load_location)
851
+ AndNode.new(source, node_id, location, load_varuint, load_node(constant_pool, encoding, freeze), load_node(constant_pool, encoding, freeze), load_location(freeze))
669
852
  when 5 then
670
- ArgumentsNode.new(source, node_id, location, load_varuint, Array.new(load_varuint) { load_node })
853
+ ArgumentsNode.new(source, node_id, location, load_varuint, Array.new(load_varuint) { load_node(constant_pool, encoding, freeze) }.tap { |nodes| nodes.freeze if freeze })
671
854
  when 6 then
672
- ArrayNode.new(source, node_id, location, load_varuint, Array.new(load_varuint) { load_node }, load_optional_location, load_optional_location)
855
+ ArrayNode.new(source, node_id, location, load_varuint, Array.new(load_varuint) { load_node(constant_pool, encoding, freeze) }.tap { |nodes| nodes.freeze if freeze }, load_optional_location(freeze), load_optional_location(freeze))
673
856
  when 7 then
674
- ArrayPatternNode.new(source, node_id, location, load_varuint, load_optional_node, Array.new(load_varuint) { load_node }, load_optional_node, Array.new(load_varuint) { load_node }, load_optional_location, load_optional_location)
857
+ ArrayPatternNode.new(source, node_id, location, load_varuint, load_optional_node(constant_pool, encoding, freeze), Array.new(load_varuint) { load_node(constant_pool, encoding, freeze) }.tap { |nodes| nodes.freeze if freeze }, load_optional_node(constant_pool, encoding, freeze), Array.new(load_varuint) { load_node(constant_pool, encoding, freeze) }.tap { |nodes| nodes.freeze if freeze }, load_optional_location(freeze), load_optional_location(freeze))
675
858
  when 8 then
676
- AssocNode.new(source, node_id, location, load_varuint, load_node, load_node, load_optional_location)
859
+ AssocNode.new(source, node_id, location, load_varuint, load_node(constant_pool, encoding, freeze), load_node(constant_pool, encoding, freeze), load_optional_location(freeze))
677
860
  when 9 then
678
- AssocSplatNode.new(source, node_id, location, load_varuint, load_optional_node, load_location)
861
+ AssocSplatNode.new(source, node_id, location, load_varuint, load_optional_node(constant_pool, encoding, freeze), load_location(freeze))
679
862
  when 10 then
680
- BackReferenceReadNode.new(source, node_id, location, load_varuint, load_required_constant)
863
+ BackReferenceReadNode.new(source, node_id, location, load_varuint, load_constant(constant_pool, encoding))
681
864
  when 11 then
682
- BeginNode.new(source, node_id, location, load_varuint, load_optional_location, load_optional_node, load_optional_node, load_optional_node, load_optional_node, load_optional_location)
865
+ BeginNode.new(source, node_id, location, load_varuint, load_optional_location(freeze), load_optional_node(constant_pool, encoding, freeze), load_optional_node(constant_pool, encoding, freeze), load_optional_node(constant_pool, encoding, freeze), load_optional_node(constant_pool, encoding, freeze), load_optional_location(freeze))
683
866
  when 12 then
684
- BlockArgumentNode.new(source, node_id, location, load_varuint, load_optional_node, load_location)
867
+ BlockArgumentNode.new(source, node_id, location, load_varuint, load_optional_node(constant_pool, encoding, freeze), load_location(freeze))
685
868
  when 13 then
686
- BlockLocalVariableNode.new(source, node_id, location, load_varuint, load_required_constant)
869
+ BlockLocalVariableNode.new(source, node_id, location, load_varuint, load_constant(constant_pool, encoding))
687
870
  when 14 then
688
- BlockNode.new(source, node_id, location, load_varuint, Array.new(load_varuint) { load_required_constant }, load_optional_node, load_optional_node, load_location, load_location)
871
+ BlockNode.new(source, node_id, location, load_varuint, Array.new(load_varuint) { load_constant(constant_pool, encoding) }.tap { |constants| constants.freeze if freeze }, load_optional_node(constant_pool, encoding, freeze), load_optional_node(constant_pool, encoding, freeze), load_location(freeze), load_location(freeze))
689
872
  when 15 then
690
- BlockParameterNode.new(source, node_id, location, load_varuint, load_optional_constant, load_optional_location, load_location)
873
+ BlockParameterNode.new(source, node_id, location, load_varuint, load_optional_constant(constant_pool, encoding), load_optional_location(freeze), load_location(freeze))
691
874
  when 16 then
692
- BlockParametersNode.new(source, node_id, location, load_varuint, load_optional_node, Array.new(load_varuint) { load_node }, load_optional_location, load_optional_location)
875
+ BlockParametersNode.new(source, node_id, location, load_varuint, load_optional_node(constant_pool, encoding, freeze), Array.new(load_varuint) { load_node(constant_pool, encoding, freeze) }.tap { |nodes| nodes.freeze if freeze }, load_optional_location(freeze), load_optional_location(freeze))
693
876
  when 17 then
694
- BreakNode.new(source, node_id, location, load_varuint, load_optional_node, load_location)
877
+ BreakNode.new(source, node_id, location, load_varuint, load_optional_node(constant_pool, encoding, freeze), load_location(freeze))
695
878
  when 18 then
696
- CallAndWriteNode.new(source, node_id, location, load_varuint, load_optional_node, load_optional_location, load_optional_location, load_required_constant, load_required_constant, load_location, load_node)
879
+ CallAndWriteNode.new(source, node_id, location, load_varuint, load_optional_node(constant_pool, encoding, freeze), load_optional_location(freeze), load_optional_location(freeze), load_constant(constant_pool, encoding), load_constant(constant_pool, encoding), load_location(freeze), load_node(constant_pool, encoding, freeze))
697
880
  when 19 then
698
- CallNode.new(source, node_id, location, load_varuint, load_optional_node, load_optional_location, load_required_constant, load_optional_location, load_optional_location, load_optional_node, load_optional_location, load_optional_node)
881
+ CallNode.new(source, node_id, location, load_varuint, load_optional_node(constant_pool, encoding, freeze), load_optional_location(freeze), load_constant(constant_pool, encoding), load_optional_location(freeze), load_optional_location(freeze), load_optional_node(constant_pool, encoding, freeze), load_optional_location(freeze), load_optional_node(constant_pool, encoding, freeze))
699
882
  when 20 then
700
- CallOperatorWriteNode.new(source, node_id, location, load_varuint, load_optional_node, load_optional_location, load_optional_location, load_required_constant, load_required_constant, load_required_constant, load_location, load_node)
883
+ CallOperatorWriteNode.new(source, node_id, location, load_varuint, load_optional_node(constant_pool, encoding, freeze), load_optional_location(freeze), load_optional_location(freeze), load_constant(constant_pool, encoding), load_constant(constant_pool, encoding), load_constant(constant_pool, encoding), load_location(freeze), load_node(constant_pool, encoding, freeze))
701
884
  when 21 then
702
- CallOrWriteNode.new(source, node_id, location, load_varuint, load_optional_node, load_optional_location, load_optional_location, load_required_constant, load_required_constant, load_location, load_node)
885
+ CallOrWriteNode.new(source, node_id, location, load_varuint, load_optional_node(constant_pool, encoding, freeze), load_optional_location(freeze), load_optional_location(freeze), load_constant(constant_pool, encoding), load_constant(constant_pool, encoding), load_location(freeze), load_node(constant_pool, encoding, freeze))
703
886
  when 22 then
704
- CallTargetNode.new(source, node_id, location, load_varuint, load_node, load_location, load_required_constant, load_location)
887
+ CallTargetNode.new(source, node_id, location, load_varuint, load_node(constant_pool, encoding, freeze), load_location(freeze), load_constant(constant_pool, encoding), load_location(freeze))
705
888
  when 23 then
706
- CapturePatternNode.new(source, node_id, location, load_varuint, load_node, load_node, load_location)
889
+ CapturePatternNode.new(source, node_id, location, load_varuint, load_node(constant_pool, encoding, freeze), load_node(constant_pool, encoding, freeze), load_location(freeze))
707
890
  when 24 then
708
- CaseMatchNode.new(source, node_id, location, load_varuint, load_optional_node, Array.new(load_varuint) { load_node }, load_optional_node, load_location, load_location)
891
+ CaseMatchNode.new(source, node_id, location, load_varuint, load_optional_node(constant_pool, encoding, freeze), Array.new(load_varuint) { load_node(constant_pool, encoding, freeze) }.tap { |nodes| nodes.freeze if freeze }, load_optional_node(constant_pool, encoding, freeze), load_location(freeze), load_location(freeze))
709
892
  when 25 then
710
- CaseNode.new(source, node_id, location, load_varuint, load_optional_node, Array.new(load_varuint) { load_node }, load_optional_node, load_location, load_location)
893
+ CaseNode.new(source, node_id, location, load_varuint, load_optional_node(constant_pool, encoding, freeze), Array.new(load_varuint) { load_node(constant_pool, encoding, freeze) }.tap { |nodes| nodes.freeze if freeze }, load_optional_node(constant_pool, encoding, freeze), load_location(freeze), load_location(freeze))
711
894
  when 26 then
712
- ClassNode.new(source, node_id, location, load_varuint, Array.new(load_varuint) { load_required_constant }, load_location, load_node, load_optional_location, load_optional_node, load_optional_node, load_location, load_required_constant)
895
+ ClassNode.new(source, node_id, location, load_varuint, Array.new(load_varuint) { load_constant(constant_pool, encoding) }.tap { |constants| constants.freeze if freeze }, load_location(freeze), load_node(constant_pool, encoding, freeze), load_optional_location(freeze), load_optional_node(constant_pool, encoding, freeze), load_optional_node(constant_pool, encoding, freeze), load_location(freeze), load_constant(constant_pool, encoding))
713
896
  when 27 then
714
- ClassVariableAndWriteNode.new(source, node_id, location, load_varuint, load_required_constant, load_location, load_location, load_node)
897
+ ClassVariableAndWriteNode.new(source, node_id, location, load_varuint, load_constant(constant_pool, encoding), load_location(freeze), load_location(freeze), load_node(constant_pool, encoding, freeze))
715
898
  when 28 then
716
- ClassVariableOperatorWriteNode.new(source, node_id, location, load_varuint, load_required_constant, load_location, load_location, load_node, load_required_constant)
899
+ ClassVariableOperatorWriteNode.new(source, node_id, location, load_varuint, load_constant(constant_pool, encoding), load_location(freeze), load_location(freeze), load_node(constant_pool, encoding, freeze), load_constant(constant_pool, encoding))
717
900
  when 29 then
718
- ClassVariableOrWriteNode.new(source, node_id, location, load_varuint, load_required_constant, load_location, load_location, load_node)
901
+ ClassVariableOrWriteNode.new(source, node_id, location, load_varuint, load_constant(constant_pool, encoding), load_location(freeze), load_location(freeze), load_node(constant_pool, encoding, freeze))
719
902
  when 30 then
720
- ClassVariableReadNode.new(source, node_id, location, load_varuint, load_required_constant)
903
+ ClassVariableReadNode.new(source, node_id, location, load_varuint, load_constant(constant_pool, encoding))
721
904
  when 31 then
722
- ClassVariableTargetNode.new(source, node_id, location, load_varuint, load_required_constant)
905
+ ClassVariableTargetNode.new(source, node_id, location, load_varuint, load_constant(constant_pool, encoding))
723
906
  when 32 then
724
- ClassVariableWriteNode.new(source, node_id, location, load_varuint, load_required_constant, load_location, load_node, load_location)
907
+ ClassVariableWriteNode.new(source, node_id, location, load_varuint, load_constant(constant_pool, encoding), load_location(freeze), load_node(constant_pool, encoding, freeze), load_location(freeze))
725
908
  when 33 then
726
- ConstantAndWriteNode.new(source, node_id, location, load_varuint, load_required_constant, load_location, load_location, load_node)
909
+ ConstantAndWriteNode.new(source, node_id, location, load_varuint, load_constant(constant_pool, encoding), load_location(freeze), load_location(freeze), load_node(constant_pool, encoding, freeze))
727
910
  when 34 then
728
- ConstantOperatorWriteNode.new(source, node_id, location, load_varuint, load_required_constant, load_location, load_location, load_node, load_required_constant)
911
+ ConstantOperatorWriteNode.new(source, node_id, location, load_varuint, load_constant(constant_pool, encoding), load_location(freeze), load_location(freeze), load_node(constant_pool, encoding, freeze), load_constant(constant_pool, encoding))
729
912
  when 35 then
730
- ConstantOrWriteNode.new(source, node_id, location, load_varuint, load_required_constant, load_location, load_location, load_node)
913
+ ConstantOrWriteNode.new(source, node_id, location, load_varuint, load_constant(constant_pool, encoding), load_location(freeze), load_location(freeze), load_node(constant_pool, encoding, freeze))
731
914
  when 36 then
732
- ConstantPathAndWriteNode.new(source, node_id, location, load_varuint, load_node, load_location, load_node)
915
+ ConstantPathAndWriteNode.new(source, node_id, location, load_varuint, load_node(constant_pool, encoding, freeze), load_location(freeze), load_node(constant_pool, encoding, freeze))
733
916
  when 37 then
734
- ConstantPathNode.new(source, node_id, location, load_varuint, load_optional_node, load_optional_constant, load_location, load_location)
917
+ ConstantPathNode.new(source, node_id, location, load_varuint, load_optional_node(constant_pool, encoding, freeze), load_optional_constant(constant_pool, encoding), load_location(freeze), load_location(freeze))
735
918
  when 38 then
736
- ConstantPathOperatorWriteNode.new(source, node_id, location, load_varuint, load_node, load_location, load_node, load_required_constant)
919
+ ConstantPathOperatorWriteNode.new(source, node_id, location, load_varuint, load_node(constant_pool, encoding, freeze), load_location(freeze), load_node(constant_pool, encoding, freeze), load_constant(constant_pool, encoding))
737
920
  when 39 then
738
- ConstantPathOrWriteNode.new(source, node_id, location, load_varuint, load_node, load_location, load_node)
921
+ ConstantPathOrWriteNode.new(source, node_id, location, load_varuint, load_node(constant_pool, encoding, freeze), load_location(freeze), load_node(constant_pool, encoding, freeze))
739
922
  when 40 then
740
- ConstantPathTargetNode.new(source, node_id, location, load_varuint, load_optional_node, load_optional_constant, load_location, load_location)
923
+ ConstantPathTargetNode.new(source, node_id, location, load_varuint, load_optional_node(constant_pool, encoding, freeze), load_optional_constant(constant_pool, encoding), load_location(freeze), load_location(freeze))
741
924
  when 41 then
742
- ConstantPathWriteNode.new(source, node_id, location, load_varuint, load_node, load_location, load_node)
925
+ ConstantPathWriteNode.new(source, node_id, location, load_varuint, load_node(constant_pool, encoding, freeze), load_location(freeze), load_node(constant_pool, encoding, freeze))
743
926
  when 42 then
744
- ConstantReadNode.new(source, node_id, location, load_varuint, load_required_constant)
927
+ ConstantReadNode.new(source, node_id, location, load_varuint, load_constant(constant_pool, encoding))
745
928
  when 43 then
746
- ConstantTargetNode.new(source, node_id, location, load_varuint, load_required_constant)
929
+ ConstantTargetNode.new(source, node_id, location, load_varuint, load_constant(constant_pool, encoding))
747
930
  when 44 then
748
- ConstantWriteNode.new(source, node_id, location, load_varuint, load_required_constant, load_location, load_node, load_location)
931
+ ConstantWriteNode.new(source, node_id, location, load_varuint, load_constant(constant_pool, encoding), load_location(freeze), load_node(constant_pool, encoding, freeze), load_location(freeze))
749
932
  when 45 then
750
933
  load_uint32
751
- DefNode.new(source, node_id, location, load_varuint, load_required_constant, load_location, load_optional_node, load_optional_node, load_optional_node, Array.new(load_varuint) { load_required_constant }, load_location, load_optional_location, load_optional_location, load_optional_location, load_optional_location, load_optional_location)
934
+ DefNode.new(source, node_id, location, load_varuint, load_constant(constant_pool, encoding), load_location(freeze), load_optional_node(constant_pool, encoding, freeze), load_optional_node(constant_pool, encoding, freeze), load_optional_node(constant_pool, encoding, freeze), Array.new(load_varuint) { load_constant(constant_pool, encoding) }.tap { |constants| constants.freeze if freeze }, load_location(freeze), load_optional_location(freeze), load_optional_location(freeze), load_optional_location(freeze), load_optional_location(freeze), load_optional_location(freeze))
752
935
  when 46 then
753
- DefinedNode.new(source, node_id, location, load_varuint, load_optional_location, load_node, load_optional_location, load_location)
936
+ DefinedNode.new(source, node_id, location, load_varuint, load_optional_location(freeze), load_node(constant_pool, encoding, freeze), load_optional_location(freeze), load_location(freeze))
754
937
  when 47 then
755
- ElseNode.new(source, node_id, location, load_varuint, load_location, load_optional_node, load_optional_location)
938
+ ElseNode.new(source, node_id, location, load_varuint, load_location(freeze), load_optional_node(constant_pool, encoding, freeze), load_optional_location(freeze))
756
939
  when 48 then
757
- EmbeddedStatementsNode.new(source, node_id, location, load_varuint, load_location, load_optional_node, load_location)
940
+ EmbeddedStatementsNode.new(source, node_id, location, load_varuint, load_location(freeze), load_optional_node(constant_pool, encoding, freeze), load_location(freeze))
758
941
  when 49 then
759
- EmbeddedVariableNode.new(source, node_id, location, load_varuint, load_location, load_node)
942
+ EmbeddedVariableNode.new(source, node_id, location, load_varuint, load_location(freeze), load_node(constant_pool, encoding, freeze))
760
943
  when 50 then
761
- EnsureNode.new(source, node_id, location, load_varuint, load_location, load_optional_node, load_location)
944
+ EnsureNode.new(source, node_id, location, load_varuint, load_location(freeze), load_optional_node(constant_pool, encoding, freeze), load_location(freeze))
762
945
  when 51 then
763
946
  FalseNode.new(source, node_id, location, load_varuint)
764
947
  when 52 then
765
- FindPatternNode.new(source, node_id, location, load_varuint, load_optional_node, load_node, Array.new(load_varuint) { load_node }, load_node, load_optional_location, load_optional_location)
948
+ FindPatternNode.new(source, node_id, location, load_varuint, load_optional_node(constant_pool, encoding, freeze), load_node(constant_pool, encoding, freeze), Array.new(load_varuint) { load_node(constant_pool, encoding, freeze) }.tap { |nodes| nodes.freeze if freeze }, load_node(constant_pool, encoding, freeze), load_optional_location(freeze), load_optional_location(freeze))
766
949
  when 53 then
767
- FlipFlopNode.new(source, node_id, location, load_varuint, load_optional_node, load_optional_node, load_location)
950
+ FlipFlopNode.new(source, node_id, location, load_varuint, load_optional_node(constant_pool, encoding, freeze), load_optional_node(constant_pool, encoding, freeze), load_location(freeze))
768
951
  when 54 then
769
952
  FloatNode.new(source, node_id, location, load_varuint, load_double)
770
953
  when 55 then
771
- ForNode.new(source, node_id, location, load_varuint, load_node, load_node, load_optional_node, load_location, load_location, load_optional_location, load_location)
954
+ ForNode.new(source, node_id, location, load_varuint, load_node(constant_pool, encoding, freeze), load_node(constant_pool, encoding, freeze), load_optional_node(constant_pool, encoding, freeze), load_location(freeze), load_location(freeze), load_optional_location(freeze), load_location(freeze))
772
955
  when 56 then
773
956
  ForwardingArgumentsNode.new(source, node_id, location, load_varuint)
774
957
  when 57 then
775
958
  ForwardingParameterNode.new(source, node_id, location, load_varuint)
776
959
  when 58 then
777
- ForwardingSuperNode.new(source, node_id, location, load_varuint, load_optional_node)
960
+ ForwardingSuperNode.new(source, node_id, location, load_varuint, load_optional_node(constant_pool, encoding, freeze))
778
961
  when 59 then
779
- GlobalVariableAndWriteNode.new(source, node_id, location, load_varuint, load_required_constant, load_location, load_location, load_node)
962
+ GlobalVariableAndWriteNode.new(source, node_id, location, load_varuint, load_constant(constant_pool, encoding), load_location(freeze), load_location(freeze), load_node(constant_pool, encoding, freeze))
780
963
  when 60 then
781
- GlobalVariableOperatorWriteNode.new(source, node_id, location, load_varuint, load_required_constant, load_location, load_location, load_node, load_required_constant)
964
+ GlobalVariableOperatorWriteNode.new(source, node_id, location, load_varuint, load_constant(constant_pool, encoding), load_location(freeze), load_location(freeze), load_node(constant_pool, encoding, freeze), load_constant(constant_pool, encoding))
782
965
  when 61 then
783
- GlobalVariableOrWriteNode.new(source, node_id, location, load_varuint, load_required_constant, load_location, load_location, load_node)
966
+ GlobalVariableOrWriteNode.new(source, node_id, location, load_varuint, load_constant(constant_pool, encoding), load_location(freeze), load_location(freeze), load_node(constant_pool, encoding, freeze))
784
967
  when 62 then
785
- GlobalVariableReadNode.new(source, node_id, location, load_varuint, load_required_constant)
968
+ GlobalVariableReadNode.new(source, node_id, location, load_varuint, load_constant(constant_pool, encoding))
786
969
  when 63 then
787
- GlobalVariableTargetNode.new(source, node_id, location, load_varuint, load_required_constant)
970
+ GlobalVariableTargetNode.new(source, node_id, location, load_varuint, load_constant(constant_pool, encoding))
788
971
  when 64 then
789
- GlobalVariableWriteNode.new(source, node_id, location, load_varuint, load_required_constant, load_location, load_node, load_location)
972
+ GlobalVariableWriteNode.new(source, node_id, location, load_varuint, load_constant(constant_pool, encoding), load_location(freeze), load_node(constant_pool, encoding, freeze), load_location(freeze))
790
973
  when 65 then
791
- HashNode.new(source, node_id, location, load_varuint, load_location, Array.new(load_varuint) { load_node }, load_location)
974
+ HashNode.new(source, node_id, location, load_varuint, load_location(freeze), Array.new(load_varuint) { load_node(constant_pool, encoding, freeze) }.tap { |nodes| nodes.freeze if freeze }, load_location(freeze))
792
975
  when 66 then
793
- HashPatternNode.new(source, node_id, location, load_varuint, load_optional_node, Array.new(load_varuint) { load_node }, load_optional_node, load_optional_location, load_optional_location)
976
+ HashPatternNode.new(source, node_id, location, load_varuint, load_optional_node(constant_pool, encoding, freeze), Array.new(load_varuint) { load_node(constant_pool, encoding, freeze) }.tap { |nodes| nodes.freeze if freeze }, load_optional_node(constant_pool, encoding, freeze), load_optional_location(freeze), load_optional_location(freeze))
794
977
  when 67 then
795
- IfNode.new(source, node_id, location, load_varuint, load_optional_location, load_node, load_optional_location, load_optional_node, load_optional_node, load_optional_location)
978
+ IfNode.new(source, node_id, location, load_varuint, load_optional_location(freeze), load_node(constant_pool, encoding, freeze), load_optional_location(freeze), load_optional_node(constant_pool, encoding, freeze), load_optional_node(constant_pool, encoding, freeze), load_optional_location(freeze))
796
979
  when 68 then
797
- ImaginaryNode.new(source, node_id, location, load_varuint, load_node)
980
+ ImaginaryNode.new(source, node_id, location, load_varuint, load_node(constant_pool, encoding, freeze))
798
981
  when 69 then
799
- ImplicitNode.new(source, node_id, location, load_varuint, load_node)
982
+ ImplicitNode.new(source, node_id, location, load_varuint, load_node(constant_pool, encoding, freeze))
800
983
  when 70 then
801
984
  ImplicitRestNode.new(source, node_id, location, load_varuint)
802
985
  when 71 then
803
- InNode.new(source, node_id, location, load_varuint, load_node, load_optional_node, load_location, load_optional_location)
986
+ InNode.new(source, node_id, location, load_varuint, load_node(constant_pool, encoding, freeze), load_optional_node(constant_pool, encoding, freeze), load_location(freeze), load_optional_location(freeze))
804
987
  when 72 then
805
- IndexAndWriteNode.new(source, node_id, location, load_varuint, load_optional_node, load_optional_location, load_location, load_optional_node, load_location, load_optional_node, load_location, load_node)
988
+ IndexAndWriteNode.new(source, node_id, location, load_varuint, load_optional_node(constant_pool, encoding, freeze), load_optional_location(freeze), load_location(freeze), load_optional_node(constant_pool, encoding, freeze), load_location(freeze), load_optional_node(constant_pool, encoding, freeze), load_location(freeze), load_node(constant_pool, encoding, freeze))
806
989
  when 73 then
807
- IndexOperatorWriteNode.new(source, node_id, location, load_varuint, load_optional_node, load_optional_location, load_location, load_optional_node, load_location, load_optional_node, load_required_constant, load_location, load_node)
990
+ IndexOperatorWriteNode.new(source, node_id, location, load_varuint, load_optional_node(constant_pool, encoding, freeze), load_optional_location(freeze), load_location(freeze), load_optional_node(constant_pool, encoding, freeze), load_location(freeze), load_optional_node(constant_pool, encoding, freeze), load_constant(constant_pool, encoding), load_location(freeze), load_node(constant_pool, encoding, freeze))
808
991
  when 74 then
809
- IndexOrWriteNode.new(source, node_id, location, load_varuint, load_optional_node, load_optional_location, load_location, load_optional_node, load_location, load_optional_node, load_location, load_node)
992
+ IndexOrWriteNode.new(source, node_id, location, load_varuint, load_optional_node(constant_pool, encoding, freeze), load_optional_location(freeze), load_location(freeze), load_optional_node(constant_pool, encoding, freeze), load_location(freeze), load_optional_node(constant_pool, encoding, freeze), load_location(freeze), load_node(constant_pool, encoding, freeze))
810
993
  when 75 then
811
- IndexTargetNode.new(source, node_id, location, load_varuint, load_node, load_location, load_optional_node, load_location, load_optional_node)
994
+ IndexTargetNode.new(source, node_id, location, load_varuint, load_node(constant_pool, encoding, freeze), load_location(freeze), load_optional_node(constant_pool, encoding, freeze), load_location(freeze), load_optional_node(constant_pool, encoding, freeze))
812
995
  when 76 then
813
- InstanceVariableAndWriteNode.new(source, node_id, location, load_varuint, load_required_constant, load_location, load_location, load_node)
996
+ InstanceVariableAndWriteNode.new(source, node_id, location, load_varuint, load_constant(constant_pool, encoding), load_location(freeze), load_location(freeze), load_node(constant_pool, encoding, freeze))
814
997
  when 77 then
815
- InstanceVariableOperatorWriteNode.new(source, node_id, location, load_varuint, load_required_constant, load_location, load_location, load_node, load_required_constant)
998
+ InstanceVariableOperatorWriteNode.new(source, node_id, location, load_varuint, load_constant(constant_pool, encoding), load_location(freeze), load_location(freeze), load_node(constant_pool, encoding, freeze), load_constant(constant_pool, encoding))
816
999
  when 78 then
817
- InstanceVariableOrWriteNode.new(source, node_id, location, load_varuint, load_required_constant, load_location, load_location, load_node)
1000
+ InstanceVariableOrWriteNode.new(source, node_id, location, load_varuint, load_constant(constant_pool, encoding), load_location(freeze), load_location(freeze), load_node(constant_pool, encoding, freeze))
818
1001
  when 79 then
819
- InstanceVariableReadNode.new(source, node_id, location, load_varuint, load_required_constant)
1002
+ InstanceVariableReadNode.new(source, node_id, location, load_varuint, load_constant(constant_pool, encoding))
820
1003
  when 80 then
821
- InstanceVariableTargetNode.new(source, node_id, location, load_varuint, load_required_constant)
1004
+ InstanceVariableTargetNode.new(source, node_id, location, load_varuint, load_constant(constant_pool, encoding))
822
1005
  when 81 then
823
- InstanceVariableWriteNode.new(source, node_id, location, load_varuint, load_required_constant, load_location, load_node, load_location)
1006
+ InstanceVariableWriteNode.new(source, node_id, location, load_varuint, load_constant(constant_pool, encoding), load_location(freeze), load_node(constant_pool, encoding, freeze), load_location(freeze))
824
1007
  when 82 then
825
1008
  IntegerNode.new(source, node_id, location, load_varuint, load_integer)
826
1009
  when 83 then
827
- InterpolatedMatchLastLineNode.new(source, node_id, location, load_varuint, load_location, Array.new(load_varuint) { load_node }, load_location)
1010
+ InterpolatedMatchLastLineNode.new(source, node_id, location, load_varuint, load_location(freeze), Array.new(load_varuint) { load_node(constant_pool, encoding, freeze) }.tap { |nodes| nodes.freeze if freeze }, load_location(freeze))
828
1011
  when 84 then
829
- InterpolatedRegularExpressionNode.new(source, node_id, location, load_varuint, load_location, Array.new(load_varuint) { load_node }, load_location)
1012
+ InterpolatedRegularExpressionNode.new(source, node_id, location, load_varuint, load_location(freeze), Array.new(load_varuint) { load_node(constant_pool, encoding, freeze) }.tap { |nodes| nodes.freeze if freeze }, load_location(freeze))
830
1013
  when 85 then
831
- InterpolatedStringNode.new(source, node_id, location, load_varuint, load_optional_location, Array.new(load_varuint) { load_node }, load_optional_location)
1014
+ InterpolatedStringNode.new(source, node_id, location, load_varuint, load_optional_location(freeze), Array.new(load_varuint) { load_node(constant_pool, encoding, freeze) }.tap { |nodes| nodes.freeze if freeze }, load_optional_location(freeze))
832
1015
  when 86 then
833
- InterpolatedSymbolNode.new(source, node_id, location, load_varuint, load_optional_location, Array.new(load_varuint) { load_node }, load_optional_location)
1016
+ InterpolatedSymbolNode.new(source, node_id, location, load_varuint, load_optional_location(freeze), Array.new(load_varuint) { load_node(constant_pool, encoding, freeze) }.tap { |nodes| nodes.freeze if freeze }, load_optional_location(freeze))
834
1017
  when 87 then
835
- InterpolatedXStringNode.new(source, node_id, location, load_varuint, load_location, Array.new(load_varuint) { load_node }, load_location)
1018
+ InterpolatedXStringNode.new(source, node_id, location, load_varuint, load_location(freeze), Array.new(load_varuint) { load_node(constant_pool, encoding, freeze) }.tap { |nodes| nodes.freeze if freeze }, load_location(freeze))
836
1019
  when 88 then
837
1020
  ItLocalVariableReadNode.new(source, node_id, location, load_varuint)
838
1021
  when 89 then
839
1022
  ItParametersNode.new(source, node_id, location, load_varuint)
840
1023
  when 90 then
841
- KeywordHashNode.new(source, node_id, location, load_varuint, Array.new(load_varuint) { load_node })
1024
+ KeywordHashNode.new(source, node_id, location, load_varuint, Array.new(load_varuint) { load_node(constant_pool, encoding, freeze) }.tap { |nodes| nodes.freeze if freeze })
842
1025
  when 91 then
843
- KeywordRestParameterNode.new(source, node_id, location, load_varuint, load_optional_constant, load_optional_location, load_location)
1026
+ KeywordRestParameterNode.new(source, node_id, location, load_varuint, load_optional_constant(constant_pool, encoding), load_optional_location(freeze), load_location(freeze))
844
1027
  when 92 then
845
- LambdaNode.new(source, node_id, location, load_varuint, Array.new(load_varuint) { load_required_constant }, load_location, load_location, load_location, load_optional_node, load_optional_node)
1028
+ LambdaNode.new(source, node_id, location, load_varuint, Array.new(load_varuint) { load_constant(constant_pool, encoding) }.tap { |constants| constants.freeze if freeze }, load_location(freeze), load_location(freeze), load_location(freeze), load_optional_node(constant_pool, encoding, freeze), load_optional_node(constant_pool, encoding, freeze))
846
1029
  when 93 then
847
- LocalVariableAndWriteNode.new(source, node_id, location, load_varuint, load_location, load_location, load_node, load_required_constant, load_varuint)
1030
+ LocalVariableAndWriteNode.new(source, node_id, location, load_varuint, load_location(freeze), load_location(freeze), load_node(constant_pool, encoding, freeze), load_constant(constant_pool, encoding), load_varuint)
848
1031
  when 94 then
849
- LocalVariableOperatorWriteNode.new(source, node_id, location, load_varuint, load_location, load_location, load_node, load_required_constant, load_required_constant, load_varuint)
1032
+ LocalVariableOperatorWriteNode.new(source, node_id, location, load_varuint, load_location(freeze), load_location(freeze), load_node(constant_pool, encoding, freeze), load_constant(constant_pool, encoding), load_constant(constant_pool, encoding), load_varuint)
850
1033
  when 95 then
851
- LocalVariableOrWriteNode.new(source, node_id, location, load_varuint, load_location, load_location, load_node, load_required_constant, load_varuint)
1034
+ LocalVariableOrWriteNode.new(source, node_id, location, load_varuint, load_location(freeze), load_location(freeze), load_node(constant_pool, encoding, freeze), load_constant(constant_pool, encoding), load_varuint)
852
1035
  when 96 then
853
- LocalVariableReadNode.new(source, node_id, location, load_varuint, load_required_constant, load_varuint)
1036
+ LocalVariableReadNode.new(source, node_id, location, load_varuint, load_constant(constant_pool, encoding), load_varuint)
854
1037
  when 97 then
855
- LocalVariableTargetNode.new(source, node_id, location, load_varuint, load_required_constant, load_varuint)
1038
+ LocalVariableTargetNode.new(source, node_id, location, load_varuint, load_constant(constant_pool, encoding), load_varuint)
856
1039
  when 98 then
857
- LocalVariableWriteNode.new(source, node_id, location, load_varuint, load_required_constant, load_varuint, load_location, load_node, load_location)
1040
+ LocalVariableWriteNode.new(source, node_id, location, load_varuint, load_constant(constant_pool, encoding), load_varuint, load_location(freeze), load_node(constant_pool, encoding, freeze), load_location(freeze))
858
1041
  when 99 then
859
- MatchLastLineNode.new(source, node_id, location, load_varuint, load_location, load_location, load_location, load_string)
1042
+ MatchLastLineNode.new(source, node_id, location, load_varuint, load_location(freeze), load_location(freeze), load_location(freeze), load_string(encoding))
860
1043
  when 100 then
861
- MatchPredicateNode.new(source, node_id, location, load_varuint, load_node, load_node, load_location)
1044
+ MatchPredicateNode.new(source, node_id, location, load_varuint, load_node(constant_pool, encoding, freeze), load_node(constant_pool, encoding, freeze), load_location(freeze))
862
1045
  when 101 then
863
- MatchRequiredNode.new(source, node_id, location, load_varuint, load_node, load_node, load_location)
1046
+ MatchRequiredNode.new(source, node_id, location, load_varuint, load_node(constant_pool, encoding, freeze), load_node(constant_pool, encoding, freeze), load_location(freeze))
864
1047
  when 102 then
865
- MatchWriteNode.new(source, node_id, location, load_varuint, load_node, Array.new(load_varuint) { load_node })
1048
+ MatchWriteNode.new(source, node_id, location, load_varuint, load_node(constant_pool, encoding, freeze), Array.new(load_varuint) { load_node(constant_pool, encoding, freeze) }.tap { |nodes| nodes.freeze if freeze })
866
1049
  when 103 then
867
1050
  MissingNode.new(source, node_id, location, load_varuint)
868
1051
  when 104 then
869
- ModuleNode.new(source, node_id, location, load_varuint, Array.new(load_varuint) { load_required_constant }, load_location, load_node, load_optional_node, load_location, load_required_constant)
1052
+ ModuleNode.new(source, node_id, location, load_varuint, Array.new(load_varuint) { load_constant(constant_pool, encoding) }.tap { |constants| constants.freeze if freeze }, load_location(freeze), load_node(constant_pool, encoding, freeze), load_optional_node(constant_pool, encoding, freeze), load_location(freeze), load_constant(constant_pool, encoding))
870
1053
  when 105 then
871
- MultiTargetNode.new(source, node_id, location, load_varuint, Array.new(load_varuint) { load_node }, load_optional_node, Array.new(load_varuint) { load_node }, load_optional_location, load_optional_location)
1054
+ MultiTargetNode.new(source, node_id, location, load_varuint, Array.new(load_varuint) { load_node(constant_pool, encoding, freeze) }.tap { |nodes| nodes.freeze if freeze }, load_optional_node(constant_pool, encoding, freeze), Array.new(load_varuint) { load_node(constant_pool, encoding, freeze) }.tap { |nodes| nodes.freeze if freeze }, load_optional_location(freeze), load_optional_location(freeze))
872
1055
  when 106 then
873
- MultiWriteNode.new(source, node_id, location, load_varuint, Array.new(load_varuint) { load_node }, load_optional_node, Array.new(load_varuint) { load_node }, load_optional_location, load_optional_location, load_location, load_node)
1056
+ MultiWriteNode.new(source, node_id, location, load_varuint, Array.new(load_varuint) { load_node(constant_pool, encoding, freeze) }.tap { |nodes| nodes.freeze if freeze }, load_optional_node(constant_pool, encoding, freeze), Array.new(load_varuint) { load_node(constant_pool, encoding, freeze) }.tap { |nodes| nodes.freeze if freeze }, load_optional_location(freeze), load_optional_location(freeze), load_location(freeze), load_node(constant_pool, encoding, freeze))
874
1057
  when 107 then
875
- NextNode.new(source, node_id, location, load_varuint, load_optional_node, load_location)
1058
+ NextNode.new(source, node_id, location, load_varuint, load_optional_node(constant_pool, encoding, freeze), load_location(freeze))
876
1059
  when 108 then
877
1060
  NilNode.new(source, node_id, location, load_varuint)
878
1061
  when 109 then
879
- NoKeywordsParameterNode.new(source, node_id, location, load_varuint, load_location, load_location)
1062
+ NoKeywordsParameterNode.new(source, node_id, location, load_varuint, load_location(freeze), load_location(freeze))
880
1063
  when 110 then
881
1064
  NumberedParametersNode.new(source, node_id, location, load_varuint, io.getbyte)
882
1065
  when 111 then
883
1066
  NumberedReferenceReadNode.new(source, node_id, location, load_varuint, load_varuint)
884
1067
  when 112 then
885
- OptionalKeywordParameterNode.new(source, node_id, location, load_varuint, load_required_constant, load_location, load_node)
1068
+ OptionalKeywordParameterNode.new(source, node_id, location, load_varuint, load_constant(constant_pool, encoding), load_location(freeze), load_node(constant_pool, encoding, freeze))
886
1069
  when 113 then
887
- OptionalParameterNode.new(source, node_id, location, load_varuint, load_required_constant, load_location, load_location, load_node)
1070
+ OptionalParameterNode.new(source, node_id, location, load_varuint, load_constant(constant_pool, encoding), load_location(freeze), load_location(freeze), load_node(constant_pool, encoding, freeze))
888
1071
  when 114 then
889
- OrNode.new(source, node_id, location, load_varuint, load_node, load_node, load_location)
1072
+ OrNode.new(source, node_id, location, load_varuint, load_node(constant_pool, encoding, freeze), load_node(constant_pool, encoding, freeze), load_location(freeze))
890
1073
  when 115 then
891
- ParametersNode.new(source, node_id, location, load_varuint, Array.new(load_varuint) { load_node }, Array.new(load_varuint) { load_node }, load_optional_node, Array.new(load_varuint) { load_node }, Array.new(load_varuint) { load_node }, load_optional_node, load_optional_node)
1074
+ ParametersNode.new(source, node_id, location, load_varuint, Array.new(load_varuint) { load_node(constant_pool, encoding, freeze) }.tap { |nodes| nodes.freeze if freeze }, Array.new(load_varuint) { load_node(constant_pool, encoding, freeze) }.tap { |nodes| nodes.freeze if freeze }, load_optional_node(constant_pool, encoding, freeze), Array.new(load_varuint) { load_node(constant_pool, encoding, freeze) }.tap { |nodes| nodes.freeze if freeze }, Array.new(load_varuint) { load_node(constant_pool, encoding, freeze) }.tap { |nodes| nodes.freeze if freeze }, load_optional_node(constant_pool, encoding, freeze), load_optional_node(constant_pool, encoding, freeze))
892
1075
  when 116 then
893
- ParenthesesNode.new(source, node_id, location, load_varuint, load_optional_node, load_location, load_location)
1076
+ ParenthesesNode.new(source, node_id, location, load_varuint, load_optional_node(constant_pool, encoding, freeze), load_location(freeze), load_location(freeze))
894
1077
  when 117 then
895
- PinnedExpressionNode.new(source, node_id, location, load_varuint, load_node, load_location, load_location, load_location)
1078
+ PinnedExpressionNode.new(source, node_id, location, load_varuint, load_node(constant_pool, encoding, freeze), load_location(freeze), load_location(freeze), load_location(freeze))
896
1079
  when 118 then
897
- PinnedVariableNode.new(source, node_id, location, load_varuint, load_node, load_location)
1080
+ PinnedVariableNode.new(source, node_id, location, load_varuint, load_node(constant_pool, encoding, freeze), load_location(freeze))
898
1081
  when 119 then
899
- PostExecutionNode.new(source, node_id, location, load_varuint, load_optional_node, load_location, load_location, load_location)
1082
+ PostExecutionNode.new(source, node_id, location, load_varuint, load_optional_node(constant_pool, encoding, freeze), load_location(freeze), load_location(freeze), load_location(freeze))
900
1083
  when 120 then
901
- PreExecutionNode.new(source, node_id, location, load_varuint, load_optional_node, load_location, load_location, load_location)
1084
+ PreExecutionNode.new(source, node_id, location, load_varuint, load_optional_node(constant_pool, encoding, freeze), load_location(freeze), load_location(freeze), load_location(freeze))
902
1085
  when 121 then
903
- ProgramNode.new(source, node_id, location, load_varuint, Array.new(load_varuint) { load_required_constant }, load_node)
1086
+ ProgramNode.new(source, node_id, location, load_varuint, Array.new(load_varuint) { load_constant(constant_pool, encoding) }.tap { |constants| constants.freeze if freeze }, load_node(constant_pool, encoding, freeze))
904
1087
  when 122 then
905
- RangeNode.new(source, node_id, location, load_varuint, load_optional_node, load_optional_node, load_location)
1088
+ RangeNode.new(source, node_id, location, load_varuint, load_optional_node(constant_pool, encoding, freeze), load_optional_node(constant_pool, encoding, freeze), load_location(freeze))
906
1089
  when 123 then
907
1090
  RationalNode.new(source, node_id, location, load_varuint, load_integer, load_integer)
908
1091
  when 124 then
909
1092
  RedoNode.new(source, node_id, location, load_varuint)
910
1093
  when 125 then
911
- RegularExpressionNode.new(source, node_id, location, load_varuint, load_location, load_location, load_location, load_string)
1094
+ RegularExpressionNode.new(source, node_id, location, load_varuint, load_location(freeze), load_location(freeze), load_location(freeze), load_string(encoding))
912
1095
  when 126 then
913
- RequiredKeywordParameterNode.new(source, node_id, location, load_varuint, load_required_constant, load_location)
1096
+ RequiredKeywordParameterNode.new(source, node_id, location, load_varuint, load_constant(constant_pool, encoding), load_location(freeze))
914
1097
  when 127 then
915
- RequiredParameterNode.new(source, node_id, location, load_varuint, load_required_constant)
1098
+ RequiredParameterNode.new(source, node_id, location, load_varuint, load_constant(constant_pool, encoding))
916
1099
  when 128 then
917
- RescueModifierNode.new(source, node_id, location, load_varuint, load_node, load_location, load_node)
1100
+ RescueModifierNode.new(source, node_id, location, load_varuint, load_node(constant_pool, encoding, freeze), load_location(freeze), load_node(constant_pool, encoding, freeze))
918
1101
  when 129 then
919
- RescueNode.new(source, node_id, location, load_varuint, load_location, Array.new(load_varuint) { load_node }, load_optional_location, load_optional_node, load_optional_node, load_optional_node)
1102
+ RescueNode.new(source, node_id, location, load_varuint, load_location(freeze), Array.new(load_varuint) { load_node(constant_pool, encoding, freeze) }.tap { |nodes| nodes.freeze if freeze }, load_optional_location(freeze), load_optional_node(constant_pool, encoding, freeze), load_optional_location(freeze), load_optional_node(constant_pool, encoding, freeze), load_optional_node(constant_pool, encoding, freeze))
920
1103
  when 130 then
921
- RestParameterNode.new(source, node_id, location, load_varuint, load_optional_constant, load_optional_location, load_location)
1104
+ RestParameterNode.new(source, node_id, location, load_varuint, load_optional_constant(constant_pool, encoding), load_optional_location(freeze), load_location(freeze))
922
1105
  when 131 then
923
1106
  RetryNode.new(source, node_id, location, load_varuint)
924
1107
  when 132 then
925
- ReturnNode.new(source, node_id, location, load_varuint, load_location, load_optional_node)
1108
+ ReturnNode.new(source, node_id, location, load_varuint, load_location(freeze), load_optional_node(constant_pool, encoding, freeze))
926
1109
  when 133 then
927
1110
  SelfNode.new(source, node_id, location, load_varuint)
928
1111
  when 134 then
929
- ShareableConstantNode.new(source, node_id, location, load_varuint, load_node)
1112
+ ShareableConstantNode.new(source, node_id, location, load_varuint, load_node(constant_pool, encoding, freeze))
930
1113
  when 135 then
931
- SingletonClassNode.new(source, node_id, location, load_varuint, Array.new(load_varuint) { load_required_constant }, load_location, load_location, load_node, load_optional_node, load_location)
1114
+ SingletonClassNode.new(source, node_id, location, load_varuint, Array.new(load_varuint) { load_constant(constant_pool, encoding) }.tap { |constants| constants.freeze if freeze }, load_location(freeze), load_location(freeze), load_node(constant_pool, encoding, freeze), load_optional_node(constant_pool, encoding, freeze), load_location(freeze))
932
1115
  when 136 then
933
1116
  SourceEncodingNode.new(source, node_id, location, load_varuint)
934
1117
  when 137 then
935
- SourceFileNode.new(source, node_id, location, load_varuint, load_string)
1118
+ SourceFileNode.new(source, node_id, location, load_varuint, load_string(encoding))
936
1119
  when 138 then
937
1120
  SourceLineNode.new(source, node_id, location, load_varuint)
938
1121
  when 139 then
939
- SplatNode.new(source, node_id, location, load_varuint, load_location, load_optional_node)
1122
+ SplatNode.new(source, node_id, location, load_varuint, load_location(freeze), load_optional_node(constant_pool, encoding, freeze))
940
1123
  when 140 then
941
- StatementsNode.new(source, node_id, location, load_varuint, Array.new(load_varuint) { load_node })
1124
+ StatementsNode.new(source, node_id, location, load_varuint, Array.new(load_varuint) { load_node(constant_pool, encoding, freeze) }.tap { |nodes| nodes.freeze if freeze })
942
1125
  when 141 then
943
- StringNode.new(source, node_id, location, load_varuint, load_optional_location, load_location, load_optional_location, load_string)
1126
+ StringNode.new(source, node_id, location, load_varuint, load_optional_location(freeze), load_location(freeze), load_optional_location(freeze), load_string(encoding))
944
1127
  when 142 then
945
- SuperNode.new(source, node_id, location, load_varuint, load_location, load_optional_location, load_optional_node, load_optional_location, load_optional_node)
1128
+ SuperNode.new(source, node_id, location, load_varuint, load_location(freeze), load_optional_location(freeze), load_optional_node(constant_pool, encoding, freeze), load_optional_location(freeze), load_optional_node(constant_pool, encoding, freeze))
946
1129
  when 143 then
947
- SymbolNode.new(source, node_id, location, load_varuint, load_optional_location, load_optional_location, load_optional_location, load_string)
1130
+ SymbolNode.new(source, node_id, location, load_varuint, load_optional_location(freeze), load_optional_location(freeze), load_optional_location(freeze), load_string(encoding))
948
1131
  when 144 then
949
1132
  TrueNode.new(source, node_id, location, load_varuint)
950
1133
  when 145 then
951
- UndefNode.new(source, node_id, location, load_varuint, Array.new(load_varuint) { load_node }, load_location)
1134
+ UndefNode.new(source, node_id, location, load_varuint, Array.new(load_varuint) { load_node(constant_pool, encoding, freeze) }.tap { |nodes| nodes.freeze if freeze }, load_location(freeze))
952
1135
  when 146 then
953
- UnlessNode.new(source, node_id, location, load_varuint, load_location, load_node, load_optional_location, load_optional_node, load_optional_node, load_optional_location)
1136
+ UnlessNode.new(source, node_id, location, load_varuint, load_location(freeze), load_node(constant_pool, encoding, freeze), load_optional_location(freeze), load_optional_node(constant_pool, encoding, freeze), load_optional_node(constant_pool, encoding, freeze), load_optional_location(freeze))
954
1137
  when 147 then
955
- UntilNode.new(source, node_id, location, load_varuint, load_location, load_optional_location, load_optional_location, load_node, load_optional_node)
1138
+ UntilNode.new(source, node_id, location, load_varuint, load_location(freeze), load_optional_location(freeze), load_optional_location(freeze), load_node(constant_pool, encoding, freeze), load_optional_node(constant_pool, encoding, freeze))
956
1139
  when 148 then
957
- WhenNode.new(source, node_id, location, load_varuint, load_location, Array.new(load_varuint) { load_node }, load_optional_location, load_optional_node)
1140
+ WhenNode.new(source, node_id, location, load_varuint, load_location(freeze), Array.new(load_varuint) { load_node(constant_pool, encoding, freeze) }.tap { |nodes| nodes.freeze if freeze }, load_optional_location(freeze), load_optional_node(constant_pool, encoding, freeze))
958
1141
  when 149 then
959
- WhileNode.new(source, node_id, location, load_varuint, load_location, load_optional_location, load_optional_location, load_node, load_optional_node)
1142
+ WhileNode.new(source, node_id, location, load_varuint, load_location(freeze), load_optional_location(freeze), load_optional_location(freeze), load_node(constant_pool, encoding, freeze), load_optional_node(constant_pool, encoding, freeze))
960
1143
  when 150 then
961
- XStringNode.new(source, node_id, location, load_varuint, load_location, load_location, load_location, load_string)
1144
+ XStringNode.new(source, node_id, location, load_varuint, load_location(freeze), load_location(freeze), load_location(freeze), load_string(encoding))
962
1145
  when 151 then
963
- YieldNode.new(source, node_id, location, load_varuint, load_location, load_optional_location, load_optional_node, load_optional_location)
1146
+ YieldNode.new(source, node_id, location, load_varuint, load_location(freeze), load_optional_location(freeze), load_optional_node(constant_pool, encoding, freeze), load_optional_location(freeze))
964
1147
  end
1148
+
1149
+ value.freeze if freeze
1150
+ value
965
1151
  end
966
1152
  else
967
- def load_node
968
- type = io.getbyte
969
- @load_node_lambdas[type].call
1153
+ def load_node(constant_pool, encoding, freeze)
1154
+ @load_node_lambdas[io.getbyte].call(constant_pool, encoding, freeze)
970
1155
  end
971
1156
 
972
1157
  def define_load_node_lambdas
973
1158
  @load_node_lambdas = [
974
1159
  nil,
975
- -> {
1160
+ -> (constant_pool, encoding, freeze) {
976
1161
  node_id = load_varuint
977
- location = load_location
978
- AliasGlobalVariableNode.new(source, node_id, location, load_varuint, load_node, load_node, load_location)
1162
+ location = load_location(freeze)
1163
+ value = AliasGlobalVariableNode.new(source, node_id, location, load_varuint, load_node(constant_pool, encoding, freeze), load_node(constant_pool, encoding, freeze), load_location(freeze))
1164
+ value.freeze if freeze
1165
+ value
979
1166
  },
980
- -> {
1167
+ -> (constant_pool, encoding, freeze) {
981
1168
  node_id = load_varuint
982
- location = load_location
983
- AliasMethodNode.new(source, node_id, location, load_varuint, load_node, load_node, load_location)
1169
+ location = load_location(freeze)
1170
+ value = AliasMethodNode.new(source, node_id, location, load_varuint, load_node(constant_pool, encoding, freeze), load_node(constant_pool, encoding, freeze), load_location(freeze))
1171
+ value.freeze if freeze
1172
+ value
984
1173
  },
985
- -> {
1174
+ -> (constant_pool, encoding, freeze) {
986
1175
  node_id = load_varuint
987
- location = load_location
988
- AlternationPatternNode.new(source, node_id, location, load_varuint, load_node, load_node, load_location)
1176
+ location = load_location(freeze)
1177
+ value = AlternationPatternNode.new(source, node_id, location, load_varuint, load_node(constant_pool, encoding, freeze), load_node(constant_pool, encoding, freeze), load_location(freeze))
1178
+ value.freeze if freeze
1179
+ value
989
1180
  },
990
- -> {
1181
+ -> (constant_pool, encoding, freeze) {
991
1182
  node_id = load_varuint
992
- location = load_location
993
- AndNode.new(source, node_id, location, load_varuint, load_node, load_node, load_location)
1183
+ location = load_location(freeze)
1184
+ value = AndNode.new(source, node_id, location, load_varuint, load_node(constant_pool, encoding, freeze), load_node(constant_pool, encoding, freeze), load_location(freeze))
1185
+ value.freeze if freeze
1186
+ value
994
1187
  },
995
- -> {
1188
+ -> (constant_pool, encoding, freeze) {
996
1189
  node_id = load_varuint
997
- location = load_location
998
- ArgumentsNode.new(source, node_id, location, load_varuint, Array.new(load_varuint) { load_node })
1190
+ location = load_location(freeze)
1191
+ value = ArgumentsNode.new(source, node_id, location, load_varuint, Array.new(load_varuint) { load_node(constant_pool, encoding, freeze) })
1192
+ value.freeze if freeze
1193
+ value
999
1194
  },
1000
- -> {
1195
+ -> (constant_pool, encoding, freeze) {
1001
1196
  node_id = load_varuint
1002
- location = load_location
1003
- ArrayNode.new(source, node_id, location, load_varuint, Array.new(load_varuint) { load_node }, load_optional_location, load_optional_location)
1197
+ location = load_location(freeze)
1198
+ value = ArrayNode.new(source, node_id, location, load_varuint, Array.new(load_varuint) { load_node(constant_pool, encoding, freeze) }, load_optional_location(freeze), load_optional_location(freeze))
1199
+ value.freeze if freeze
1200
+ value
1004
1201
  },
1005
- -> {
1202
+ -> (constant_pool, encoding, freeze) {
1006
1203
  node_id = load_varuint
1007
- location = load_location
1008
- ArrayPatternNode.new(source, node_id, location, load_varuint, load_optional_node, Array.new(load_varuint) { load_node }, load_optional_node, Array.new(load_varuint) { load_node }, load_optional_location, load_optional_location)
1204
+ location = load_location(freeze)
1205
+ value = ArrayPatternNode.new(source, node_id, location, load_varuint, load_optional_node(constant_pool, encoding, freeze), Array.new(load_varuint) { load_node(constant_pool, encoding, freeze) }, load_optional_node(constant_pool, encoding, freeze), Array.new(load_varuint) { load_node(constant_pool, encoding, freeze) }, load_optional_location(freeze), load_optional_location(freeze))
1206
+ value.freeze if freeze
1207
+ value
1009
1208
  },
1010
- -> {
1209
+ -> (constant_pool, encoding, freeze) {
1011
1210
  node_id = load_varuint
1012
- location = load_location
1013
- AssocNode.new(source, node_id, location, load_varuint, load_node, load_node, load_optional_location)
1211
+ location = load_location(freeze)
1212
+ value = AssocNode.new(source, node_id, location, load_varuint, load_node(constant_pool, encoding, freeze), load_node(constant_pool, encoding, freeze), load_optional_location(freeze))
1213
+ value.freeze if freeze
1214
+ value
1014
1215
  },
1015
- -> {
1216
+ -> (constant_pool, encoding, freeze) {
1016
1217
  node_id = load_varuint
1017
- location = load_location
1018
- AssocSplatNode.new(source, node_id, location, load_varuint, load_optional_node, load_location)
1218
+ location = load_location(freeze)
1219
+ value = AssocSplatNode.new(source, node_id, location, load_varuint, load_optional_node(constant_pool, encoding, freeze), load_location(freeze))
1220
+ value.freeze if freeze
1221
+ value
1019
1222
  },
1020
- -> {
1223
+ -> (constant_pool, encoding, freeze) {
1021
1224
  node_id = load_varuint
1022
- location = load_location
1023
- BackReferenceReadNode.new(source, node_id, location, load_varuint, load_required_constant)
1225
+ location = load_location(freeze)
1226
+ value = BackReferenceReadNode.new(source, node_id, location, load_varuint, load_constant(constant_pool, encoding))
1227
+ value.freeze if freeze
1228
+ value
1024
1229
  },
1025
- -> {
1230
+ -> (constant_pool, encoding, freeze) {
1026
1231
  node_id = load_varuint
1027
- location = load_location
1028
- BeginNode.new(source, node_id, location, load_varuint, load_optional_location, load_optional_node, load_optional_node, load_optional_node, load_optional_node, load_optional_location)
1232
+ location = load_location(freeze)
1233
+ value = BeginNode.new(source, node_id, location, load_varuint, load_optional_location(freeze), load_optional_node(constant_pool, encoding, freeze), load_optional_node(constant_pool, encoding, freeze), load_optional_node(constant_pool, encoding, freeze), load_optional_node(constant_pool, encoding, freeze), load_optional_location(freeze))
1234
+ value.freeze if freeze
1235
+ value
1029
1236
  },
1030
- -> {
1237
+ -> (constant_pool, encoding, freeze) {
1031
1238
  node_id = load_varuint
1032
- location = load_location
1033
- BlockArgumentNode.new(source, node_id, location, load_varuint, load_optional_node, load_location)
1239
+ location = load_location(freeze)
1240
+ value = BlockArgumentNode.new(source, node_id, location, load_varuint, load_optional_node(constant_pool, encoding, freeze), load_location(freeze))
1241
+ value.freeze if freeze
1242
+ value
1034
1243
  },
1035
- -> {
1244
+ -> (constant_pool, encoding, freeze) {
1036
1245
  node_id = load_varuint
1037
- location = load_location
1038
- BlockLocalVariableNode.new(source, node_id, location, load_varuint, load_required_constant)
1246
+ location = load_location(freeze)
1247
+ value = BlockLocalVariableNode.new(source, node_id, location, load_varuint, load_constant(constant_pool, encoding))
1248
+ value.freeze if freeze
1249
+ value
1039
1250
  },
1040
- -> {
1251
+ -> (constant_pool, encoding, freeze) {
1041
1252
  node_id = load_varuint
1042
- location = load_location
1043
- BlockNode.new(source, node_id, location, load_varuint, Array.new(load_varuint) { load_required_constant }, load_optional_node, load_optional_node, load_location, load_location)
1253
+ location = load_location(freeze)
1254
+ value = BlockNode.new(source, node_id, location, load_varuint, Array.new(load_varuint) { load_constant(constant_pool, encoding) }, load_optional_node(constant_pool, encoding, freeze), load_optional_node(constant_pool, encoding, freeze), load_location(freeze), load_location(freeze))
1255
+ value.freeze if freeze
1256
+ value
1044
1257
  },
1045
- -> {
1258
+ -> (constant_pool, encoding, freeze) {
1046
1259
  node_id = load_varuint
1047
- location = load_location
1048
- BlockParameterNode.new(source, node_id, location, load_varuint, load_optional_constant, load_optional_location, load_location)
1260
+ location = load_location(freeze)
1261
+ value = BlockParameterNode.new(source, node_id, location, load_varuint, load_optional_constant(constant_pool, encoding), load_optional_location(freeze), load_location(freeze))
1262
+ value.freeze if freeze
1263
+ value
1049
1264
  },
1050
- -> {
1265
+ -> (constant_pool, encoding, freeze) {
1051
1266
  node_id = load_varuint
1052
- location = load_location
1053
- BlockParametersNode.new(source, node_id, location, load_varuint, load_optional_node, Array.new(load_varuint) { load_node }, load_optional_location, load_optional_location)
1267
+ location = load_location(freeze)
1268
+ value = BlockParametersNode.new(source, node_id, location, load_varuint, load_optional_node(constant_pool, encoding, freeze), Array.new(load_varuint) { load_node(constant_pool, encoding, freeze) }, load_optional_location(freeze), load_optional_location(freeze))
1269
+ value.freeze if freeze
1270
+ value
1054
1271
  },
1055
- -> {
1272
+ -> (constant_pool, encoding, freeze) {
1056
1273
  node_id = load_varuint
1057
- location = load_location
1058
- BreakNode.new(source, node_id, location, load_varuint, load_optional_node, load_location)
1274
+ location = load_location(freeze)
1275
+ value = BreakNode.new(source, node_id, location, load_varuint, load_optional_node(constant_pool, encoding, freeze), load_location(freeze))
1276
+ value.freeze if freeze
1277
+ value
1059
1278
  },
1060
- -> {
1279
+ -> (constant_pool, encoding, freeze) {
1061
1280
  node_id = load_varuint
1062
- location = load_location
1063
- CallAndWriteNode.new(source, node_id, location, load_varuint, load_optional_node, load_optional_location, load_optional_location, load_required_constant, load_required_constant, load_location, load_node)
1281
+ location = load_location(freeze)
1282
+ value = CallAndWriteNode.new(source, node_id, location, load_varuint, load_optional_node(constant_pool, encoding, freeze), load_optional_location(freeze), load_optional_location(freeze), load_constant(constant_pool, encoding), load_constant(constant_pool, encoding), load_location(freeze), load_node(constant_pool, encoding, freeze))
1283
+ value.freeze if freeze
1284
+ value
1064
1285
  },
1065
- -> {
1286
+ -> (constant_pool, encoding, freeze) {
1066
1287
  node_id = load_varuint
1067
- location = load_location
1068
- CallNode.new(source, node_id, location, load_varuint, load_optional_node, load_optional_location, load_required_constant, load_optional_location, load_optional_location, load_optional_node, load_optional_location, load_optional_node)
1288
+ location = load_location(freeze)
1289
+ value = CallNode.new(source, node_id, location, load_varuint, load_optional_node(constant_pool, encoding, freeze), load_optional_location(freeze), load_constant(constant_pool, encoding), load_optional_location(freeze), load_optional_location(freeze), load_optional_node(constant_pool, encoding, freeze), load_optional_location(freeze), load_optional_node(constant_pool, encoding, freeze))
1290
+ value.freeze if freeze
1291
+ value
1069
1292
  },
1070
- -> {
1293
+ -> (constant_pool, encoding, freeze) {
1071
1294
  node_id = load_varuint
1072
- location = load_location
1073
- CallOperatorWriteNode.new(source, node_id, location, load_varuint, load_optional_node, load_optional_location, load_optional_location, load_required_constant, load_required_constant, load_required_constant, load_location, load_node)
1295
+ location = load_location(freeze)
1296
+ value = CallOperatorWriteNode.new(source, node_id, location, load_varuint, load_optional_node(constant_pool, encoding, freeze), load_optional_location(freeze), load_optional_location(freeze), load_constant(constant_pool, encoding), load_constant(constant_pool, encoding), load_constant(constant_pool, encoding), load_location(freeze), load_node(constant_pool, encoding, freeze))
1297
+ value.freeze if freeze
1298
+ value
1074
1299
  },
1075
- -> {
1300
+ -> (constant_pool, encoding, freeze) {
1076
1301
  node_id = load_varuint
1077
- location = load_location
1078
- CallOrWriteNode.new(source, node_id, location, load_varuint, load_optional_node, load_optional_location, load_optional_location, load_required_constant, load_required_constant, load_location, load_node)
1302
+ location = load_location(freeze)
1303
+ value = CallOrWriteNode.new(source, node_id, location, load_varuint, load_optional_node(constant_pool, encoding, freeze), load_optional_location(freeze), load_optional_location(freeze), load_constant(constant_pool, encoding), load_constant(constant_pool, encoding), load_location(freeze), load_node(constant_pool, encoding, freeze))
1304
+ value.freeze if freeze
1305
+ value
1079
1306
  },
1080
- -> {
1307
+ -> (constant_pool, encoding, freeze) {
1081
1308
  node_id = load_varuint
1082
- location = load_location
1083
- CallTargetNode.new(source, node_id, location, load_varuint, load_node, load_location, load_required_constant, load_location)
1309
+ location = load_location(freeze)
1310
+ value = CallTargetNode.new(source, node_id, location, load_varuint, load_node(constant_pool, encoding, freeze), load_location(freeze), load_constant(constant_pool, encoding), load_location(freeze))
1311
+ value.freeze if freeze
1312
+ value
1084
1313
  },
1085
- -> {
1314
+ -> (constant_pool, encoding, freeze) {
1086
1315
  node_id = load_varuint
1087
- location = load_location
1088
- CapturePatternNode.new(source, node_id, location, load_varuint, load_node, load_node, load_location)
1316
+ location = load_location(freeze)
1317
+ value = CapturePatternNode.new(source, node_id, location, load_varuint, load_node(constant_pool, encoding, freeze), load_node(constant_pool, encoding, freeze), load_location(freeze))
1318
+ value.freeze if freeze
1319
+ value
1089
1320
  },
1090
- -> {
1321
+ -> (constant_pool, encoding, freeze) {
1091
1322
  node_id = load_varuint
1092
- location = load_location
1093
- CaseMatchNode.new(source, node_id, location, load_varuint, load_optional_node, Array.new(load_varuint) { load_node }, load_optional_node, load_location, load_location)
1323
+ location = load_location(freeze)
1324
+ value = CaseMatchNode.new(source, node_id, location, load_varuint, load_optional_node(constant_pool, encoding, freeze), Array.new(load_varuint) { load_node(constant_pool, encoding, freeze) }, load_optional_node(constant_pool, encoding, freeze), load_location(freeze), load_location(freeze))
1325
+ value.freeze if freeze
1326
+ value
1094
1327
  },
1095
- -> {
1328
+ -> (constant_pool, encoding, freeze) {
1096
1329
  node_id = load_varuint
1097
- location = load_location
1098
- CaseNode.new(source, node_id, location, load_varuint, load_optional_node, Array.new(load_varuint) { load_node }, load_optional_node, load_location, load_location)
1330
+ location = load_location(freeze)
1331
+ value = CaseNode.new(source, node_id, location, load_varuint, load_optional_node(constant_pool, encoding, freeze), Array.new(load_varuint) { load_node(constant_pool, encoding, freeze) }, load_optional_node(constant_pool, encoding, freeze), load_location(freeze), load_location(freeze))
1332
+ value.freeze if freeze
1333
+ value
1099
1334
  },
1100
- -> {
1335
+ -> (constant_pool, encoding, freeze) {
1101
1336
  node_id = load_varuint
1102
- location = load_location
1103
- ClassNode.new(source, node_id, location, load_varuint, Array.new(load_varuint) { load_required_constant }, load_location, load_node, load_optional_location, load_optional_node, load_optional_node, load_location, load_required_constant)
1337
+ location = load_location(freeze)
1338
+ value = ClassNode.new(source, node_id, location, load_varuint, Array.new(load_varuint) { load_constant(constant_pool, encoding) }, load_location(freeze), load_node(constant_pool, encoding, freeze), load_optional_location(freeze), load_optional_node(constant_pool, encoding, freeze), load_optional_node(constant_pool, encoding, freeze), load_location(freeze), load_constant(constant_pool, encoding))
1339
+ value.freeze if freeze
1340
+ value
1104
1341
  },
1105
- -> {
1342
+ -> (constant_pool, encoding, freeze) {
1106
1343
  node_id = load_varuint
1107
- location = load_location
1108
- ClassVariableAndWriteNode.new(source, node_id, location, load_varuint, load_required_constant, load_location, load_location, load_node)
1344
+ location = load_location(freeze)
1345
+ value = ClassVariableAndWriteNode.new(source, node_id, location, load_varuint, load_constant(constant_pool, encoding), load_location(freeze), load_location(freeze), load_node(constant_pool, encoding, freeze))
1346
+ value.freeze if freeze
1347
+ value
1109
1348
  },
1110
- -> {
1349
+ -> (constant_pool, encoding, freeze) {
1111
1350
  node_id = load_varuint
1112
- location = load_location
1113
- ClassVariableOperatorWriteNode.new(source, node_id, location, load_varuint, load_required_constant, load_location, load_location, load_node, load_required_constant)
1351
+ location = load_location(freeze)
1352
+ value = ClassVariableOperatorWriteNode.new(source, node_id, location, load_varuint, load_constant(constant_pool, encoding), load_location(freeze), load_location(freeze), load_node(constant_pool, encoding, freeze), load_constant(constant_pool, encoding))
1353
+ value.freeze if freeze
1354
+ value
1114
1355
  },
1115
- -> {
1356
+ -> (constant_pool, encoding, freeze) {
1116
1357
  node_id = load_varuint
1117
- location = load_location
1118
- ClassVariableOrWriteNode.new(source, node_id, location, load_varuint, load_required_constant, load_location, load_location, load_node)
1358
+ location = load_location(freeze)
1359
+ value = ClassVariableOrWriteNode.new(source, node_id, location, load_varuint, load_constant(constant_pool, encoding), load_location(freeze), load_location(freeze), load_node(constant_pool, encoding, freeze))
1360
+ value.freeze if freeze
1361
+ value
1119
1362
  },
1120
- -> {
1363
+ -> (constant_pool, encoding, freeze) {
1121
1364
  node_id = load_varuint
1122
- location = load_location
1123
- ClassVariableReadNode.new(source, node_id, location, load_varuint, load_required_constant)
1365
+ location = load_location(freeze)
1366
+ value = ClassVariableReadNode.new(source, node_id, location, load_varuint, load_constant(constant_pool, encoding))
1367
+ value.freeze if freeze
1368
+ value
1124
1369
  },
1125
- -> {
1370
+ -> (constant_pool, encoding, freeze) {
1126
1371
  node_id = load_varuint
1127
- location = load_location
1128
- ClassVariableTargetNode.new(source, node_id, location, load_varuint, load_required_constant)
1372
+ location = load_location(freeze)
1373
+ value = ClassVariableTargetNode.new(source, node_id, location, load_varuint, load_constant(constant_pool, encoding))
1374
+ value.freeze if freeze
1375
+ value
1129
1376
  },
1130
- -> {
1377
+ -> (constant_pool, encoding, freeze) {
1131
1378
  node_id = load_varuint
1132
- location = load_location
1133
- ClassVariableWriteNode.new(source, node_id, location, load_varuint, load_required_constant, load_location, load_node, load_location)
1379
+ location = load_location(freeze)
1380
+ value = ClassVariableWriteNode.new(source, node_id, location, load_varuint, load_constant(constant_pool, encoding), load_location(freeze), load_node(constant_pool, encoding, freeze), load_location(freeze))
1381
+ value.freeze if freeze
1382
+ value
1134
1383
  },
1135
- -> {
1384
+ -> (constant_pool, encoding, freeze) {
1136
1385
  node_id = load_varuint
1137
- location = load_location
1138
- ConstantAndWriteNode.new(source, node_id, location, load_varuint, load_required_constant, load_location, load_location, load_node)
1386
+ location = load_location(freeze)
1387
+ value = ConstantAndWriteNode.new(source, node_id, location, load_varuint, load_constant(constant_pool, encoding), load_location(freeze), load_location(freeze), load_node(constant_pool, encoding, freeze))
1388
+ value.freeze if freeze
1389
+ value
1139
1390
  },
1140
- -> {
1391
+ -> (constant_pool, encoding, freeze) {
1141
1392
  node_id = load_varuint
1142
- location = load_location
1143
- ConstantOperatorWriteNode.new(source, node_id, location, load_varuint, load_required_constant, load_location, load_location, load_node, load_required_constant)
1393
+ location = load_location(freeze)
1394
+ value = ConstantOperatorWriteNode.new(source, node_id, location, load_varuint, load_constant(constant_pool, encoding), load_location(freeze), load_location(freeze), load_node(constant_pool, encoding, freeze), load_constant(constant_pool, encoding))
1395
+ value.freeze if freeze
1396
+ value
1144
1397
  },
1145
- -> {
1398
+ -> (constant_pool, encoding, freeze) {
1146
1399
  node_id = load_varuint
1147
- location = load_location
1148
- ConstantOrWriteNode.new(source, node_id, location, load_varuint, load_required_constant, load_location, load_location, load_node)
1400
+ location = load_location(freeze)
1401
+ value = ConstantOrWriteNode.new(source, node_id, location, load_varuint, load_constant(constant_pool, encoding), load_location(freeze), load_location(freeze), load_node(constant_pool, encoding, freeze))
1402
+ value.freeze if freeze
1403
+ value
1149
1404
  },
1150
- -> {
1405
+ -> (constant_pool, encoding, freeze) {
1151
1406
  node_id = load_varuint
1152
- location = load_location
1153
- ConstantPathAndWriteNode.new(source, node_id, location, load_varuint, load_node, load_location, load_node)
1407
+ location = load_location(freeze)
1408
+ value = ConstantPathAndWriteNode.new(source, node_id, location, load_varuint, load_node(constant_pool, encoding, freeze), load_location(freeze), load_node(constant_pool, encoding, freeze))
1409
+ value.freeze if freeze
1410
+ value
1154
1411
  },
1155
- -> {
1412
+ -> (constant_pool, encoding, freeze) {
1156
1413
  node_id = load_varuint
1157
- location = load_location
1158
- ConstantPathNode.new(source, node_id, location, load_varuint, load_optional_node, load_optional_constant, load_location, load_location)
1414
+ location = load_location(freeze)
1415
+ value = ConstantPathNode.new(source, node_id, location, load_varuint, load_optional_node(constant_pool, encoding, freeze), load_optional_constant(constant_pool, encoding), load_location(freeze), load_location(freeze))
1416
+ value.freeze if freeze
1417
+ value
1159
1418
  },
1160
- -> {
1419
+ -> (constant_pool, encoding, freeze) {
1161
1420
  node_id = load_varuint
1162
- location = load_location
1163
- ConstantPathOperatorWriteNode.new(source, node_id, location, load_varuint, load_node, load_location, load_node, load_required_constant)
1421
+ location = load_location(freeze)
1422
+ value = ConstantPathOperatorWriteNode.new(source, node_id, location, load_varuint, load_node(constant_pool, encoding, freeze), load_location(freeze), load_node(constant_pool, encoding, freeze), load_constant(constant_pool, encoding))
1423
+ value.freeze if freeze
1424
+ value
1164
1425
  },
1165
- -> {
1426
+ -> (constant_pool, encoding, freeze) {
1166
1427
  node_id = load_varuint
1167
- location = load_location
1168
- ConstantPathOrWriteNode.new(source, node_id, location, load_varuint, load_node, load_location, load_node)
1428
+ location = load_location(freeze)
1429
+ value = ConstantPathOrWriteNode.new(source, node_id, location, load_varuint, load_node(constant_pool, encoding, freeze), load_location(freeze), load_node(constant_pool, encoding, freeze))
1430
+ value.freeze if freeze
1431
+ value
1169
1432
  },
1170
- -> {
1433
+ -> (constant_pool, encoding, freeze) {
1171
1434
  node_id = load_varuint
1172
- location = load_location
1173
- ConstantPathTargetNode.new(source, node_id, location, load_varuint, load_optional_node, load_optional_constant, load_location, load_location)
1435
+ location = load_location(freeze)
1436
+ value = ConstantPathTargetNode.new(source, node_id, location, load_varuint, load_optional_node(constant_pool, encoding, freeze), load_optional_constant(constant_pool, encoding), load_location(freeze), load_location(freeze))
1437
+ value.freeze if freeze
1438
+ value
1174
1439
  },
1175
- -> {
1440
+ -> (constant_pool, encoding, freeze) {
1176
1441
  node_id = load_varuint
1177
- location = load_location
1178
- ConstantPathWriteNode.new(source, node_id, location, load_varuint, load_node, load_location, load_node)
1442
+ location = load_location(freeze)
1443
+ value = ConstantPathWriteNode.new(source, node_id, location, load_varuint, load_node(constant_pool, encoding, freeze), load_location(freeze), load_node(constant_pool, encoding, freeze))
1444
+ value.freeze if freeze
1445
+ value
1179
1446
  },
1180
- -> {
1447
+ -> (constant_pool, encoding, freeze) {
1181
1448
  node_id = load_varuint
1182
- location = load_location
1183
- ConstantReadNode.new(source, node_id, location, load_varuint, load_required_constant)
1449
+ location = load_location(freeze)
1450
+ value = ConstantReadNode.new(source, node_id, location, load_varuint, load_constant(constant_pool, encoding))
1451
+ value.freeze if freeze
1452
+ value
1184
1453
  },
1185
- -> {
1454
+ -> (constant_pool, encoding, freeze) {
1186
1455
  node_id = load_varuint
1187
- location = load_location
1188
- ConstantTargetNode.new(source, node_id, location, load_varuint, load_required_constant)
1456
+ location = load_location(freeze)
1457
+ value = ConstantTargetNode.new(source, node_id, location, load_varuint, load_constant(constant_pool, encoding))
1458
+ value.freeze if freeze
1459
+ value
1189
1460
  },
1190
- -> {
1461
+ -> (constant_pool, encoding, freeze) {
1191
1462
  node_id = load_varuint
1192
- location = load_location
1193
- ConstantWriteNode.new(source, node_id, location, load_varuint, load_required_constant, load_location, load_node, load_location)
1463
+ location = load_location(freeze)
1464
+ value = ConstantWriteNode.new(source, node_id, location, load_varuint, load_constant(constant_pool, encoding), load_location(freeze), load_node(constant_pool, encoding, freeze), load_location(freeze))
1465
+ value.freeze if freeze
1466
+ value
1194
1467
  },
1195
- -> {
1468
+ -> (constant_pool, encoding, freeze) {
1196
1469
  node_id = load_varuint
1197
- location = load_location
1470
+ location = load_location(freeze)
1198
1471
  load_uint32
1199
- DefNode.new(source, node_id, location, load_varuint, load_required_constant, load_location, load_optional_node, load_optional_node, load_optional_node, Array.new(load_varuint) { load_required_constant }, load_location, load_optional_location, load_optional_location, load_optional_location, load_optional_location, load_optional_location)
1472
+ value = DefNode.new(source, node_id, location, load_varuint, load_constant(constant_pool, encoding), load_location(freeze), load_optional_node(constant_pool, encoding, freeze), load_optional_node(constant_pool, encoding, freeze), load_optional_node(constant_pool, encoding, freeze), Array.new(load_varuint) { load_constant(constant_pool, encoding) }, load_location(freeze), load_optional_location(freeze), load_optional_location(freeze), load_optional_location(freeze), load_optional_location(freeze), load_optional_location(freeze))
1473
+ value.freeze if freeze
1474
+ value
1200
1475
  },
1201
- -> {
1476
+ -> (constant_pool, encoding, freeze) {
1202
1477
  node_id = load_varuint
1203
- location = load_location
1204
- DefinedNode.new(source, node_id, location, load_varuint, load_optional_location, load_node, load_optional_location, load_location)
1478
+ location = load_location(freeze)
1479
+ value = DefinedNode.new(source, node_id, location, load_varuint, load_optional_location(freeze), load_node(constant_pool, encoding, freeze), load_optional_location(freeze), load_location(freeze))
1480
+ value.freeze if freeze
1481
+ value
1205
1482
  },
1206
- -> {
1483
+ -> (constant_pool, encoding, freeze) {
1207
1484
  node_id = load_varuint
1208
- location = load_location
1209
- ElseNode.new(source, node_id, location, load_varuint, load_location, load_optional_node, load_optional_location)
1485
+ location = load_location(freeze)
1486
+ value = ElseNode.new(source, node_id, location, load_varuint, load_location(freeze), load_optional_node(constant_pool, encoding, freeze), load_optional_location(freeze))
1487
+ value.freeze if freeze
1488
+ value
1210
1489
  },
1211
- -> {
1490
+ -> (constant_pool, encoding, freeze) {
1212
1491
  node_id = load_varuint
1213
- location = load_location
1214
- EmbeddedStatementsNode.new(source, node_id, location, load_varuint, load_location, load_optional_node, load_location)
1492
+ location = load_location(freeze)
1493
+ value = EmbeddedStatementsNode.new(source, node_id, location, load_varuint, load_location(freeze), load_optional_node(constant_pool, encoding, freeze), load_location(freeze))
1494
+ value.freeze if freeze
1495
+ value
1215
1496
  },
1216
- -> {
1497
+ -> (constant_pool, encoding, freeze) {
1217
1498
  node_id = load_varuint
1218
- location = load_location
1219
- EmbeddedVariableNode.new(source, node_id, location, load_varuint, load_location, load_node)
1499
+ location = load_location(freeze)
1500
+ value = EmbeddedVariableNode.new(source, node_id, location, load_varuint, load_location(freeze), load_node(constant_pool, encoding, freeze))
1501
+ value.freeze if freeze
1502
+ value
1220
1503
  },
1221
- -> {
1504
+ -> (constant_pool, encoding, freeze) {
1222
1505
  node_id = load_varuint
1223
- location = load_location
1224
- EnsureNode.new(source, node_id, location, load_varuint, load_location, load_optional_node, load_location)
1506
+ location = load_location(freeze)
1507
+ value = EnsureNode.new(source, node_id, location, load_varuint, load_location(freeze), load_optional_node(constant_pool, encoding, freeze), load_location(freeze))
1508
+ value.freeze if freeze
1509
+ value
1225
1510
  },
1226
- -> {
1511
+ -> (constant_pool, encoding, freeze) {
1227
1512
  node_id = load_varuint
1228
- location = load_location
1229
- FalseNode.new(source, node_id, location, load_varuint)
1513
+ location = load_location(freeze)
1514
+ value = FalseNode.new(source, node_id, location, load_varuint)
1515
+ value.freeze if freeze
1516
+ value
1230
1517
  },
1231
- -> {
1518
+ -> (constant_pool, encoding, freeze) {
1232
1519
  node_id = load_varuint
1233
- location = load_location
1234
- FindPatternNode.new(source, node_id, location, load_varuint, load_optional_node, load_node, Array.new(load_varuint) { load_node }, load_node, load_optional_location, load_optional_location)
1520
+ location = load_location(freeze)
1521
+ value = FindPatternNode.new(source, node_id, location, load_varuint, load_optional_node(constant_pool, encoding, freeze), load_node(constant_pool, encoding, freeze), Array.new(load_varuint) { load_node(constant_pool, encoding, freeze) }, load_node(constant_pool, encoding, freeze), load_optional_location(freeze), load_optional_location(freeze))
1522
+ value.freeze if freeze
1523
+ value
1235
1524
  },
1236
- -> {
1525
+ -> (constant_pool, encoding, freeze) {
1237
1526
  node_id = load_varuint
1238
- location = load_location
1239
- FlipFlopNode.new(source, node_id, location, load_varuint, load_optional_node, load_optional_node, load_location)
1527
+ location = load_location(freeze)
1528
+ value = FlipFlopNode.new(source, node_id, location, load_varuint, load_optional_node(constant_pool, encoding, freeze), load_optional_node(constant_pool, encoding, freeze), load_location(freeze))
1529
+ value.freeze if freeze
1530
+ value
1240
1531
  },
1241
- -> {
1532
+ -> (constant_pool, encoding, freeze) {
1242
1533
  node_id = load_varuint
1243
- location = load_location
1244
- FloatNode.new(source, node_id, location, load_varuint, load_double)
1534
+ location = load_location(freeze)
1535
+ value = FloatNode.new(source, node_id, location, load_varuint, load_double)
1536
+ value.freeze if freeze
1537
+ value
1245
1538
  },
1246
- -> {
1539
+ -> (constant_pool, encoding, freeze) {
1247
1540
  node_id = load_varuint
1248
- location = load_location
1249
- ForNode.new(source, node_id, location, load_varuint, load_node, load_node, load_optional_node, load_location, load_location, load_optional_location, load_location)
1541
+ location = load_location(freeze)
1542
+ value = ForNode.new(source, node_id, location, load_varuint, load_node(constant_pool, encoding, freeze), load_node(constant_pool, encoding, freeze), load_optional_node(constant_pool, encoding, freeze), load_location(freeze), load_location(freeze), load_optional_location(freeze), load_location(freeze))
1543
+ value.freeze if freeze
1544
+ value
1250
1545
  },
1251
- -> {
1546
+ -> (constant_pool, encoding, freeze) {
1252
1547
  node_id = load_varuint
1253
- location = load_location
1254
- ForwardingArgumentsNode.new(source, node_id, location, load_varuint)
1548
+ location = load_location(freeze)
1549
+ value = ForwardingArgumentsNode.new(source, node_id, location, load_varuint)
1550
+ value.freeze if freeze
1551
+ value
1255
1552
  },
1256
- -> {
1553
+ -> (constant_pool, encoding, freeze) {
1257
1554
  node_id = load_varuint
1258
- location = load_location
1259
- ForwardingParameterNode.new(source, node_id, location, load_varuint)
1555
+ location = load_location(freeze)
1556
+ value = ForwardingParameterNode.new(source, node_id, location, load_varuint)
1557
+ value.freeze if freeze
1558
+ value
1260
1559
  },
1261
- -> {
1560
+ -> (constant_pool, encoding, freeze) {
1262
1561
  node_id = load_varuint
1263
- location = load_location
1264
- ForwardingSuperNode.new(source, node_id, location, load_varuint, load_optional_node)
1562
+ location = load_location(freeze)
1563
+ value = ForwardingSuperNode.new(source, node_id, location, load_varuint, load_optional_node(constant_pool, encoding, freeze))
1564
+ value.freeze if freeze
1565
+ value
1265
1566
  },
1266
- -> {
1567
+ -> (constant_pool, encoding, freeze) {
1267
1568
  node_id = load_varuint
1268
- location = load_location
1269
- GlobalVariableAndWriteNode.new(source, node_id, location, load_varuint, load_required_constant, load_location, load_location, load_node)
1569
+ location = load_location(freeze)
1570
+ value = GlobalVariableAndWriteNode.new(source, node_id, location, load_varuint, load_constant(constant_pool, encoding), load_location(freeze), load_location(freeze), load_node(constant_pool, encoding, freeze))
1571
+ value.freeze if freeze
1572
+ value
1270
1573
  },
1271
- -> {
1574
+ -> (constant_pool, encoding, freeze) {
1272
1575
  node_id = load_varuint
1273
- location = load_location
1274
- GlobalVariableOperatorWriteNode.new(source, node_id, location, load_varuint, load_required_constant, load_location, load_location, load_node, load_required_constant)
1576
+ location = load_location(freeze)
1577
+ value = GlobalVariableOperatorWriteNode.new(source, node_id, location, load_varuint, load_constant(constant_pool, encoding), load_location(freeze), load_location(freeze), load_node(constant_pool, encoding, freeze), load_constant(constant_pool, encoding))
1578
+ value.freeze if freeze
1579
+ value
1275
1580
  },
1276
- -> {
1581
+ -> (constant_pool, encoding, freeze) {
1277
1582
  node_id = load_varuint
1278
- location = load_location
1279
- GlobalVariableOrWriteNode.new(source, node_id, location, load_varuint, load_required_constant, load_location, load_location, load_node)
1583
+ location = load_location(freeze)
1584
+ value = GlobalVariableOrWriteNode.new(source, node_id, location, load_varuint, load_constant(constant_pool, encoding), load_location(freeze), load_location(freeze), load_node(constant_pool, encoding, freeze))
1585
+ value.freeze if freeze
1586
+ value
1280
1587
  },
1281
- -> {
1588
+ -> (constant_pool, encoding, freeze) {
1282
1589
  node_id = load_varuint
1283
- location = load_location
1284
- GlobalVariableReadNode.new(source, node_id, location, load_varuint, load_required_constant)
1590
+ location = load_location(freeze)
1591
+ value = GlobalVariableReadNode.new(source, node_id, location, load_varuint, load_constant(constant_pool, encoding))
1592
+ value.freeze if freeze
1593
+ value
1285
1594
  },
1286
- -> {
1595
+ -> (constant_pool, encoding, freeze) {
1287
1596
  node_id = load_varuint
1288
- location = load_location
1289
- GlobalVariableTargetNode.new(source, node_id, location, load_varuint, load_required_constant)
1597
+ location = load_location(freeze)
1598
+ value = GlobalVariableTargetNode.new(source, node_id, location, load_varuint, load_constant(constant_pool, encoding))
1599
+ value.freeze if freeze
1600
+ value
1290
1601
  },
1291
- -> {
1602
+ -> (constant_pool, encoding, freeze) {
1292
1603
  node_id = load_varuint
1293
- location = load_location
1294
- GlobalVariableWriteNode.new(source, node_id, location, load_varuint, load_required_constant, load_location, load_node, load_location)
1604
+ location = load_location(freeze)
1605
+ value = GlobalVariableWriteNode.new(source, node_id, location, load_varuint, load_constant(constant_pool, encoding), load_location(freeze), load_node(constant_pool, encoding, freeze), load_location(freeze))
1606
+ value.freeze if freeze
1607
+ value
1295
1608
  },
1296
- -> {
1609
+ -> (constant_pool, encoding, freeze) {
1297
1610
  node_id = load_varuint
1298
- location = load_location
1299
- HashNode.new(source, node_id, location, load_varuint, load_location, Array.new(load_varuint) { load_node }, load_location)
1611
+ location = load_location(freeze)
1612
+ value = HashNode.new(source, node_id, location, load_varuint, load_location(freeze), Array.new(load_varuint) { load_node(constant_pool, encoding, freeze) }, load_location(freeze))
1613
+ value.freeze if freeze
1614
+ value
1300
1615
  },
1301
- -> {
1616
+ -> (constant_pool, encoding, freeze) {
1302
1617
  node_id = load_varuint
1303
- location = load_location
1304
- HashPatternNode.new(source, node_id, location, load_varuint, load_optional_node, Array.new(load_varuint) { load_node }, load_optional_node, load_optional_location, load_optional_location)
1618
+ location = load_location(freeze)
1619
+ value = HashPatternNode.new(source, node_id, location, load_varuint, load_optional_node(constant_pool, encoding, freeze), Array.new(load_varuint) { load_node(constant_pool, encoding, freeze) }, load_optional_node(constant_pool, encoding, freeze), load_optional_location(freeze), load_optional_location(freeze))
1620
+ value.freeze if freeze
1621
+ value
1305
1622
  },
1306
- -> {
1623
+ -> (constant_pool, encoding, freeze) {
1307
1624
  node_id = load_varuint
1308
- location = load_location
1309
- IfNode.new(source, node_id, location, load_varuint, load_optional_location, load_node, load_optional_location, load_optional_node, load_optional_node, load_optional_location)
1625
+ location = load_location(freeze)
1626
+ value = IfNode.new(source, node_id, location, load_varuint, load_optional_location(freeze), load_node(constant_pool, encoding, freeze), load_optional_location(freeze), load_optional_node(constant_pool, encoding, freeze), load_optional_node(constant_pool, encoding, freeze), load_optional_location(freeze))
1627
+ value.freeze if freeze
1628
+ value
1310
1629
  },
1311
- -> {
1630
+ -> (constant_pool, encoding, freeze) {
1312
1631
  node_id = load_varuint
1313
- location = load_location
1314
- ImaginaryNode.new(source, node_id, location, load_varuint, load_node)
1632
+ location = load_location(freeze)
1633
+ value = ImaginaryNode.new(source, node_id, location, load_varuint, load_node(constant_pool, encoding, freeze))
1634
+ value.freeze if freeze
1635
+ value
1315
1636
  },
1316
- -> {
1637
+ -> (constant_pool, encoding, freeze) {
1317
1638
  node_id = load_varuint
1318
- location = load_location
1319
- ImplicitNode.new(source, node_id, location, load_varuint, load_node)
1639
+ location = load_location(freeze)
1640
+ value = ImplicitNode.new(source, node_id, location, load_varuint, load_node(constant_pool, encoding, freeze))
1641
+ value.freeze if freeze
1642
+ value
1320
1643
  },
1321
- -> {
1644
+ -> (constant_pool, encoding, freeze) {
1322
1645
  node_id = load_varuint
1323
- location = load_location
1324
- ImplicitRestNode.new(source, node_id, location, load_varuint)
1646
+ location = load_location(freeze)
1647
+ value = ImplicitRestNode.new(source, node_id, location, load_varuint)
1648
+ value.freeze if freeze
1649
+ value
1325
1650
  },
1326
- -> {
1651
+ -> (constant_pool, encoding, freeze) {
1327
1652
  node_id = load_varuint
1328
- location = load_location
1329
- InNode.new(source, node_id, location, load_varuint, load_node, load_optional_node, load_location, load_optional_location)
1653
+ location = load_location(freeze)
1654
+ value = InNode.new(source, node_id, location, load_varuint, load_node(constant_pool, encoding, freeze), load_optional_node(constant_pool, encoding, freeze), load_location(freeze), load_optional_location(freeze))
1655
+ value.freeze if freeze
1656
+ value
1330
1657
  },
1331
- -> {
1658
+ -> (constant_pool, encoding, freeze) {
1332
1659
  node_id = load_varuint
1333
- location = load_location
1334
- IndexAndWriteNode.new(source, node_id, location, load_varuint, load_optional_node, load_optional_location, load_location, load_optional_node, load_location, load_optional_node, load_location, load_node)
1660
+ location = load_location(freeze)
1661
+ value = IndexAndWriteNode.new(source, node_id, location, load_varuint, load_optional_node(constant_pool, encoding, freeze), load_optional_location(freeze), load_location(freeze), load_optional_node(constant_pool, encoding, freeze), load_location(freeze), load_optional_node(constant_pool, encoding, freeze), load_location(freeze), load_node(constant_pool, encoding, freeze))
1662
+ value.freeze if freeze
1663
+ value
1335
1664
  },
1336
- -> {
1665
+ -> (constant_pool, encoding, freeze) {
1337
1666
  node_id = load_varuint
1338
- location = load_location
1339
- IndexOperatorWriteNode.new(source, node_id, location, load_varuint, load_optional_node, load_optional_location, load_location, load_optional_node, load_location, load_optional_node, load_required_constant, load_location, load_node)
1667
+ location = load_location(freeze)
1668
+ value = IndexOperatorWriteNode.new(source, node_id, location, load_varuint, load_optional_node(constant_pool, encoding, freeze), load_optional_location(freeze), load_location(freeze), load_optional_node(constant_pool, encoding, freeze), load_location(freeze), load_optional_node(constant_pool, encoding, freeze), load_constant(constant_pool, encoding), load_location(freeze), load_node(constant_pool, encoding, freeze))
1669
+ value.freeze if freeze
1670
+ value
1340
1671
  },
1341
- -> {
1672
+ -> (constant_pool, encoding, freeze) {
1342
1673
  node_id = load_varuint
1343
- location = load_location
1344
- IndexOrWriteNode.new(source, node_id, location, load_varuint, load_optional_node, load_optional_location, load_location, load_optional_node, load_location, load_optional_node, load_location, load_node)
1674
+ location = load_location(freeze)
1675
+ value = IndexOrWriteNode.new(source, node_id, location, load_varuint, load_optional_node(constant_pool, encoding, freeze), load_optional_location(freeze), load_location(freeze), load_optional_node(constant_pool, encoding, freeze), load_location(freeze), load_optional_node(constant_pool, encoding, freeze), load_location(freeze), load_node(constant_pool, encoding, freeze))
1676
+ value.freeze if freeze
1677
+ value
1345
1678
  },
1346
- -> {
1679
+ -> (constant_pool, encoding, freeze) {
1347
1680
  node_id = load_varuint
1348
- location = load_location
1349
- IndexTargetNode.new(source, node_id, location, load_varuint, load_node, load_location, load_optional_node, load_location, load_optional_node)
1681
+ location = load_location(freeze)
1682
+ value = IndexTargetNode.new(source, node_id, location, load_varuint, load_node(constant_pool, encoding, freeze), load_location(freeze), load_optional_node(constant_pool, encoding, freeze), load_location(freeze), load_optional_node(constant_pool, encoding, freeze))
1683
+ value.freeze if freeze
1684
+ value
1350
1685
  },
1351
- -> {
1686
+ -> (constant_pool, encoding, freeze) {
1352
1687
  node_id = load_varuint
1353
- location = load_location
1354
- InstanceVariableAndWriteNode.new(source, node_id, location, load_varuint, load_required_constant, load_location, load_location, load_node)
1688
+ location = load_location(freeze)
1689
+ value = InstanceVariableAndWriteNode.new(source, node_id, location, load_varuint, load_constant(constant_pool, encoding), load_location(freeze), load_location(freeze), load_node(constant_pool, encoding, freeze))
1690
+ value.freeze if freeze
1691
+ value
1355
1692
  },
1356
- -> {
1693
+ -> (constant_pool, encoding, freeze) {
1357
1694
  node_id = load_varuint
1358
- location = load_location
1359
- InstanceVariableOperatorWriteNode.new(source, node_id, location, load_varuint, load_required_constant, load_location, load_location, load_node, load_required_constant)
1695
+ location = load_location(freeze)
1696
+ value = InstanceVariableOperatorWriteNode.new(source, node_id, location, load_varuint, load_constant(constant_pool, encoding), load_location(freeze), load_location(freeze), load_node(constant_pool, encoding, freeze), load_constant(constant_pool, encoding))
1697
+ value.freeze if freeze
1698
+ value
1360
1699
  },
1361
- -> {
1700
+ -> (constant_pool, encoding, freeze) {
1362
1701
  node_id = load_varuint
1363
- location = load_location
1364
- InstanceVariableOrWriteNode.new(source, node_id, location, load_varuint, load_required_constant, load_location, load_location, load_node)
1702
+ location = load_location(freeze)
1703
+ value = InstanceVariableOrWriteNode.new(source, node_id, location, load_varuint, load_constant(constant_pool, encoding), load_location(freeze), load_location(freeze), load_node(constant_pool, encoding, freeze))
1704
+ value.freeze if freeze
1705
+ value
1365
1706
  },
1366
- -> {
1707
+ -> (constant_pool, encoding, freeze) {
1367
1708
  node_id = load_varuint
1368
- location = load_location
1369
- InstanceVariableReadNode.new(source, node_id, location, load_varuint, load_required_constant)
1709
+ location = load_location(freeze)
1710
+ value = InstanceVariableReadNode.new(source, node_id, location, load_varuint, load_constant(constant_pool, encoding))
1711
+ value.freeze if freeze
1712
+ value
1370
1713
  },
1371
- -> {
1714
+ -> (constant_pool, encoding, freeze) {
1372
1715
  node_id = load_varuint
1373
- location = load_location
1374
- InstanceVariableTargetNode.new(source, node_id, location, load_varuint, load_required_constant)
1716
+ location = load_location(freeze)
1717
+ value = InstanceVariableTargetNode.new(source, node_id, location, load_varuint, load_constant(constant_pool, encoding))
1718
+ value.freeze if freeze
1719
+ value
1375
1720
  },
1376
- -> {
1721
+ -> (constant_pool, encoding, freeze) {
1377
1722
  node_id = load_varuint
1378
- location = load_location
1379
- InstanceVariableWriteNode.new(source, node_id, location, load_varuint, load_required_constant, load_location, load_node, load_location)
1723
+ location = load_location(freeze)
1724
+ value = InstanceVariableWriteNode.new(source, node_id, location, load_varuint, load_constant(constant_pool, encoding), load_location(freeze), load_node(constant_pool, encoding, freeze), load_location(freeze))
1725
+ value.freeze if freeze
1726
+ value
1380
1727
  },
1381
- -> {
1728
+ -> (constant_pool, encoding, freeze) {
1382
1729
  node_id = load_varuint
1383
- location = load_location
1384
- IntegerNode.new(source, node_id, location, load_varuint, load_integer)
1730
+ location = load_location(freeze)
1731
+ value = IntegerNode.new(source, node_id, location, load_varuint, load_integer)
1732
+ value.freeze if freeze
1733
+ value
1385
1734
  },
1386
- -> {
1735
+ -> (constant_pool, encoding, freeze) {
1387
1736
  node_id = load_varuint
1388
- location = load_location
1389
- InterpolatedMatchLastLineNode.new(source, node_id, location, load_varuint, load_location, Array.new(load_varuint) { load_node }, load_location)
1737
+ location = load_location(freeze)
1738
+ value = InterpolatedMatchLastLineNode.new(source, node_id, location, load_varuint, load_location(freeze), Array.new(load_varuint) { load_node(constant_pool, encoding, freeze) }, load_location(freeze))
1739
+ value.freeze if freeze
1740
+ value
1390
1741
  },
1391
- -> {
1742
+ -> (constant_pool, encoding, freeze) {
1392
1743
  node_id = load_varuint
1393
- location = load_location
1394
- InterpolatedRegularExpressionNode.new(source, node_id, location, load_varuint, load_location, Array.new(load_varuint) { load_node }, load_location)
1744
+ location = load_location(freeze)
1745
+ value = InterpolatedRegularExpressionNode.new(source, node_id, location, load_varuint, load_location(freeze), Array.new(load_varuint) { load_node(constant_pool, encoding, freeze) }, load_location(freeze))
1746
+ value.freeze if freeze
1747
+ value
1395
1748
  },
1396
- -> {
1749
+ -> (constant_pool, encoding, freeze) {
1397
1750
  node_id = load_varuint
1398
- location = load_location
1399
- InterpolatedStringNode.new(source, node_id, location, load_varuint, load_optional_location, Array.new(load_varuint) { load_node }, load_optional_location)
1751
+ location = load_location(freeze)
1752
+ value = InterpolatedStringNode.new(source, node_id, location, load_varuint, load_optional_location(freeze), Array.new(load_varuint) { load_node(constant_pool, encoding, freeze) }, load_optional_location(freeze))
1753
+ value.freeze if freeze
1754
+ value
1400
1755
  },
1401
- -> {
1756
+ -> (constant_pool, encoding, freeze) {
1402
1757
  node_id = load_varuint
1403
- location = load_location
1404
- InterpolatedSymbolNode.new(source, node_id, location, load_varuint, load_optional_location, Array.new(load_varuint) { load_node }, load_optional_location)
1758
+ location = load_location(freeze)
1759
+ value = InterpolatedSymbolNode.new(source, node_id, location, load_varuint, load_optional_location(freeze), Array.new(load_varuint) { load_node(constant_pool, encoding, freeze) }, load_optional_location(freeze))
1760
+ value.freeze if freeze
1761
+ value
1405
1762
  },
1406
- -> {
1763
+ -> (constant_pool, encoding, freeze) {
1407
1764
  node_id = load_varuint
1408
- location = load_location
1409
- InterpolatedXStringNode.new(source, node_id, location, load_varuint, load_location, Array.new(load_varuint) { load_node }, load_location)
1765
+ location = load_location(freeze)
1766
+ value = InterpolatedXStringNode.new(source, node_id, location, load_varuint, load_location(freeze), Array.new(load_varuint) { load_node(constant_pool, encoding, freeze) }, load_location(freeze))
1767
+ value.freeze if freeze
1768
+ value
1410
1769
  },
1411
- -> {
1770
+ -> (constant_pool, encoding, freeze) {
1412
1771
  node_id = load_varuint
1413
- location = load_location
1414
- ItLocalVariableReadNode.new(source, node_id, location, load_varuint)
1772
+ location = load_location(freeze)
1773
+ value = ItLocalVariableReadNode.new(source, node_id, location, load_varuint)
1774
+ value.freeze if freeze
1775
+ value
1415
1776
  },
1416
- -> {
1777
+ -> (constant_pool, encoding, freeze) {
1417
1778
  node_id = load_varuint
1418
- location = load_location
1419
- ItParametersNode.new(source, node_id, location, load_varuint)
1779
+ location = load_location(freeze)
1780
+ value = ItParametersNode.new(source, node_id, location, load_varuint)
1781
+ value.freeze if freeze
1782
+ value
1420
1783
  },
1421
- -> {
1784
+ -> (constant_pool, encoding, freeze) {
1422
1785
  node_id = load_varuint
1423
- location = load_location
1424
- KeywordHashNode.new(source, node_id, location, load_varuint, Array.new(load_varuint) { load_node })
1786
+ location = load_location(freeze)
1787
+ value = KeywordHashNode.new(source, node_id, location, load_varuint, Array.new(load_varuint) { load_node(constant_pool, encoding, freeze) })
1788
+ value.freeze if freeze
1789
+ value
1425
1790
  },
1426
- -> {
1791
+ -> (constant_pool, encoding, freeze) {
1427
1792
  node_id = load_varuint
1428
- location = load_location
1429
- KeywordRestParameterNode.new(source, node_id, location, load_varuint, load_optional_constant, load_optional_location, load_location)
1793
+ location = load_location(freeze)
1794
+ value = KeywordRestParameterNode.new(source, node_id, location, load_varuint, load_optional_constant(constant_pool, encoding), load_optional_location(freeze), load_location(freeze))
1795
+ value.freeze if freeze
1796
+ value
1430
1797
  },
1431
- -> {
1798
+ -> (constant_pool, encoding, freeze) {
1432
1799
  node_id = load_varuint
1433
- location = load_location
1434
- LambdaNode.new(source, node_id, location, load_varuint, Array.new(load_varuint) { load_required_constant }, load_location, load_location, load_location, load_optional_node, load_optional_node)
1800
+ location = load_location(freeze)
1801
+ value = LambdaNode.new(source, node_id, location, load_varuint, Array.new(load_varuint) { load_constant(constant_pool, encoding) }, load_location(freeze), load_location(freeze), load_location(freeze), load_optional_node(constant_pool, encoding, freeze), load_optional_node(constant_pool, encoding, freeze))
1802
+ value.freeze if freeze
1803
+ value
1435
1804
  },
1436
- -> {
1805
+ -> (constant_pool, encoding, freeze) {
1437
1806
  node_id = load_varuint
1438
- location = load_location
1439
- LocalVariableAndWriteNode.new(source, node_id, location, load_varuint, load_location, load_location, load_node, load_required_constant, load_varuint)
1807
+ location = load_location(freeze)
1808
+ value = LocalVariableAndWriteNode.new(source, node_id, location, load_varuint, load_location(freeze), load_location(freeze), load_node(constant_pool, encoding, freeze), load_constant(constant_pool, encoding), load_varuint)
1809
+ value.freeze if freeze
1810
+ value
1440
1811
  },
1441
- -> {
1812
+ -> (constant_pool, encoding, freeze) {
1442
1813
  node_id = load_varuint
1443
- location = load_location
1444
- LocalVariableOperatorWriteNode.new(source, node_id, location, load_varuint, load_location, load_location, load_node, load_required_constant, load_required_constant, load_varuint)
1814
+ location = load_location(freeze)
1815
+ value = LocalVariableOperatorWriteNode.new(source, node_id, location, load_varuint, load_location(freeze), load_location(freeze), load_node(constant_pool, encoding, freeze), load_constant(constant_pool, encoding), load_constant(constant_pool, encoding), load_varuint)
1816
+ value.freeze if freeze
1817
+ value
1445
1818
  },
1446
- -> {
1819
+ -> (constant_pool, encoding, freeze) {
1447
1820
  node_id = load_varuint
1448
- location = load_location
1449
- LocalVariableOrWriteNode.new(source, node_id, location, load_varuint, load_location, load_location, load_node, load_required_constant, load_varuint)
1821
+ location = load_location(freeze)
1822
+ value = LocalVariableOrWriteNode.new(source, node_id, location, load_varuint, load_location(freeze), load_location(freeze), load_node(constant_pool, encoding, freeze), load_constant(constant_pool, encoding), load_varuint)
1823
+ value.freeze if freeze
1824
+ value
1450
1825
  },
1451
- -> {
1826
+ -> (constant_pool, encoding, freeze) {
1452
1827
  node_id = load_varuint
1453
- location = load_location
1454
- LocalVariableReadNode.new(source, node_id, location, load_varuint, load_required_constant, load_varuint)
1828
+ location = load_location(freeze)
1829
+ value = LocalVariableReadNode.new(source, node_id, location, load_varuint, load_constant(constant_pool, encoding), load_varuint)
1830
+ value.freeze if freeze
1831
+ value
1455
1832
  },
1456
- -> {
1833
+ -> (constant_pool, encoding, freeze) {
1457
1834
  node_id = load_varuint
1458
- location = load_location
1459
- LocalVariableTargetNode.new(source, node_id, location, load_varuint, load_required_constant, load_varuint)
1835
+ location = load_location(freeze)
1836
+ value = LocalVariableTargetNode.new(source, node_id, location, load_varuint, load_constant(constant_pool, encoding), load_varuint)
1837
+ value.freeze if freeze
1838
+ value
1460
1839
  },
1461
- -> {
1840
+ -> (constant_pool, encoding, freeze) {
1462
1841
  node_id = load_varuint
1463
- location = load_location
1464
- LocalVariableWriteNode.new(source, node_id, location, load_varuint, load_required_constant, load_varuint, load_location, load_node, load_location)
1842
+ location = load_location(freeze)
1843
+ value = LocalVariableWriteNode.new(source, node_id, location, load_varuint, load_constant(constant_pool, encoding), load_varuint, load_location(freeze), load_node(constant_pool, encoding, freeze), load_location(freeze))
1844
+ value.freeze if freeze
1845
+ value
1465
1846
  },
1466
- -> {
1847
+ -> (constant_pool, encoding, freeze) {
1467
1848
  node_id = load_varuint
1468
- location = load_location
1469
- MatchLastLineNode.new(source, node_id, location, load_varuint, load_location, load_location, load_location, load_string)
1849
+ location = load_location(freeze)
1850
+ value = MatchLastLineNode.new(source, node_id, location, load_varuint, load_location(freeze), load_location(freeze), load_location(freeze), load_string(encoding))
1851
+ value.freeze if freeze
1852
+ value
1470
1853
  },
1471
- -> {
1854
+ -> (constant_pool, encoding, freeze) {
1472
1855
  node_id = load_varuint
1473
- location = load_location
1474
- MatchPredicateNode.new(source, node_id, location, load_varuint, load_node, load_node, load_location)
1856
+ location = load_location(freeze)
1857
+ value = MatchPredicateNode.new(source, node_id, location, load_varuint, load_node(constant_pool, encoding, freeze), load_node(constant_pool, encoding, freeze), load_location(freeze))
1858
+ value.freeze if freeze
1859
+ value
1475
1860
  },
1476
- -> {
1861
+ -> (constant_pool, encoding, freeze) {
1477
1862
  node_id = load_varuint
1478
- location = load_location
1479
- MatchRequiredNode.new(source, node_id, location, load_varuint, load_node, load_node, load_location)
1863
+ location = load_location(freeze)
1864
+ value = MatchRequiredNode.new(source, node_id, location, load_varuint, load_node(constant_pool, encoding, freeze), load_node(constant_pool, encoding, freeze), load_location(freeze))
1865
+ value.freeze if freeze
1866
+ value
1480
1867
  },
1481
- -> {
1868
+ -> (constant_pool, encoding, freeze) {
1482
1869
  node_id = load_varuint
1483
- location = load_location
1484
- MatchWriteNode.new(source, node_id, location, load_varuint, load_node, Array.new(load_varuint) { load_node })
1870
+ location = load_location(freeze)
1871
+ value = MatchWriteNode.new(source, node_id, location, load_varuint, load_node(constant_pool, encoding, freeze), Array.new(load_varuint) { load_node(constant_pool, encoding, freeze) })
1872
+ value.freeze if freeze
1873
+ value
1485
1874
  },
1486
- -> {
1875
+ -> (constant_pool, encoding, freeze) {
1487
1876
  node_id = load_varuint
1488
- location = load_location
1489
- MissingNode.new(source, node_id, location, load_varuint)
1877
+ location = load_location(freeze)
1878
+ value = MissingNode.new(source, node_id, location, load_varuint)
1879
+ value.freeze if freeze
1880
+ value
1490
1881
  },
1491
- -> {
1882
+ -> (constant_pool, encoding, freeze) {
1492
1883
  node_id = load_varuint
1493
- location = load_location
1494
- ModuleNode.new(source, node_id, location, load_varuint, Array.new(load_varuint) { load_required_constant }, load_location, load_node, load_optional_node, load_location, load_required_constant)
1884
+ location = load_location(freeze)
1885
+ value = ModuleNode.new(source, node_id, location, load_varuint, Array.new(load_varuint) { load_constant(constant_pool, encoding) }, load_location(freeze), load_node(constant_pool, encoding, freeze), load_optional_node(constant_pool, encoding, freeze), load_location(freeze), load_constant(constant_pool, encoding))
1886
+ value.freeze if freeze
1887
+ value
1495
1888
  },
1496
- -> {
1889
+ -> (constant_pool, encoding, freeze) {
1497
1890
  node_id = load_varuint
1498
- location = load_location
1499
- MultiTargetNode.new(source, node_id, location, load_varuint, Array.new(load_varuint) { load_node }, load_optional_node, Array.new(load_varuint) { load_node }, load_optional_location, load_optional_location)
1891
+ location = load_location(freeze)
1892
+ value = MultiTargetNode.new(source, node_id, location, load_varuint, Array.new(load_varuint) { load_node(constant_pool, encoding, freeze) }, load_optional_node(constant_pool, encoding, freeze), Array.new(load_varuint) { load_node(constant_pool, encoding, freeze) }, load_optional_location(freeze), load_optional_location(freeze))
1893
+ value.freeze if freeze
1894
+ value
1500
1895
  },
1501
- -> {
1896
+ -> (constant_pool, encoding, freeze) {
1502
1897
  node_id = load_varuint
1503
- location = load_location
1504
- MultiWriteNode.new(source, node_id, location, load_varuint, Array.new(load_varuint) { load_node }, load_optional_node, Array.new(load_varuint) { load_node }, load_optional_location, load_optional_location, load_location, load_node)
1898
+ location = load_location(freeze)
1899
+ value = MultiWriteNode.new(source, node_id, location, load_varuint, Array.new(load_varuint) { load_node(constant_pool, encoding, freeze) }, load_optional_node(constant_pool, encoding, freeze), Array.new(load_varuint) { load_node(constant_pool, encoding, freeze) }, load_optional_location(freeze), load_optional_location(freeze), load_location(freeze), load_node(constant_pool, encoding, freeze))
1900
+ value.freeze if freeze
1901
+ value
1505
1902
  },
1506
- -> {
1903
+ -> (constant_pool, encoding, freeze) {
1507
1904
  node_id = load_varuint
1508
- location = load_location
1509
- NextNode.new(source, node_id, location, load_varuint, load_optional_node, load_location)
1905
+ location = load_location(freeze)
1906
+ value = NextNode.new(source, node_id, location, load_varuint, load_optional_node(constant_pool, encoding, freeze), load_location(freeze))
1907
+ value.freeze if freeze
1908
+ value
1510
1909
  },
1511
- -> {
1910
+ -> (constant_pool, encoding, freeze) {
1512
1911
  node_id = load_varuint
1513
- location = load_location
1514
- NilNode.new(source, node_id, location, load_varuint)
1912
+ location = load_location(freeze)
1913
+ value = NilNode.new(source, node_id, location, load_varuint)
1914
+ value.freeze if freeze
1915
+ value
1515
1916
  },
1516
- -> {
1917
+ -> (constant_pool, encoding, freeze) {
1517
1918
  node_id = load_varuint
1518
- location = load_location
1519
- NoKeywordsParameterNode.new(source, node_id, location, load_varuint, load_location, load_location)
1919
+ location = load_location(freeze)
1920
+ value = NoKeywordsParameterNode.new(source, node_id, location, load_varuint, load_location(freeze), load_location(freeze))
1921
+ value.freeze if freeze
1922
+ value
1520
1923
  },
1521
- -> {
1924
+ -> (constant_pool, encoding, freeze) {
1522
1925
  node_id = load_varuint
1523
- location = load_location
1524
- NumberedParametersNode.new(source, node_id, location, load_varuint, io.getbyte)
1926
+ location = load_location(freeze)
1927
+ value = NumberedParametersNode.new(source, node_id, location, load_varuint, io.getbyte)
1928
+ value.freeze if freeze
1929
+ value
1525
1930
  },
1526
- -> {
1931
+ -> (constant_pool, encoding, freeze) {
1527
1932
  node_id = load_varuint
1528
- location = load_location
1529
- NumberedReferenceReadNode.new(source, node_id, location, load_varuint, load_varuint)
1933
+ location = load_location(freeze)
1934
+ value = NumberedReferenceReadNode.new(source, node_id, location, load_varuint, load_varuint)
1935
+ value.freeze if freeze
1936
+ value
1530
1937
  },
1531
- -> {
1938
+ -> (constant_pool, encoding, freeze) {
1532
1939
  node_id = load_varuint
1533
- location = load_location
1534
- OptionalKeywordParameterNode.new(source, node_id, location, load_varuint, load_required_constant, load_location, load_node)
1940
+ location = load_location(freeze)
1941
+ value = OptionalKeywordParameterNode.new(source, node_id, location, load_varuint, load_constant(constant_pool, encoding), load_location(freeze), load_node(constant_pool, encoding, freeze))
1942
+ value.freeze if freeze
1943
+ value
1535
1944
  },
1536
- -> {
1945
+ -> (constant_pool, encoding, freeze) {
1537
1946
  node_id = load_varuint
1538
- location = load_location
1539
- OptionalParameterNode.new(source, node_id, location, load_varuint, load_required_constant, load_location, load_location, load_node)
1947
+ location = load_location(freeze)
1948
+ value = OptionalParameterNode.new(source, node_id, location, load_varuint, load_constant(constant_pool, encoding), load_location(freeze), load_location(freeze), load_node(constant_pool, encoding, freeze))
1949
+ value.freeze if freeze
1950
+ value
1540
1951
  },
1541
- -> {
1952
+ -> (constant_pool, encoding, freeze) {
1542
1953
  node_id = load_varuint
1543
- location = load_location
1544
- OrNode.new(source, node_id, location, load_varuint, load_node, load_node, load_location)
1954
+ location = load_location(freeze)
1955
+ value = OrNode.new(source, node_id, location, load_varuint, load_node(constant_pool, encoding, freeze), load_node(constant_pool, encoding, freeze), load_location(freeze))
1956
+ value.freeze if freeze
1957
+ value
1545
1958
  },
1546
- -> {
1959
+ -> (constant_pool, encoding, freeze) {
1547
1960
  node_id = load_varuint
1548
- location = load_location
1549
- ParametersNode.new(source, node_id, location, load_varuint, Array.new(load_varuint) { load_node }, Array.new(load_varuint) { load_node }, load_optional_node, Array.new(load_varuint) { load_node }, Array.new(load_varuint) { load_node }, load_optional_node, load_optional_node)
1961
+ location = load_location(freeze)
1962
+ value = ParametersNode.new(source, node_id, location, load_varuint, Array.new(load_varuint) { load_node(constant_pool, encoding, freeze) }, Array.new(load_varuint) { load_node(constant_pool, encoding, freeze) }, load_optional_node(constant_pool, encoding, freeze), Array.new(load_varuint) { load_node(constant_pool, encoding, freeze) }, Array.new(load_varuint) { load_node(constant_pool, encoding, freeze) }, load_optional_node(constant_pool, encoding, freeze), load_optional_node(constant_pool, encoding, freeze))
1963
+ value.freeze if freeze
1964
+ value
1550
1965
  },
1551
- -> {
1966
+ -> (constant_pool, encoding, freeze) {
1552
1967
  node_id = load_varuint
1553
- location = load_location
1554
- ParenthesesNode.new(source, node_id, location, load_varuint, load_optional_node, load_location, load_location)
1968
+ location = load_location(freeze)
1969
+ value = ParenthesesNode.new(source, node_id, location, load_varuint, load_optional_node(constant_pool, encoding, freeze), load_location(freeze), load_location(freeze))
1970
+ value.freeze if freeze
1971
+ value
1555
1972
  },
1556
- -> {
1973
+ -> (constant_pool, encoding, freeze) {
1557
1974
  node_id = load_varuint
1558
- location = load_location
1559
- PinnedExpressionNode.new(source, node_id, location, load_varuint, load_node, load_location, load_location, load_location)
1975
+ location = load_location(freeze)
1976
+ value = PinnedExpressionNode.new(source, node_id, location, load_varuint, load_node(constant_pool, encoding, freeze), load_location(freeze), load_location(freeze), load_location(freeze))
1977
+ value.freeze if freeze
1978
+ value
1560
1979
  },
1561
- -> {
1980
+ -> (constant_pool, encoding, freeze) {
1562
1981
  node_id = load_varuint
1563
- location = load_location
1564
- PinnedVariableNode.new(source, node_id, location, load_varuint, load_node, load_location)
1982
+ location = load_location(freeze)
1983
+ value = PinnedVariableNode.new(source, node_id, location, load_varuint, load_node(constant_pool, encoding, freeze), load_location(freeze))
1984
+ value.freeze if freeze
1985
+ value
1565
1986
  },
1566
- -> {
1987
+ -> (constant_pool, encoding, freeze) {
1567
1988
  node_id = load_varuint
1568
- location = load_location
1569
- PostExecutionNode.new(source, node_id, location, load_varuint, load_optional_node, load_location, load_location, load_location)
1989
+ location = load_location(freeze)
1990
+ value = PostExecutionNode.new(source, node_id, location, load_varuint, load_optional_node(constant_pool, encoding, freeze), load_location(freeze), load_location(freeze), load_location(freeze))
1991
+ value.freeze if freeze
1992
+ value
1570
1993
  },
1571
- -> {
1994
+ -> (constant_pool, encoding, freeze) {
1572
1995
  node_id = load_varuint
1573
- location = load_location
1574
- PreExecutionNode.new(source, node_id, location, load_varuint, load_optional_node, load_location, load_location, load_location)
1996
+ location = load_location(freeze)
1997
+ value = PreExecutionNode.new(source, node_id, location, load_varuint, load_optional_node(constant_pool, encoding, freeze), load_location(freeze), load_location(freeze), load_location(freeze))
1998
+ value.freeze if freeze
1999
+ value
1575
2000
  },
1576
- -> {
2001
+ -> (constant_pool, encoding, freeze) {
1577
2002
  node_id = load_varuint
1578
- location = load_location
1579
- ProgramNode.new(source, node_id, location, load_varuint, Array.new(load_varuint) { load_required_constant }, load_node)
2003
+ location = load_location(freeze)
2004
+ value = ProgramNode.new(source, node_id, location, load_varuint, Array.new(load_varuint) { load_constant(constant_pool, encoding) }, load_node(constant_pool, encoding, freeze))
2005
+ value.freeze if freeze
2006
+ value
1580
2007
  },
1581
- -> {
2008
+ -> (constant_pool, encoding, freeze) {
1582
2009
  node_id = load_varuint
1583
- location = load_location
1584
- RangeNode.new(source, node_id, location, load_varuint, load_optional_node, load_optional_node, load_location)
2010
+ location = load_location(freeze)
2011
+ value = RangeNode.new(source, node_id, location, load_varuint, load_optional_node(constant_pool, encoding, freeze), load_optional_node(constant_pool, encoding, freeze), load_location(freeze))
2012
+ value.freeze if freeze
2013
+ value
1585
2014
  },
1586
- -> {
2015
+ -> (constant_pool, encoding, freeze) {
1587
2016
  node_id = load_varuint
1588
- location = load_location
1589
- RationalNode.new(source, node_id, location, load_varuint, load_integer, load_integer)
2017
+ location = load_location(freeze)
2018
+ value = RationalNode.new(source, node_id, location, load_varuint, load_integer, load_integer)
2019
+ value.freeze if freeze
2020
+ value
1590
2021
  },
1591
- -> {
2022
+ -> (constant_pool, encoding, freeze) {
1592
2023
  node_id = load_varuint
1593
- location = load_location
1594
- RedoNode.new(source, node_id, location, load_varuint)
2024
+ location = load_location(freeze)
2025
+ value = RedoNode.new(source, node_id, location, load_varuint)
2026
+ value.freeze if freeze
2027
+ value
1595
2028
  },
1596
- -> {
2029
+ -> (constant_pool, encoding, freeze) {
1597
2030
  node_id = load_varuint
1598
- location = load_location
1599
- RegularExpressionNode.new(source, node_id, location, load_varuint, load_location, load_location, load_location, load_string)
2031
+ location = load_location(freeze)
2032
+ value = RegularExpressionNode.new(source, node_id, location, load_varuint, load_location(freeze), load_location(freeze), load_location(freeze), load_string(encoding))
2033
+ value.freeze if freeze
2034
+ value
1600
2035
  },
1601
- -> {
2036
+ -> (constant_pool, encoding, freeze) {
1602
2037
  node_id = load_varuint
1603
- location = load_location
1604
- RequiredKeywordParameterNode.new(source, node_id, location, load_varuint, load_required_constant, load_location)
2038
+ location = load_location(freeze)
2039
+ value = RequiredKeywordParameterNode.new(source, node_id, location, load_varuint, load_constant(constant_pool, encoding), load_location(freeze))
2040
+ value.freeze if freeze
2041
+ value
1605
2042
  },
1606
- -> {
2043
+ -> (constant_pool, encoding, freeze) {
1607
2044
  node_id = load_varuint
1608
- location = load_location
1609
- RequiredParameterNode.new(source, node_id, location, load_varuint, load_required_constant)
2045
+ location = load_location(freeze)
2046
+ value = RequiredParameterNode.new(source, node_id, location, load_varuint, load_constant(constant_pool, encoding))
2047
+ value.freeze if freeze
2048
+ value
1610
2049
  },
1611
- -> {
2050
+ -> (constant_pool, encoding, freeze) {
1612
2051
  node_id = load_varuint
1613
- location = load_location
1614
- RescueModifierNode.new(source, node_id, location, load_varuint, load_node, load_location, load_node)
2052
+ location = load_location(freeze)
2053
+ value = RescueModifierNode.new(source, node_id, location, load_varuint, load_node(constant_pool, encoding, freeze), load_location(freeze), load_node(constant_pool, encoding, freeze))
2054
+ value.freeze if freeze
2055
+ value
1615
2056
  },
1616
- -> {
2057
+ -> (constant_pool, encoding, freeze) {
1617
2058
  node_id = load_varuint
1618
- location = load_location
1619
- RescueNode.new(source, node_id, location, load_varuint, load_location, Array.new(load_varuint) { load_node }, load_optional_location, load_optional_node, load_optional_node, load_optional_node)
2059
+ location = load_location(freeze)
2060
+ value = RescueNode.new(source, node_id, location, load_varuint, load_location(freeze), Array.new(load_varuint) { load_node(constant_pool, encoding, freeze) }, load_optional_location(freeze), load_optional_node(constant_pool, encoding, freeze), load_optional_location(freeze), load_optional_node(constant_pool, encoding, freeze), load_optional_node(constant_pool, encoding, freeze))
2061
+ value.freeze if freeze
2062
+ value
1620
2063
  },
1621
- -> {
2064
+ -> (constant_pool, encoding, freeze) {
1622
2065
  node_id = load_varuint
1623
- location = load_location
1624
- RestParameterNode.new(source, node_id, location, load_varuint, load_optional_constant, load_optional_location, load_location)
2066
+ location = load_location(freeze)
2067
+ value = RestParameterNode.new(source, node_id, location, load_varuint, load_optional_constant(constant_pool, encoding), load_optional_location(freeze), load_location(freeze))
2068
+ value.freeze if freeze
2069
+ value
1625
2070
  },
1626
- -> {
2071
+ -> (constant_pool, encoding, freeze) {
1627
2072
  node_id = load_varuint
1628
- location = load_location
1629
- RetryNode.new(source, node_id, location, load_varuint)
2073
+ location = load_location(freeze)
2074
+ value = RetryNode.new(source, node_id, location, load_varuint)
2075
+ value.freeze if freeze
2076
+ value
1630
2077
  },
1631
- -> {
2078
+ -> (constant_pool, encoding, freeze) {
1632
2079
  node_id = load_varuint
1633
- location = load_location
1634
- ReturnNode.new(source, node_id, location, load_varuint, load_location, load_optional_node)
2080
+ location = load_location(freeze)
2081
+ value = ReturnNode.new(source, node_id, location, load_varuint, load_location(freeze), load_optional_node(constant_pool, encoding, freeze))
2082
+ value.freeze if freeze
2083
+ value
1635
2084
  },
1636
- -> {
2085
+ -> (constant_pool, encoding, freeze) {
1637
2086
  node_id = load_varuint
1638
- location = load_location
1639
- SelfNode.new(source, node_id, location, load_varuint)
2087
+ location = load_location(freeze)
2088
+ value = SelfNode.new(source, node_id, location, load_varuint)
2089
+ value.freeze if freeze
2090
+ value
1640
2091
  },
1641
- -> {
2092
+ -> (constant_pool, encoding, freeze) {
1642
2093
  node_id = load_varuint
1643
- location = load_location
1644
- ShareableConstantNode.new(source, node_id, location, load_varuint, load_node)
2094
+ location = load_location(freeze)
2095
+ value = ShareableConstantNode.new(source, node_id, location, load_varuint, load_node(constant_pool, encoding, freeze))
2096
+ value.freeze if freeze
2097
+ value
1645
2098
  },
1646
- -> {
2099
+ -> (constant_pool, encoding, freeze) {
1647
2100
  node_id = load_varuint
1648
- location = load_location
1649
- SingletonClassNode.new(source, node_id, location, load_varuint, Array.new(load_varuint) { load_required_constant }, load_location, load_location, load_node, load_optional_node, load_location)
2101
+ location = load_location(freeze)
2102
+ value = SingletonClassNode.new(source, node_id, location, load_varuint, Array.new(load_varuint) { load_constant(constant_pool, encoding) }, load_location(freeze), load_location(freeze), load_node(constant_pool, encoding, freeze), load_optional_node(constant_pool, encoding, freeze), load_location(freeze))
2103
+ value.freeze if freeze
2104
+ value
1650
2105
  },
1651
- -> {
2106
+ -> (constant_pool, encoding, freeze) {
1652
2107
  node_id = load_varuint
1653
- location = load_location
1654
- SourceEncodingNode.new(source, node_id, location, load_varuint)
2108
+ location = load_location(freeze)
2109
+ value = SourceEncodingNode.new(source, node_id, location, load_varuint)
2110
+ value.freeze if freeze
2111
+ value
1655
2112
  },
1656
- -> {
2113
+ -> (constant_pool, encoding, freeze) {
1657
2114
  node_id = load_varuint
1658
- location = load_location
1659
- SourceFileNode.new(source, node_id, location, load_varuint, load_string)
2115
+ location = load_location(freeze)
2116
+ value = SourceFileNode.new(source, node_id, location, load_varuint, load_string(encoding))
2117
+ value.freeze if freeze
2118
+ value
1660
2119
  },
1661
- -> {
2120
+ -> (constant_pool, encoding, freeze) {
1662
2121
  node_id = load_varuint
1663
- location = load_location
1664
- SourceLineNode.new(source, node_id, location, load_varuint)
2122
+ location = load_location(freeze)
2123
+ value = SourceLineNode.new(source, node_id, location, load_varuint)
2124
+ value.freeze if freeze
2125
+ value
1665
2126
  },
1666
- -> {
2127
+ -> (constant_pool, encoding, freeze) {
1667
2128
  node_id = load_varuint
1668
- location = load_location
1669
- SplatNode.new(source, node_id, location, load_varuint, load_location, load_optional_node)
2129
+ location = load_location(freeze)
2130
+ value = SplatNode.new(source, node_id, location, load_varuint, load_location(freeze), load_optional_node(constant_pool, encoding, freeze))
2131
+ value.freeze if freeze
2132
+ value
1670
2133
  },
1671
- -> {
2134
+ -> (constant_pool, encoding, freeze) {
1672
2135
  node_id = load_varuint
1673
- location = load_location
1674
- StatementsNode.new(source, node_id, location, load_varuint, Array.new(load_varuint) { load_node })
2136
+ location = load_location(freeze)
2137
+ value = StatementsNode.new(source, node_id, location, load_varuint, Array.new(load_varuint) { load_node(constant_pool, encoding, freeze) })
2138
+ value.freeze if freeze
2139
+ value
1675
2140
  },
1676
- -> {
2141
+ -> (constant_pool, encoding, freeze) {
1677
2142
  node_id = load_varuint
1678
- location = load_location
1679
- StringNode.new(source, node_id, location, load_varuint, load_optional_location, load_location, load_optional_location, load_string)
2143
+ location = load_location(freeze)
2144
+ value = StringNode.new(source, node_id, location, load_varuint, load_optional_location(freeze), load_location(freeze), load_optional_location(freeze), load_string(encoding))
2145
+ value.freeze if freeze
2146
+ value
1680
2147
  },
1681
- -> {
2148
+ -> (constant_pool, encoding, freeze) {
1682
2149
  node_id = load_varuint
1683
- location = load_location
1684
- SuperNode.new(source, node_id, location, load_varuint, load_location, load_optional_location, load_optional_node, load_optional_location, load_optional_node)
2150
+ location = load_location(freeze)
2151
+ value = SuperNode.new(source, node_id, location, load_varuint, load_location(freeze), load_optional_location(freeze), load_optional_node(constant_pool, encoding, freeze), load_optional_location(freeze), load_optional_node(constant_pool, encoding, freeze))
2152
+ value.freeze if freeze
2153
+ value
1685
2154
  },
1686
- -> {
2155
+ -> (constant_pool, encoding, freeze) {
1687
2156
  node_id = load_varuint
1688
- location = load_location
1689
- SymbolNode.new(source, node_id, location, load_varuint, load_optional_location, load_optional_location, load_optional_location, load_string)
2157
+ location = load_location(freeze)
2158
+ value = SymbolNode.new(source, node_id, location, load_varuint, load_optional_location(freeze), load_optional_location(freeze), load_optional_location(freeze), load_string(encoding))
2159
+ value.freeze if freeze
2160
+ value
1690
2161
  },
1691
- -> {
2162
+ -> (constant_pool, encoding, freeze) {
1692
2163
  node_id = load_varuint
1693
- location = load_location
1694
- TrueNode.new(source, node_id, location, load_varuint)
2164
+ location = load_location(freeze)
2165
+ value = TrueNode.new(source, node_id, location, load_varuint)
2166
+ value.freeze if freeze
2167
+ value
1695
2168
  },
1696
- -> {
2169
+ -> (constant_pool, encoding, freeze) {
1697
2170
  node_id = load_varuint
1698
- location = load_location
1699
- UndefNode.new(source, node_id, location, load_varuint, Array.new(load_varuint) { load_node }, load_location)
2171
+ location = load_location(freeze)
2172
+ value = UndefNode.new(source, node_id, location, load_varuint, Array.new(load_varuint) { load_node(constant_pool, encoding, freeze) }, load_location(freeze))
2173
+ value.freeze if freeze
2174
+ value
1700
2175
  },
1701
- -> {
2176
+ -> (constant_pool, encoding, freeze) {
1702
2177
  node_id = load_varuint
1703
- location = load_location
1704
- UnlessNode.new(source, node_id, location, load_varuint, load_location, load_node, load_optional_location, load_optional_node, load_optional_node, load_optional_location)
2178
+ location = load_location(freeze)
2179
+ value = UnlessNode.new(source, node_id, location, load_varuint, load_location(freeze), load_node(constant_pool, encoding, freeze), load_optional_location(freeze), load_optional_node(constant_pool, encoding, freeze), load_optional_node(constant_pool, encoding, freeze), load_optional_location(freeze))
2180
+ value.freeze if freeze
2181
+ value
1705
2182
  },
1706
- -> {
2183
+ -> (constant_pool, encoding, freeze) {
1707
2184
  node_id = load_varuint
1708
- location = load_location
1709
- UntilNode.new(source, node_id, location, load_varuint, load_location, load_optional_location, load_optional_location, load_node, load_optional_node)
2185
+ location = load_location(freeze)
2186
+ value = UntilNode.new(source, node_id, location, load_varuint, load_location(freeze), load_optional_location(freeze), load_optional_location(freeze), load_node(constant_pool, encoding, freeze), load_optional_node(constant_pool, encoding, freeze))
2187
+ value.freeze if freeze
2188
+ value
1710
2189
  },
1711
- -> {
2190
+ -> (constant_pool, encoding, freeze) {
1712
2191
  node_id = load_varuint
1713
- location = load_location
1714
- WhenNode.new(source, node_id, location, load_varuint, load_location, Array.new(load_varuint) { load_node }, load_optional_location, load_optional_node)
2192
+ location = load_location(freeze)
2193
+ value = WhenNode.new(source, node_id, location, load_varuint, load_location(freeze), Array.new(load_varuint) { load_node(constant_pool, encoding, freeze) }, load_optional_location(freeze), load_optional_node(constant_pool, encoding, freeze))
2194
+ value.freeze if freeze
2195
+ value
1715
2196
  },
1716
- -> {
2197
+ -> (constant_pool, encoding, freeze) {
1717
2198
  node_id = load_varuint
1718
- location = load_location
1719
- WhileNode.new(source, node_id, location, load_varuint, load_location, load_optional_location, load_optional_location, load_node, load_optional_node)
2199
+ location = load_location(freeze)
2200
+ value = WhileNode.new(source, node_id, location, load_varuint, load_location(freeze), load_optional_location(freeze), load_optional_location(freeze), load_node(constant_pool, encoding, freeze), load_optional_node(constant_pool, encoding, freeze))
2201
+ value.freeze if freeze
2202
+ value
1720
2203
  },
1721
- -> {
2204
+ -> (constant_pool, encoding, freeze) {
1722
2205
  node_id = load_varuint
1723
- location = load_location
1724
- XStringNode.new(source, node_id, location, load_varuint, load_location, load_location, load_location, load_string)
2206
+ location = load_location(freeze)
2207
+ value = XStringNode.new(source, node_id, location, load_varuint, load_location(freeze), load_location(freeze), load_location(freeze), load_string(encoding))
2208
+ value.freeze if freeze
2209
+ value
1725
2210
  },
1726
- -> {
2211
+ -> (constant_pool, encoding, freeze) {
1727
2212
  node_id = load_varuint
1728
- location = load_location
1729
- YieldNode.new(source, node_id, location, load_varuint, load_location, load_optional_location, load_optional_node, load_optional_location)
2213
+ location = load_location(freeze)
2214
+ value = YieldNode.new(source, node_id, location, load_varuint, load_location(freeze), load_optional_location(freeze), load_optional_node(constant_pool, encoding, freeze), load_optional_location(freeze))
2215
+ value.freeze if freeze
2216
+ value
1730
2217
  },
1731
2218
  ]
1732
2219
  end
@@ -1737,8 +2224,21 @@ module Prism
1737
2224
  TOKEN_TYPES = [
1738
2225
  nil,
1739
2226
  :EOF,
1740
- :MISSING,
1741
- :NOT_PROVIDED,
2227
+ :BRACE_RIGHT,
2228
+ :COMMA,
2229
+ :EMBEXPR_END,
2230
+ :KEYWORD_DO,
2231
+ :KEYWORD_ELSE,
2232
+ :KEYWORD_ELSIF,
2233
+ :KEYWORD_END,
2234
+ :KEYWORD_ENSURE,
2235
+ :KEYWORD_IN,
2236
+ :KEYWORD_RESCUE,
2237
+ :KEYWORD_THEN,
2238
+ :KEYWORD_WHEN,
2239
+ :NEWLINE,
2240
+ :PARENTHESIS_RIGHT,
2241
+ :SEMICOLON,
1742
2242
  :AMPERSAND,
1743
2243
  :AMPERSAND_AMPERSAND,
1744
2244
  :AMPERSAND_AMPERSAND_EQUAL,
@@ -1750,7 +2250,6 @@ module Prism
1750
2250
  :BANG_EQUAL,
1751
2251
  :BANG_TILDE,
1752
2252
  :BRACE_LEFT,
1753
- :BRACE_RIGHT,
1754
2253
  :BRACKET_LEFT,
1755
2254
  :BRACKET_LEFT_ARRAY,
1756
2255
  :BRACKET_LEFT_RIGHT,
@@ -1762,7 +2261,6 @@ module Prism
1762
2261
  :CLASS_VARIABLE,
1763
2262
  :COLON,
1764
2263
  :COLON_COLON,
1765
- :COMMA,
1766
2264
  :COMMENT,
1767
2265
  :CONSTANT,
1768
2266
  :DOT,
@@ -1772,7 +2270,6 @@ module Prism
1772
2270
  :EMBDOC_END,
1773
2271
  :EMBDOC_LINE,
1774
2272
  :EMBEXPR_BEGIN,
1775
- :EMBEXPR_END,
1776
2273
  :EMBVAR,
1777
2274
  :EQUAL,
1778
2275
  :EQUAL_EQUAL,
@@ -1806,38 +2303,29 @@ module Prism
1806
2303
  :KEYWORD_CLASS,
1807
2304
  :KEYWORD_DEF,
1808
2305
  :KEYWORD_DEFINED,
1809
- :KEYWORD_DO,
1810
2306
  :KEYWORD_DO_LOOP,
1811
- :KEYWORD_ELSE,
1812
- :KEYWORD_ELSIF,
1813
- :KEYWORD_END,
1814
2307
  :KEYWORD_END_UPCASE,
1815
- :KEYWORD_ENSURE,
1816
2308
  :KEYWORD_FALSE,
1817
2309
  :KEYWORD_FOR,
1818
2310
  :KEYWORD_IF,
1819
2311
  :KEYWORD_IF_MODIFIER,
1820
- :KEYWORD_IN,
1821
2312
  :KEYWORD_MODULE,
1822
2313
  :KEYWORD_NEXT,
1823
2314
  :KEYWORD_NIL,
1824
2315
  :KEYWORD_NOT,
1825
2316
  :KEYWORD_OR,
1826
2317
  :KEYWORD_REDO,
1827
- :KEYWORD_RESCUE,
1828
2318
  :KEYWORD_RESCUE_MODIFIER,
1829
2319
  :KEYWORD_RETRY,
1830
2320
  :KEYWORD_RETURN,
1831
2321
  :KEYWORD_SELF,
1832
2322
  :KEYWORD_SUPER,
1833
- :KEYWORD_THEN,
1834
2323
  :KEYWORD_TRUE,
1835
2324
  :KEYWORD_UNDEF,
1836
2325
  :KEYWORD_UNLESS,
1837
2326
  :KEYWORD_UNLESS_MODIFIER,
1838
2327
  :KEYWORD_UNTIL,
1839
2328
  :KEYWORD_UNTIL_MODIFIER,
1840
- :KEYWORD_WHEN,
1841
2329
  :KEYWORD_WHILE,
1842
2330
  :KEYWORD_WHILE_MODIFIER,
1843
2331
  :KEYWORD_YIELD,
@@ -1856,11 +2344,9 @@ module Prism
1856
2344
  :MINUS,
1857
2345
  :MINUS_EQUAL,
1858
2346
  :MINUS_GREATER,
1859
- :NEWLINE,
1860
2347
  :NUMBERED_REFERENCE,
1861
2348
  :PARENTHESIS_LEFT,
1862
2349
  :PARENTHESIS_LEFT_PARENTHESES,
1863
- :PARENTHESIS_RIGHT,
1864
2350
  :PERCENT,
1865
2351
  :PERCENT_EQUAL,
1866
2352
  :PERCENT_LOWER_I,
@@ -1877,7 +2363,6 @@ module Prism
1877
2363
  :QUESTION_MARK,
1878
2364
  :REGEXP_BEGIN,
1879
2365
  :REGEXP_END,
1880
- :SEMICOLON,
1881
2366
  :SLASH,
1882
2367
  :SLASH_EQUAL,
1883
2368
  :STAR,
@@ -1900,6 +2385,13 @@ module Prism
1900
2385
  :USTAR_STAR,
1901
2386
  :WORDS_SEP,
1902
2387
  :__END__,
1903
- ]
2388
+ :MISSING,
2389
+ :NOT_PROVIDED,
2390
+ ].freeze
2391
+
2392
+ private_constant :MAJOR_VERSION, :MINOR_VERSION, :PATCH_VERSION
2393
+ private_constant :ConstantPool, :FastStringIO, :Loader, :TOKEN_TYPES
1904
2394
  end
2395
+
2396
+ private_constant :Serialize
1905
2397
  end