Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* first steps towards obj._meth() call syntax * no return values yet * no namespace handling * s. imcc/t/syn/objects.t for examples git-svn-id: https://svn.parrot.org/parrot/trunk@5603 d31e2699-5ff4-0310-a27c-f18f2fbe73fe
- Loading branch information
Leopold Toetsch
committed
Mar 10, 2004
1 parent
052847d
commit c0afb55
Showing
9 changed files
with
135 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -143,6 +143,7 @@ struct pcc_sub_t { | |
int calls_a_sub; | ||
int nci; | ||
int label; | ||
SymReg * object; | ||
}; | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
#!perl | ||
use strict; | ||
use TestCompiler tests => 2; | ||
|
||
############################## | ||
# Parrot Calling Conventions | ||
|
||
|
||
output_is(<<'CODE', <<'OUT', "meth call syntax"); | ||
.sub _main | ||
.local pmc class | ||
.local pmc obj | ||
find_global $P0, "_meth" | ||
store_global "Foo", "_meth", $P0 | ||
newclass class, "Foo" | ||
find_type $I0, "Foo" | ||
new obj, $I0 | ||
obj._meth() | ||
obj->_meth() | ||
print "done\n" | ||
end | ||
.end | ||
.sub _meth | ||
print "in meth\n" | ||
.end | ||
CODE | ||
in meth | ||
in meth | ||
done | ||
OUT | ||
|
||
output_is(<<'CODE', <<'OUT', "meth call syntax(argc)"); | ||
.sub _main | ||
.local pmc class | ||
.local pmc obj | ||
find_global $P0, "_meth" | ||
store_global "Foo", "_meth", $P0 | ||
newclass class, "Foo" | ||
find_type $I0, "Foo" | ||
new obj, $I0 | ||
$P0 = new PerlString | ||
$P0 = "ok\n" | ||
obj. _meth($P0) | ||
print "done\n" | ||
end | ||
.end | ||
.sub _meth | ||
.param pmc s | ||
print "in meth\n" | ||
print s | ||
.end | ||
CODE | ||
in meth | ||
ok | ||
done | ||
OUT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters