| CODENOTIFIER | HelpYou are not signed inSign in |
Project: Rakudo
Revision: 30799
Author: pmichaud
Date: 05 Sep 2008 15:33:53
Changes:[rakudo]: Initial implementation of .defined for Object.
Files:| ... | ...@@ -128,6 +128,23 @@ | |
| 128 | 128 | .end |
| 129 | 129 | |
| 130 | 130 | |
| 131 | =item defined() | |
| 132 | ||
| 133 | Return true if the object is defined. | |
| 134 | ||
| 135 | =cut | |
| 136 | ||
| 137 | .sub 'defined' :method | |
| 138 | $P0 = get_hll_global ['Bool'], 'True' | |
| 139 | .return ($P0) | |
| 140 | .end | |
| 141 | ||
| 142 | .sub '' :method :vtable('defined') | |
| 143 | $I0 = self.'defined'() | |
| 144 | .return ($I0) | |
| 145 | .end | |
| 146 | ||
| 147 | ||
| 131 | 148 | =item new() |
| 132 | 149 | |
| 133 | 150 | Create a new object having the same class as the invocant. |
| ... | ...@@ -523,6 +540,16 @@ | |
| 523 | 540 | .end |
| 524 | 541 | |
| 525 | 542 | |
| 543 | =item defined() | |
| 544 | ||
| 545 | =cut | |
| 546 | ||
| 547 | .sub 'defined' :method | |
| 548 | $P0 = get_hll_global ['Bool'], 'False' | |
| 549 | .return ($P0) | |
| 550 | .end | |
| 551 | ||
| 552 | ||
| 526 | 553 | =item get_pmc_keyed(key) (vtable method) |
| 527 | 554 | |
| 528 | 555 | Returns a proto-object with an autovivification closure attached to it. |