aboutsummaryrefslogtreecommitdiffstats
path: root/gc.rb
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2020-05-18 10:43:26 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2020-06-19 18:46:55 +0900
commitd863f4bccdd1b5566fbdbe87af766e54b995f8af (patch)
tree23f94a6dd5296847446a240615e2bc393457bf1d /gc.rb
parentc8703a17ceedae4a72f83c962a4d098731a85dda (diff)
downloadruby-d863f4bccdd1b5566fbdbe87af766e54b995f8af.tar.gz
[Feature #16254] Use `__builtin.func` style
Diffstat (limited to 'gc.rb')
-rw-r--r--gc.rb24
1 files changed, 12 insertions, 12 deletions
diff --git a/gc.rb b/gc.rb
index dd5781b603..5afed2535b 100644
--- a/gc.rb
+++ b/gc.rb
@@ -31,11 +31,11 @@ module GC
# are not guaranteed to be future-compatible, and may be ignored if the
# underlying implementation does not support them.
def self.start full_mark: true, immediate_mark: true, immediate_sweep: true
- __builtin_gc_start_internal full_mark, immediate_mark, immediate_sweep
+ __builtin.gc_start_internal full_mark, immediate_mark, immediate_sweep
end
def garbage_collect full_mark: true, immediate_mark: true, immediate_sweep: true
- __builtin_gc_start_internal full_mark, immediate_mark, immediate_sweep
+ __builtin.gc_start_internal full_mark, immediate_mark, immediate_sweep
end
# call-seq:
@@ -49,7 +49,7 @@ module GC
# GC.enable #=> false
#
def self.enable
- __builtin_gc_enable
+ __builtin.gc_enable
end
# call-seq:
@@ -61,7 +61,7 @@ module GC
# GC.disable #=> false
# GC.disable #=> true
def self.disable
- __builtin_gc_disable
+ __builtin.gc_disable
end
# call-seq:
@@ -69,7 +69,7 @@ module GC
#
# Returns current status of GC stress mode.
def self.stress
- __builtin_gc_stress_get
+ __builtin.gc_stress_get
end
# call-seq:
@@ -87,7 +87,7 @@ module GC
# 0x02:: no immediate sweep
# 0x04:: full mark after malloc/calloc/realloc
def self.stress=(flag)
- __builtin_gc_stress_set_m flag
+ __builtin.gc_stress_set_m flag
end
# call-seq:
@@ -97,7 +97,7 @@ module GC
#
# It returns the number of times GC occurred since the process started.
def self.count
- __builtin_gc_count
+ __builtin.gc_count
end
# call-seq:
@@ -146,7 +146,7 @@ module GC
#
# This method is only expected to work on C Ruby.
def self.stat hash_or_key = nil
- __builtin_gc_stat hash_or_key
+ __builtin.gc_stat hash_or_key
end
# call-seq:
@@ -160,11 +160,11 @@ module GC
# it is overwritten and returned.
# This is intended to avoid probe effect.
def self.latest_gc_info hash_or_key = nil
- __builtin_gc_latest_gc_info hash_or_key
+ __builtin.gc_latest_gc_info hash_or_key
end
def self.compact
- __builtin_rb_gc_compact
+ __builtin.rb_gc_compact
end
# call-seq:
@@ -182,13 +182,13 @@ module GC
# object, that object should be pushed on the mark stack, and will
# make a SEGV.
def self.verify_compaction_references(toward: nil, double_heap: false)
- __builtin_gc_verify_compaction_references(toward, double_heap)
+ __builtin.gc_verify_compaction_references(toward, double_heap)
end
end
module ObjectSpace
def garbage_collect full_mark: true, immediate_mark: true, immediate_sweep: true
- __builtin_gc_start_internal full_mark, immediate_mark, immediate_sweep
+ __builtin.gc_start_internal full_mark, immediate_mark, immediate_sweep
end
module_function :garbage_collect