Skip to content

Instantly share code, notes, and snippets.

@kojix2
Last active August 11, 2024 23:47
Show Gist options
  • Save kojix2/a23f1af456c6565648b88b89ab2d1168 to your computer and use it in GitHub Desktop.
Save kojix2/a23f1af456c6565648b88b89ab2d1168 to your computer and use it in GitHub Desktop.
Investigation of class_getter in crystal
git clone https://github.com/crystal-lang/crystal
git checkout b9ab9968b85ce2b99a875abd4360b1a432e27a98
cd crystal
grep -r class_getter
CHANGELOG.0.md:* Added `class_getter`, `class_setter`, `class_property`, etc. (thanks @Sija)
scripts/windows_zone_names.ecr:  private class_getter iana_to_windows : Hash(String, String) do
scripts/windows_zone_names.ecr:  private class_getter windows_zone_names : Hash(String, {String, String}) do
scripts/unicode_data.ecr:  private class_getter upcase_ranges : Array({Int32, Int32, Int32}) do
scripts/unicode_data.ecr:  private class_getter downcase_ranges : Array({Int32, Int32, Int32}) do
scripts/unicode_data.ecr:  private class_getter alternate_ranges : Array({Int32, Int32}) do
scripts/unicode_data.ecr:    private class_getter category_<%= category %> : Array({Int32, Int32, Int32}) do
scripts/unicode_data.ecr:  private class_getter casefold_ranges : Array({Int32, Int32, Int32}) do
scripts/unicode_data.ecr:  private class_getter special_cases_downcase : Hash(Int32, {Int32, Int32, Int32}) do
scripts/unicode_data.ecr:  private class_getter special_cases_upcase : Hash(Int32, {Int32, Int32, Int32}) do
scripts/unicode_data.ecr:  private class_getter special_cases_titlecase : Hash(Int32, {Int32, Int32, Int32}) do
scripts/unicode_data.ecr:  private class_getter fold_cases : Hash(Int32, {Int32, Int32, Int32}) do
scripts/unicode_data.ecr:  private class_getter canonical_combining_classes : Array({Int32, Int32, UInt8}) do
scripts/unicode_data.ecr:  private class_getter canonical_decompositions : Hash(Int32, {Int32, Int32}) do
scripts/unicode_data.ecr:  private class_getter compatibility_decomposition_data : Array(Int32) do
scripts/unicode_data.ecr:  private class_getter compatibility_decompositions : Hash(Int32, {Int32, Int32}) do
scripts/unicode_data.ecr:  private class_getter canonical_compositions : Hash(Int64, Int32) do
scripts/unicode_data.ecr:  private class_getter nfc_quick_check : Array({Int32, Int32, QuickCheckResult}) do
scripts/unicode_data.ecr:  private class_getter nfkc_quick_check : Array({Int32, Int32, QuickCheckResult}) do
scripts/unicode_data.ecr:  private class_getter nfd_quick_check : Array({Int32, Int32}) do
scripts/unicode_data.ecr:  private class_getter nfkd_quick_check : Array({Int32, Int32}) do
spec/support/time.cr:    class_getter? time_zone_privilege_enabled : Bool do
spec/std/socket/spec_helper.cr:  class_getter?(supports_ipv6 : Bool) do
spec/compiler/semantic/macro_spec.cr:              class_getter value : Nil do
src/unicode/data.cr:  private class_getter upcase_ranges : Array({Int32, Int32, Int32}) do
src/unicode/data.cr:  private class_getter downcase_ranges : Array({Int32, Int32, Int32}) do
src/unicode/data.cr:  private class_getter alternate_ranges : Array({Int32, Int32}) do
src/unicode/data.cr:  private class_getter category_Lu : Array({Int32, Int32, Int32}) do
src/unicode/data.cr:  private class_getter category_Ll : Array({Int32, Int32, Int32}) do
src/unicode/data.cr:  private class_getter category_Lt : Array({Int32, Int32, Int32}) do
src/unicode/data.cr:  private class_getter category_Lm : Array({Int32, Int32, Int32}) do
src/unicode/data.cr:  private class_getter category_Lo : Array({Int32, Int32, Int32}) do
src/unicode/data.cr:  private class_getter category_Mn : Array({Int32, Int32, Int32}) do
src/unicode/data.cr:  private class_getter category_Mc : Array({Int32, Int32, Int32}) do
src/unicode/data.cr:  private class_getter category_Me : Array({Int32, Int32, Int32}) do
src/unicode/data.cr:  private class_getter category_Nd : Array({Int32, Int32, Int32}) do
src/unicode/data.cr:  private class_getter category_Nl : Array({Int32, Int32, Int32}) do
src/unicode/data.cr:  private class_getter category_No : Array({Int32, Int32, Int32}) do
src/unicode/data.cr:  private class_getter category_Zs : Array({Int32, Int32, Int32}) do
src/unicode/data.cr:  private class_getter category_Zl : Array({Int32, Int32, Int32}) do
src/unicode/data.cr:  private class_getter category_Zp : Array({Int32, Int32, Int32}) do
src/unicode/data.cr:  private class_getter category_Cc : Array({Int32, Int32, Int32}) do
src/unicode/data.cr:  private class_getter category_Cf : Array({Int32, Int32, Int32}) do
src/unicode/data.cr:  private class_getter category_Cs : Array({Int32, Int32, Int32}) do
src/unicode/data.cr:  private class_getter category_Co : Array({Int32, Int32, Int32}) do
src/unicode/data.cr:  private class_getter category_Cn : Array({Int32, Int32, Int32}) do
src/unicode/data.cr:  private class_getter casefold_ranges : Array({Int32, Int32, Int32}) do
src/unicode/data.cr:  private class_getter special_cases_downcase : Hash(Int32, {Int32, Int32, Int32}) do
src/unicode/data.cr:  private class_getter special_cases_upcase : Hash(Int32, {Int32, Int32, Int32}) do
src/unicode/data.cr:  private class_getter special_cases_titlecase : Hash(Int32, {Int32, Int32, Int32}) do
src/unicode/data.cr:  private class_getter fold_cases : Hash(Int32, {Int32, Int32, Int32}) do
src/unicode/data.cr:  private class_getter canonical_combining_classes : Array({Int32, Int32, UInt8}) do
src/unicode/data.cr:  private class_getter canonical_decompositions : Hash(Int32, {Int32, Int32}) do
src/unicode/data.cr:  private class_getter compatibility_decomposition_data : Array(Int32) do
src/unicode/data.cr:  private class_getter compatibility_decompositions : Hash(Int32, {Int32, Int32}) do
src/unicode/data.cr:  private class_getter canonical_compositions : Hash(Int64, Int32) do
src/unicode/data.cr:  private class_getter nfc_quick_check : Array({Int32, Int32, QuickCheckResult}) do
src/unicode/data.cr:  private class_getter nfkc_quick_check : Array({Int32, Int32, QuickCheckResult}) do
src/unicode/data.cr:  private class_getter nfd_quick_check : Array({Int32, Int32}) do
src/unicode/data.cr:  private class_getter nfkd_quick_check : Array({Int32, Int32}) do
src/compiler/crystal/codegen/link.cr:    class_getter paths : Array(String) do
src/crystal/system/thread.cr:  protected class_getter(threads) { Thread::LinkedList(Thread).new }
src/crystal/system/win32/crypto.cr:  private class_getter system_root_certificates : Array(OpenSSL::X509::Certificate) do
src/crystal/system/win32/time.cr:  private class_getter performance_frequency : Int64 do
src/crystal/system/win32/zone_names.cr:  private class_getter iana_to_windows : Hash(String, String) do
src/crystal/system/win32/zone_names.cr:  private class_getter windows_zone_names : Hash(String, {String, String}) do
src/crystal/system/win32/socket.cr:  class_getter connect_ex
src/crystal/system/win32/socket.cr:  class_getter accept_ex
src/crystal/at_exit_handlers.cr:  private class_getter(handlers) { [] of Int32, ::Exception? -> }
src/log/format.cr:  protected class_getter pid : String = Process.pid.to_s
src/log/metadata.cr:  class_getter empty : Log::Metadata = Log::Metadata.new
src/spec/dsl.cr:  class_getter cli = CLI.new
src/regex/pcre2.cr:  class_getter version_number : {Int32, Int32} = begin
src/regex/pcre2.cr:  class_getter match_context : LibPCRE2::MatchContext* do
src/regex/pcre.cr:  class_getter version_number : {Int32, Int32} = begin
src/fiber.cr:  protected class_getter(fibers) { Thread::LinkedList(Fiber).new }
grep -r class_setter
CHANGELOG.0.md:* Added `class_getter`, `class_setter`, `class_property`, etc. (thanks @Sija)
spec/compiler/crystal/commands/clear_cache_spec.cr:  class_setter instance
grep -r class_property
CHANGELOG.0.md:* Added `class_getter`, `class_setter`, `class_property`, etc. (thanks @Sija)
spec/compiler/codegen/c_abi/c_abi_spec.cr:          class_property x = 0i64
src/time/location.cr:  class_property(local : Location) { load_local }
src/compiler/crystal/tools/git.cr:  class_property executable = "git"
src/crystal/system/unix/signal.cr:  class_property child_handler : Handler?
src/crystal/system/unix/pthread.cr:    class_property current_thread : ::Thread { ::Thread.new }
src/crystal/system/wasi/thread.cr:  class_property current_thread : ::Thread { ::Thread.new }
src/crystal/system/win32/thread.cr:  class_property current_thread : ::Thread { ::Thread.new }
src/log/format.cr:  class_property progname = File.basename(PROGRAM_NAME)
src/colorize.cr:  class_property? enabled : Bool { !ENV.has_key?("NO_COLOR") }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment