Skip to content

Instantly share code, notes, and snippets.

@bararchy
Created June 10, 2020 19:14
Show Gist options
  • Save bararchy/359207cebc981869d3bca5d9331aa487 to your computer and use it in GitHub Desktop.
Save bararchy/359207cebc981869d3bca5d9331aa487 to your computer and use it in GitHub Desktop.
DEBUG: generated_source: "MultiParse::DataType::PalmOSSuperMemoFile" the_macro: macro macro_139909291959616
{{ @type.name.id.stringify }}end
signature # => Crystal::CallSignature(
@arg_types=[String],
@block=nil,
@name="<<",
@named_args=nil)
matches # => Crystal::Matches(
@cover=true,
@matches=
[#<Crystal::Match:0x7f3f231f80c0
@arg_types=[String],
@context=
#<Crystal::MatchContext:0x7f3f231e3280
@def_free_vars=nil,
@defining_type=IO,
@free_vars=nil,
@instantiated_type=String::Builder,
@strict=false>,
@def=def <<(obj) : self
obj.to_s(self)
self
end,
@named_arg_types=nil>],
@owner=String::Builder,
@success=true)
owner # => String::Builder
self_type # => nil
signature # => Crystal::CallSignature(
@arg_types=[String],
@block=nil,
@name="<<",
@named_args=nil)
matches # => Crystal::Matches(
@cover=true,
@matches=
[#<Crystal::Match:0x7f3f231fe780
@arg_types=[String],
@context=
#<Crystal::MatchContext:0x7f3f231e3040
@def_free_vars=nil,
@defining_type=IO,
@free_vars=nil,
@instantiated_type=String::Builder,
@strict=false>,
@def=def <<(obj) : self
obj.to_s(self)
self
end,
@named_arg_types=nil>],
@owner=String::Builder,
@success=true)
owner # => String::Builder
self_type # => nil
signature # => Crystal::CallSignature(
@arg_types=[],
@block=nil,
@name="object_id",
@named_args=nil)
matches # => Crystal::Matches(
@cover=true,
@matches=
[#<Crystal::Match:0x7f3f23200e40
@arg_types=[],
@context=
#<Crystal::MatchContext:0x7f3f231fff00
@def_free_vars=nil,
@defining_type=Reference,
@free_vars=nil,
@instantiated_type=MultiParse::DataType::PalmOSSuperMemoFile,
@strict=false>,
@def=def object_id : UInt64
# primitive: object_id
end,
@named_arg_types=nil>],
@owner=MultiParse::DataType::PalmOSSuperMemoFile,
@success=true)
owner # => MultiParse::DataType::PalmOSSuperMemoFile
self_type # => nil
signature # => Crystal::CallSignature(
@arg_types=[String::Builder, Int32],
@block=nil,
@name="to_s",
@named_args=nil)
matches # => Crystal::Matches(
@cover=true,
@matches=
[#<Crystal::Match:0x7f3f23200480
@arg_types=[String::Builder, Int32],
@context=
#<Crystal::MatchContext:0x7f3f231ffc80
@def_free_vars=nil,
@defining_type=Int,
@free_vars=nil,
@instantiated_type=UInt64,
@strict=false>,
@def=
def to_s(io : IO, base : Int = 10, *, upcase : Bool = false) : Nil
if (2 <= base && base <= 36) || (base == 62)
else
raise(ArgumentError.new("Invalid base #{base}"))
end
if upcase && (base == 62)
raise(ArgumentError.new("upcase must be false for base 62"))
end
case self
when 0
io << '0'
when 1
io << '1'
else
internal_to_s(base, upcase) do |ptr, count|
io.write_utf8(Slice.new(ptr, count))
end
end
end,
@named_arg_types=nil>],
@owner=UInt64,
@success=true)
owner # => UInt64
self_type # => nil
signature # => Crystal::CallSignature(
@arg_types=[Symbol],
@block=
do
{% for ivar, i in @type.instance_vars %}
{% if i > 0 %}
io << ','
{% end %}
io << " @{{ ivar.id }}="
@{{ ivar.id }}.inspect io
{% end %}
end,
@name="exec_recursive",
@named_args=nil)
matches # => Crystal::Matches(
@cover=true,
@matches=
[#<Crystal::Match:0x7f3f23201ae0
@arg_types=[Symbol],
@context=
#<Crystal::MatchContext:0x7f3f231ffa80
@def_free_vars=nil,
@defining_type=Reference,
@free_vars=nil,
@instantiated_type=MultiParse::DataType::PalmOSSuperMemoFile,
@strict=false>,
@def=
def exec_recursive(method)
hash = ExecRecursive.hash
key = {object_id, method}
if hash[key]?
false
else
hash[key] = true
value = yield
hash.delete(key)
true
end
end,
@named_arg_types=nil>],
@owner=MultiParse::DataType::PalmOSSuperMemoFile,
@success=true)
owner # => MultiParse::DataType::PalmOSSuperMemoFile
self_type # => nil
Stack overflow (e.g., infinite or very deep recursion)
[0x558fefada916] *Exception::CallStack::print_backtrace:Int32 +118
[0x558fefabf859] __crystal_sigfault_handler +361
[0x558ff0cb16f2] sigfault_handler +40
[0x7f3f50440960] ???
[0x7f3f50459604] ???
[0x7f3f504596b8] ??? (3 times)
[0x7f3f5046e41a] GC_generic_malloc_many +858
[0x7f3f5046e9d3] GC_malloc_kind +307
[0x558fefb7c42d] *GC::malloc<UInt64>:Pointer(Void) +29
[0x558fefa9f875] __crystal_malloc64 +37
[0x558ff0b8ebed] *PrettyPrint::Breakable::new<String, Int32, PrettyPrint>:PrettyPrint::Breakable +93
[0x558ff0b888aa] *PrettyPrint#breakable<String>:(Int32 | Nil) +202
[0x558ff0b6b492] *Crystal::CallSignature +2114
[0x558ff0b88096] *PrettyPrint::format<Crystal::CallSignature, IO::FileDescriptor, Int32, String, Int32>:IO::FileDescriptor +326
[0x558ff0b87f3a] *PrettyPrint::format<Crystal::CallSignature, IO::FileDescriptor, Int32>:IO::FileDescriptor +186
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment