Skip to content

Commit b85cd82

Browse files
authored
Merge pull request #1746 from ruby/yjit-rjit
Correct `RubyVM::YJIT` and `RubyVM::RJIT` module
2 parents 6e99a43 + d109c5c commit b85cd82

File tree

1 file changed

+103
-103
lines changed

1 file changed

+103
-103
lines changed

core/ruby_vm.rbs

+103-103
Original file line numberDiff line numberDiff line change
@@ -260,118 +260,118 @@ module RubyVM::AbstractSyntaxTree
260260
#
261261
def children: () -> Array[untyped]
262262
end
263+
end
263264

264-
# <!-- rdoc-file=yjit.rb -->
265-
# This module allows for introspection of YJIT, CRuby's just-in-time compiler.
266-
# Everything in the module is highly implementation specific and the API might
267-
# be less stable compared to the standard library.
268-
# This module may not exist if YJIT does not support the particular platform
269-
# for which CRuby is built.
270-
#
271-
module YJIT
272-
# <!--
273-
# rdoc-file=yjit.rb
274-
# - code_gc()
275-
# -->
276-
# Discard existing compiled code to reclaim memory
277-
# and allow for recompilations in the future.
278-
#
279-
def self.code_gc: () -> void
265+
# <!-- rdoc-file=yjit.rb -->
266+
# This module allows for introspection of YJIT, CRuby's just-in-time compiler.
267+
# Everything in the module is highly implementation specific and the API might
268+
# be less stable compared to the standard library.
269+
# This module may not exist if YJIT does not support the particular platform
270+
# for which CRuby is built.
271+
#
272+
module RubyVM::YJIT
273+
# <!--
274+
# rdoc-file=yjit.rb
275+
# - code_gc()
276+
# -->
277+
# Discard existing compiled code to reclaim memory
278+
# and allow for recompilations in the future.
279+
#
280+
def self.code_gc: () -> void
280281

281-
# <!--
282-
# rdoc-file=yjit.rb
283-
# - dump_exit_locations(filename)
284-
# -->
285-
# Marshal dumps exit locations to the given filename.
286-
# Usage:
287-
# If `--yjit-exit-locations` is passed, a file named
288-
# "yjit_exit_locations.dump" will automatically be generated.
289-
# If you want to collect traces manually, call `dump_exit_locations`
290-
# directly.
291-
# Note that calling this in a script will generate stats after the
292-
# dump is created, so the stats data may include exits from the
293-
# dump itself.
294-
# In a script call:
295-
# at_exit do
296-
# RubyVM::YJIT.dump_exit_locations("my_file.dump")
297-
# end
298-
#
299-
# Then run the file with the following options:
300-
# ruby --yjit --yjit-trace-exits test.rb
301-
#
302-
# Once the code is done running, use Stackprof to read the dump file.
303-
# See Stackprof documentation for options.
304-
#
305-
def self.dump_exit_locations: (untyped filename) -> void
282+
# <!--
283+
# rdoc-file=yjit.rb
284+
# - dump_exit_locations(filename)
285+
# -->
286+
# Marshal dumps exit locations to the given filename.
287+
# Usage:
288+
# If `--yjit-exit-locations` is passed, a file named
289+
# "yjit_exit_locations.dump" will automatically be generated.
290+
# If you want to collect traces manually, call `dump_exit_locations`
291+
# directly.
292+
# Note that calling this in a script will generate stats after the
293+
# dump is created, so the stats data may include exits from the
294+
# dump itself.
295+
# In a script call:
296+
# at_exit do
297+
# RubyVM::YJIT.dump_exit_locations("my_file.dump")
298+
# end
299+
#
300+
# Then run the file with the following options:
301+
# ruby --yjit --yjit-trace-exits test.rb
302+
#
303+
# Once the code is done running, use Stackprof to read the dump file.
304+
# See Stackprof documentation for options.
305+
#
306+
def self.dump_exit_locations: (untyped filename) -> void
306307

307-
# <!--
308-
# rdoc-file=yjit.rb
309-
# - enable()
310-
# -->
311-
# Enable YJIT compilation.
312-
#
313-
def self.enable: () -> void
308+
# <!--
309+
# rdoc-file=yjit.rb
310+
# - enable(stats: false)
311+
# -->
312+
# Enable YJIT compilation.
313+
#
314+
def self.enable: () -> void
314315

315-
# <!--
316-
# rdoc-file=yjit.rb
317-
# - enabled?()
318-
# -->
319-
# Check if YJIT is enabled.
320-
#
321-
def self.enabled?: () -> bool
316+
# <!--
317+
# rdoc-file=yjit.rb
318+
# - enabled?()
319+
# -->
320+
# Check if YJIT is enabled.
321+
#
322+
def self.enabled?: () -> bool
322323

323-
# <!--
324-
# rdoc-file=yjit.rb
325-
# - format_number(pad, number)
326-
# -->
327-
# Format large numbers with comma separators for readability
328-
#
329-
def self.format_number: (untyped pad, untyped number) -> untyped
324+
# <!--
325+
# rdoc-file=yjit.rb
326+
# - format_number(pad, number)
327+
# -->
328+
# Format large numbers with comma separators for readability
329+
#
330+
def self.format_number: (untyped pad, untyped number) -> untyped
330331

331-
# <!--
332-
# rdoc-file=yjit.rb
333-
# - format_number_pct(pad, number, total)
334-
# -->
335-
# Format a number along with a percentage over a total value
336-
#
337-
def self.format_number_pct: (untyped pad, untyped number, untyped total) -> untyped
332+
# <!--
333+
# rdoc-file=yjit.rb
334+
# - format_number_pct(pad, number, total)
335+
# -->
336+
# Format a number along with a percentage over a total value
337+
#
338+
def self.format_number_pct: (untyped pad, untyped number, untyped total) -> untyped
338339

339-
# <!--
340-
# rdoc-file=yjit.rb
341-
# - reset_stats!()
342-
# -->
343-
# Discard statistics collected for `--yjit-stats`.
344-
#
345-
def self.reset_stats!: () -> void
340+
# <!--
341+
# rdoc-file=yjit.rb
342+
# - reset_stats!()
343+
# -->
344+
# Discard statistics collected for `--yjit-stats`.
345+
#
346+
def self.reset_stats!: () -> void
346347

347-
# <!--
348-
# rdoc-file=yjit.rb
349-
# - runtime_stats(context: false)
350-
# -->
351-
# Return a hash for statistics generated for the `--yjit-stats` command line
352-
# option.
353-
# Return `nil` when option is not passed or unavailable.
354-
#
355-
def self.runtime_stats: (?context: bool) -> Hash[untyped, untyped]?
348+
# <!--
349+
# rdoc-file=yjit.rb
350+
# - runtime_stats(context: false)
351+
# -->
352+
# Return a hash for statistics generated for the `--yjit-stats` command line
353+
# option.
354+
# Return `nil` when option is not passed or unavailable.
355+
#
356+
def self.runtime_stats: (?context: bool) -> Hash[untyped, untyped]?
356357

357-
# <!--
358-
# rdoc-file=yjit.rb
359-
# - stats_enabled?()
360-
# -->
361-
# Check if `--yjit-stats` is used.
362-
#
363-
def self.stats_enabled?: () -> bool
358+
# <!--
359+
# rdoc-file=yjit.rb
360+
# - stats_enabled?()
361+
# -->
362+
# Check if `--yjit-stats` is used.
363+
#
364+
def self.stats_enabled?: () -> bool
364365

365-
# <!--
366-
# rdoc-file=yjit.rb
367-
# - stats_string()
368-
# -->
369-
# Format and print out counters as a String. This returns a non-empty
370-
# content only when `--yjit-stats` is enabled.
371-
#
372-
def self.stats_string: () -> String
373-
end
366+
# <!--
367+
# rdoc-file=yjit.rb
368+
# - stats_string()
369+
# -->
370+
# Format and print out counters as a String. This returns a non-empty
371+
# content only when `--yjit-stats` is enabled.
372+
#
373+
def self.stats_string: () -> String
374+
end
374375

375-
module RJIT
376-
end
376+
module RubyVM::RJIT
377377
end

0 commit comments

Comments
 (0)