Author: pmichaud
Date: Sun Dec 14 14:23:01 2008
New Revision: 33904
Modified:
branches/assoc/languages/perl6/src/builtins/guts.pir
branches/assoc/languages/perl6/src/classes/Protoobject.pir
Log:
[rakudo]: sync WHENCE handling from trunk.
Modified: branches/assoc/languages/perl6/src/builtins/guts.pir
==============================================================================
--- branches/assoc/languages/perl6/src/builtins/guts.pir (original)
+++ branches/assoc/languages/perl6/src/builtins/guts.pir Sun Dec 14
14:23:01 2008
@@ -568,16 +568,8 @@
WHENCE = getprop '%!WHENCE', $P0
if null WHENCE goto no_whence
- # Attach the WHENCE property.
- .local pmc props
- props = getattribute proto, '%!properties'
- unless null props goto have_props
- props = new 'Hash'
- have_props:
- props['WHENCE'] = WHENCE
- setattribute proto, '%!properties', props
+ setprop proto, '%!WHENCE', WHENCE
no_whence:
-
.return (proto)
.end
Modified: branches/assoc/languages/perl6/src/classes/Protoobject.pir
==============================================================================
--- branches/assoc/languages/perl6/src/classes/Protoobject.pir (original)
+++ branches/assoc/languages/perl6/src/classes/Protoobject.pir Sun Dec 14
14:23:01 2008
@@ -40,14 +40,11 @@
.namespace ['P6protoobject']
.sub 'WHENCE' :method
- .local pmc props, whence
- props = getattribute self, '%!properties'
- if null props goto ret_undef
- whence = props['WHENCE']
- if null whence goto ret_undef
- .return (whence)
- ret_undef:
+ .local pmc whence
+ whence = getprop '%!WHENCE', self
+ unless null whence goto done
whence = new 'Undef'
+ done:
.return (whence)
.end
@@ -127,15 +124,7 @@
.local pmc protoclass, res, props, tmp
protoclass = class self
res = new protoclass
-
- # Attach the WHENCE property.
- props = getattribute self, '%!properties'
- unless null props goto have_props
- props = new 'Hash'
- have_props:
- props['WHENCE'] = WHENCE
- setattribute res, '%!properties', props
-
+ setprop res, '%!WHENCE', WHENCE
.return (res)
.end