Author: kjs
Date: Sun Nov 30 06:32:46 2008
New Revision: 33364
Modified:
trunk/runtime/parrot/library/Digest/MD5.pir
trunk/runtime/parrot/library/STM.pir
Log:
[lib] instead of using the 'global' keyword, use the 'find_global' op. Yes,
that's deprecated as well, but this is the first step in removing the 'global'
keyword from IMCC. The whole find_global/store_global deprecation is in fact a
separate issue, and a larger task.
Modified: trunk/runtime/parrot/library/Digest/MD5.pir
==============================================================================
--- trunk/runtime/parrot/library/Digest/MD5.pir (original)
+++ trunk/runtime/parrot/library/Digest/MD5.pir Sun Nov 30 06:32:46 2008
@@ -55,11 +55,11 @@
.local pmc f
f = find_global "Digest", "_md5sum"
- global "_md5sum" = f
+ store_global "_md5sum", f
f = find_global "Digest", "_md5_hex"
- global "_md5_hex" = f
+ store_global "_md5_hex", f
f = find_global "Digest", "_md5_print"
- global "_md5_print" = f
+ store_global "_md5_print", f
.end
###########################################################################
Modified: trunk/runtime/parrot/library/STM.pir
==============================================================================
--- trunk/runtime/parrot/library/STM.pir (original)
+++ trunk/runtime/parrot/library/STM.pir Sun Nov 30 06:32:46 2008
@@ -38,7 +38,7 @@
restart_tx:
.local pmc statuses
- statuses = global 'statuses'
+ statuses = find_global 'statuses'
tx_flags = bor tx_flags, STATUS_COMMIT
push statuses, tx_flags
@@ -47,7 +47,7 @@
the_result = new 'Undef'
.local pmc _thelper
- _thelper = global '_transaction_helper'
+ _thelper = find_global '_transaction_helper'
$P0 = newclosure _thelper
stm_start
@@ -61,10 +61,10 @@
#print $I0
#print "\n"
.local pmc ends
- ends = global 'ends'
+ ends = find_global 'ends'
$P0 = pop ends
.local int status
- statuses = global 'statuses'
+ statuses = find_global 'statuses'
status = pop statuses
status = band status, STATUS_MASK
if status == STATUS_COMMIT goto do_commit
@@ -124,14 +124,14 @@
closure = find_lex 'closure'
args = find_lex 'args'
the_cont = interpinfo .INTERPINFO_CURRENT_CONT
- ends = global 'ends'
+ ends = find_global 'ends'
push ends, the_cont
.tailcall closure(args :flat)
.end
.sub _end_tx
.local pmc ends
- ends = global 'ends'
+ ends = find_global 'ends'
.local pmc end
end = ends[-1]
$P0 = end() # workaround?
@@ -140,7 +140,7 @@
.sub _cur_status
.local pmc statuses
- statuses = global 'statuses'
+ statuses = find_global 'statuses'
$I0 = statuses
if $I0 == 0 goto none_such
$I0 = $I0 - 1
@@ -154,7 +154,7 @@
.sub _set_status
.param int new_status
.local pmc statuses
- statuses = global 'statuses'
+ statuses = find_global 'statuses'
$I0 = pop statuses
push statuses, new_status
.end
@@ -176,7 +176,7 @@
.local int this_status
.local pmc this_end
.local int i
- statuses = global 'statuses'
+ statuses = find_global 'statuses'
i = statuses
dec i
@@ -278,7 +278,7 @@
.param pmc args :slurpy
.local int status
- $P0 = global '_transaction'
+ $P0 = find_global '_transaction'
# print "STM::transaction("
# print closure
# print ", ...)\n"