Ticket #743 (closed todo: invalid)

Opened 13 years ago

Last modified 13 years ago

Add 'inspect' method to Sub PMC

Reported by: Austin_Hastings Owned by:
Priority: minor Milestone:
Component: none Version: 1.2.0
Severity: high Keywords: pmc,sub,introspection
Cc: Language:
Patch status: Platform: linux

Description

Presently, Sub PMC has inspect() and inspect_str() functions defined, but method calls on the PMC from PIR are non-responsive:

Method 'inspect' not found for invocant of class 'Sub'

To reproduce:

.namespace []
.sub demo :init :load 
	$P0 = get_global 'demo'
	print "Sub type: "
	$S0 = typeof $P0
	print $S0
	print "\n"
	$P1 = $P0.'get_namespace'()
	$S0 = $P1
	print "Namespace: "
	print $S0
	print "\n"
	$P2 = $P0.'inspect'()
	.local pmc iter
	iter = new 'Iterator', $P2
	while:
	unless iter, done
	$S0 = shift iter
	print $S0
	print ": "
	$P3 = iter[$S0]
	print $P3
	print "\n"
	goto while
	done:
.end

Change History

Changed 13 years ago by cotto

  • status changed from new to closed
  • resolution set to invalid

The inspect opcode works fine for this purpose, as verified in #parrot.

Note: See TracTickets for help on using tickets.