Skip to content

Instantly share code, notes, and snippets.

@peschwa
Created September 20, 2016 19:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save peschwa/837f82061c9d22033bcd8c12374805ce to your computer and use it in GitHub Desktop.
Save peschwa/837f82061c9d22033bcd8c12374805ce to your computer and use it in GitHub Desktop.
$ ./perl6-jdb-server -e'my @a = 1, 1, * + * ... * < 20; use java::lang::System:from<JavaRuntime>; System.get_out.println(@a)'
Listening for transport dt_socket at address: 8000
Listening for transport dt_socket at address: 8000
java.lang.RuntimeException: This type does not support positional operations
in block <unit> at -e line 1
# Okay, great, let's debug this!
main[4] list
4,242
4,243 method WALK-AT-POS(\target,\indices) is raw {
4,244 my $target := target;
4,245 my $indices := nqp::getattr(indices,List,'$!reified');
4,246 => my int $elems = nqp::elems($indices);
4,247 my int $i = -1;
4,248 $target := $target.AT-POS(nqp::atpos($indices,$i))
4,249 while nqp::islt_i(++$i,$elems);
4,250 $target
4,251 }
main[4] locals
Method arguments:
__local_8 = instance of C70AD33581C1438175B9337882175162CC6E987C(id=2490)
__local_3 = instance of org.perl6.nqp.runtime.ThreadContext(id=2491)
__local_1 = instance of org.perl6.nqp.runtime.CodeRef(id=2492)
__local_0 = instance of org.perl6.nqp.runtime.CallSiteDescriptor(id=2493)
__local_2 = null
__local_9 = instance of java.lang.Object[3] (id=2494)
Local variables:
__local_6 = null
__local_5 = null
__local_4 = null
__local_7 = instance of org.perl6.nqp.runtime.CallFrame(id=2495)
main[4] dump __local_9[2]
__local_9[2] = {
field_0: instance of __P6opaque__74(id=2497)
field_1: instance of __P6opaque__74(id=2498)
field_2: null
field_3: null
org.perl6.nqp.sixmodel.reprs.P6OpaqueBaseInstance.delegate: null
org.perl6.nqp.sixmodel.SixModelObject.st: instance of org.perl6.nqp.sixmodel.STable(id=2499)
org.perl6.nqp.sixmodel.SixModelObject.sc: null
}
main[4] dump org.perl6.nqp.runtime.Ops.typeName(__local_9[2], __local_3)
org.perl6.nqp.runtime.Ops.typeName(__local_9[2], __local_3) = "Array"
# Okay, great, let's debug this at a later date!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment