Changeset 22052
- Timestamp:
- 08/28/08 09:45:51 (3 months ago)
- Location:
- v6/smop
- Files:
-
- 2 modified
-
src-s1p/P6Meta.pm (modified) (6 diffs)
-
src/smop_mold.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
v6/smop/src-s1p/P6Meta.pm
r22036 r22052 1 class P6Meta meta ¢SMOP__S1P__PurePrototypeHow {1 class P6Meta meta SMOP__S1P__PurePrototypeHow { 2 2 3 3 =begin … … 135 135 method methods($how: $object --> List of Method) { 136 136 my sub list_methods_recurse($obj) { 137 for ($obj.^!methods) - -> $selfdef {137 for ($obj.^!methods) -> $selfdef { 138 138 take $selfdef; 139 139 } 140 for ($obj.^!isa) - -> $isa {140 for ($obj.^!isa) -> $isa { 141 141 list_methods_recurse($isa); 142 142 } 143 for ($obj.^!role) - -> $role {143 for ($obj.^!role) -> $role { 144 144 list_methods_recurse($role); 145 145 } … … 148 148 List of Method @methods = gather { 149 149 list_methods_recurse($object); 150 for ($object.^!submethods) - -> $submethod {150 for ($object.^!submethods) -> $submethod { 151 151 take $submethod; 152 152 } … … 164 164 =end 165 165 166 method attributes($how: $object ,--> List of Attribute) {166 method attributes($how: $object --> List of Attribute) { 167 167 my sub list_attributes_recurse($obj) { 168 for ($obj.^!attributes) - -> $attr {168 for ($obj.^!attributes) -> $attr { 169 169 take $attr; 170 170 } 171 for ($obj.^!isa) - -> $isa {171 for ($obj.^!isa) -> $isa { 172 172 list_attributes_recurse($isa); 173 173 } 174 for ($obj.^!role) - -> $role {174 for ($obj.^!role) -> $role { 175 175 list_attributes_recurse($role); 176 176 } … … 194 194 method isa($how: $object, $superclass --> bool) { 195 195 return true if $object === $superclass; 196 for ($object.^!isa) - -> $isa {196 for ($object.^!isa) -> $isa { 197 197 return true if $isa === $superclass; 198 198 my $res = $isa.^isa($superclass); … … 212 212 method does($how: $object, $superclass --> bool) { 213 213 return true if $object === $superclass; 214 for ($object.^!does) - -> $isa {214 for ($object.^!does) -> $isa { 215 215 return true if $isa === $superclass; 216 216 my $res = $isa.^does($superclass); 217 217 return true if $res; 218 218 } 219 for ($object.^!does) - -> $does {219 for ($object.^!does) -> $does { 220 220 return true if $does === $superclass; 221 221 my $res = $does.^does($superclass); -
v6/smop/src/smop_mold.c
r22033 r22052 292 292 } 293 293 } else if (SMOP__ID__DESTROYALL == identifier) { 294 SMOP_RELEASE(interpreter,frame->mold);295 294 int i; 296 295 for (i=0;i<mold->registers;i++) { … … 298 297 } 299 298 free(frame->registers); 299 SMOP_RELEASE(interpreter,frame->mold); 300 300 } else { 301 301 ___UNKNOWN_METHOD___;
