develooper Front page | perl.cvs.parrot | Postings from January 2009

[svn:parrot] r35385 - trunk/languages/BASIC/compiler

From:
coke
Date:
January 10, 2009 21:53
Subject:
[svn:parrot] r35385 - trunk/languages/BASIC/compiler
Message ID:
20090111055318.24FEACB9F9@x12.develooper.com
Author: coke
Date: Sat Jan 10 21:53:17 2009
New Revision: 35385

Modified:
   trunk/languages/BASIC/compiler/COMP_parsefuncs.pm
   trunk/languages/BASIC/compiler/RT_aggregates.pir
   trunk/languages/BASIC/compiler/RT_builtins.pir
   trunk/languages/BASIC/compiler/RT_debugger.pir
   trunk/languages/BASIC/compiler/RT_initialize.pir
   trunk/languages/BASIC/compiler/RT_io.pir
   trunk/languages/BASIC/compiler/RT_platform.pir
   trunk/languages/BASIC/compiler/RT_platform_ANSIscreen.pir
   trunk/languages/BASIC/compiler/RT_platform_win32.pir
   trunk/languages/BASIC/compiler/RT_support.pir
   trunk/languages/BASIC/compiler/compile.pl

Log:
[BASIC] avoid defunct find/store_global opcodes



Modified: trunk/languages/BASIC/compiler/COMP_parsefuncs.pm
==============================================================================
--- trunk/languages/BASIC/compiler/COMP_parsefuncs.pm	(original)
+++ trunk/languages/BASIC/compiler/COMP_parsefuncs.pm	Sat Jan 10 21:53:17 2009
@@ -299,10 +299,10 @@
     else {
         ( $result, $type, @code ) = EXPRESSION();
         push @{ $code{$seg}->{code} }, <<EOR;
-@code   find_global \$P0, "RANDSEED"
+@code   get_global \$P0, "RANDSEED"
         \$I0= $result
         \$P0["value"]= \$I0
-        store_global "RANDSEED", \$P0
+        set_global "RANDSEED", \$P0
 EOR
         feedme();
     }
@@ -450,9 +450,9 @@
         }
         else {
             push @{ $code{$seg}->{code} }, <<PRINT;
-        find_global \$P0, "PRINTCOL"
+        get_global \$P0, "PRINTCOL"
         \$P0["value"]=0
-        store_global "PRINTCOL", \$P0
+        set_global "PRINTCOL", \$P0
         print "\\n"
 PRINT
         }
@@ -1187,9 +1187,9 @@
         \$P3 = new 'Hash'
         \$P3["index"]=\$P2
         \$P3["hash"]=\$P0
-        find_global \$P1, "BASICARR"
+        get_global \$P1, "BASICARR"
         \$P1["$var$seg"]= \$P3
-        store_global "BASICARR", \$P1
+        set_global "BASICARR", \$P1
         #
 DIMARR
         if ( $syms[NEXT] eq "," ) {
@@ -1395,9 +1395,9 @@
             $arrays{"${_}${seg}"} = 1;
             push @{ $code{$seg}->{code} }, <<PUSHARR;
         .param pmc array_$englishname
-        find_global \$P1, "BASICARR"
+        get_global \$P1, "BASICARR"
         \$P1["${_}$seg"]= array_$englishname
-        store_global "BASICARR", \$P1
+        set_global "BASICARR", \$P1
 PUSHARR
 
             # push @{$code{$seg}->{args}}, $_;
@@ -1532,8 +1532,8 @@
 sub parse_data_setup {
     push @{ $code{_data}->{code} }, <<DATAPREP;
         # Prepare the Read/Data stuff
-        find_global \$P1, "RESTOREINFO"
-        find_global \$P2, "READDATA"
+        get_global \$P1, "RESTOREINFO"
+        get_global \$P2, "READDATA"
 DATAPREP
     my $counter = 0;
     foreach my $ld (@data) {
@@ -1551,8 +1551,8 @@
     }
 
     push @{ $code{_data}->{code} }, <<DATADONE;
-        store_global "RESTOREINFO", \$P1
-        store_global "READDATA", \$P2
+        set_global "RESTOREINFO", \$P1
+        set_global "READDATA", \$P2
 DATADONE
 }
 

Modified: trunk/languages/BASIC/compiler/RT_aggregates.pir
==============================================================================
--- trunk/languages/BASIC/compiler/RT_aggregates.pir	(original)
+++ trunk/languages/BASIC/compiler/RT_aggregates.pir	Sat Jan 10 21:53:17 2009
@@ -10,7 +10,7 @@
 
 	.local string key
 	.local pmc BASICARR
-	find_global BASICARR, "BASICARR"
+	get_global BASICARR, "BASICARR"
 	key = _ARRAY_BUILDKEY(keycount,things)
 	$P0 = BASICARR[array]
 	if key != "" goto ARR_NORMAL
@@ -28,7 +28,7 @@
 
 	.local string key
 	.local pmc BASICARR
-	find_global BASICARR, "BASICARR"
+	get_global BASICARR, "BASICARR"
 	key = _ARRAY_BUILDKEY(keycount, things)
 	$P0 = BASICARR[array]
 	if key != "" goto ARR_NORMAL
@@ -55,13 +55,13 @@
 	if rhs_type == .String goto ASSIGN_STRING
 	.local string key
 	.local pmc BASICARR
-	BASICARR = find_global "BASICARR"
+	BASICARR = get_global "BASICARR"
 
 	key = _ARRAY_BUILDKEY(keycount,things)
 	$P1 = BASICARR[array]
 	$P0 =  $P1["hash"]
 	$P0[key] = rhs
-	store_global "BASICARR", BASICARR
+	set_global "BASICARR", BASICARR
 	goto END_ASSIGN
 
 	# Assign a string
@@ -70,13 +70,13 @@
 
 	.local string key
 	.local pmc BASICARR
-	find_global BASICARR, "BASICARR"
+	get_global BASICARR, "BASICARR"
 
 	key = _ARRAY_BUILDKEY(keycount, things)
 	$P1 =  BASICARR[array]
 	$P0 = $P1["hash"]
 	$P0[key] = rhs
-	store_global "BASICARR", BASICARR
+	set_global "BASICARR", BASICARR
 	goto END_ASSIGN
 
 	# Assign a... well, we dunno WTF this is.
@@ -84,7 +84,7 @@
 	#ne I3, 1, ASSIGN_ERR (handled by calling conventions now)
 	.local string key
 	.local pmc BASICARR
-	find_global BASICARR, "BASICARR"
+	get_global BASICARR, "BASICARR"
 	key = _ARRAY_BUILDKEY(keycount,things)
 	$P1 = BASICARR[array]
 	$P0 = $P1["hash"]
@@ -109,7 +109,7 @@
 	#goto END_UNK
 
 END_UNK:
-	store_global "BASICARR", BASICARR
+	set_global "BASICARR", BASICARR
 	goto END_ASSIGN
 
 ASSIGN_ERR:
@@ -119,7 +119,7 @@
 
 END_ASSIGN:
 	# Temporary, needed only until Hash->keys() gets implemented
-	find_global BASICARR, "BASICARR"
+	get_global BASICARR, "BASICARR"
 	$P1 = BASICARR[array]
 	$P0 = $P1["index"]
 	.local int i
@@ -134,7 +134,7 @@
 	$P0[i]=key
 	$P1["index"]=$P0
 	BASICARR[array]=$P1
-	store_global "BASICARR", BASICARR
+	set_global "BASICARR", BASICARR
 REALEND:
 	noop
 .end
@@ -148,7 +148,7 @@
 	.local pmc TARGARR
 	.local pmc TARGINDEX
 	.local int i
-	find_global BASICARR, "BASICARR"
+	get_global BASICARR, "BASICARR"
 	$P0=BASICARR[source]
 	SRCINDEX=$P0["index"]
 	$P0=BASICARR[target]
@@ -176,13 +176,13 @@
 #	.param string rhs
 #	.local string key
 #	.local pmc BASICARR
-#	find_global BASICARR, "BASICARR"
+#	get_global BASICARR, "BASICARR"
 
 #	key = _ARRAY_BUILDKEY()   # Will absorb rest of arguments.
 #	set $P0, BASICARR[array]
 #	set $P0[key], rhs
 #
-#	store_global "BASICARR", BASICARR
+#	set_global "BASICARR", BASICARR
 #.end
 # These are probably defined somewhere, I can't find them.
 

Modified: trunk/languages/BASIC/compiler/RT_builtins.pir
==============================================================================
--- trunk/languages/BASIC/compiler/RT_builtins.pir	(original)
+++ trunk/languages/BASIC/compiler/RT_builtins.pir	Sat Jan 10 21:53:17 2009
@@ -27,7 +27,7 @@
         # XXX Used to use entrytype.  our naive fix here will eventually
 	#   fail, because of the two variable type arguments.
 
-	$P0 = find_global "PRINTCOL"
+	$P0 = get_global "PRINTCOL"
 	PRINTCOL = $P0["value"]
 
 	buf = ""
@@ -85,7 +85,7 @@
 	goto NEXT
 END_DISPLAY:
 	$P0["value"] = PRINTCOL
-	store_global "PRINTCOL", $P0
+	set_global "PRINTCOL", $P0
 	print buf
 	.return(buf)
 DISPERR:
@@ -245,7 +245,7 @@
 .sub _BUILTIN_RND	# num rnd([num seed])
 	.param int argc
 	.local int RANDSEED
-	find_global $P0, "RANDSEED"
+	get_global $P0, "RANDSEED"
 	set RANDSEED, $P0["value"]
 	eq argc, 0, RND_GEN
 	.local num repeat
@@ -264,7 +264,7 @@
 RND_BAIL:
 
 	set $P0["value"], RANDSEED
-	store_global "RANDSEED", $P0
+	set_global "RANDSEED", $P0
 
 	.return($N0)
 .end
@@ -430,7 +430,7 @@
 	.param int argc
 	.param num cols
 	.local int PRINTCOL
-	find_global $P0, "PRINTCOL"
+	get_global $P0, "PRINTCOL"
 	set PRINTCOL, $P0["value"]
 
 	set $I0, cols

Modified: trunk/languages/BASIC/compiler/RT_debugger.pir
==============================================================================
--- trunk/languages/BASIC/compiler/RT_debugger.pir	(original)
+++ trunk/languages/BASIC/compiler/RT_debugger.pir	Sat Jan 10 21:53:17 2009
@@ -1,7 +1,7 @@
 .sub _DEBUGGER_STOP_FOR_REAL	# void Debugger_stop(int line, Hash local_values)
 	.param int line
 	.param pmc locals
-	find_global $P25, "DEBUGGER"
+	get_global $P25, "DEBUGGER"
 
 	set $P0, $P25["code"]
 	set $S0, $P0[line]
@@ -199,7 +199,7 @@
 	ret
 
 DEBUGGER_DONE:
-	store_global "DEBUGGER", $P25
+	set_global "DEBUGGER", $P25
 	ret
 .end
 

Modified: trunk/languages/BASIC/compiler/RT_initialize.pir
==============================================================================
--- trunk/languages/BASIC/compiler/RT_initialize.pir	(original)
+++ trunk/languages/BASIC/compiler/RT_initialize.pir	Sat Jan 10 21:53:17 2009
@@ -4,24 +4,24 @@
 .const int VALUE = 1
 .sub _main :main
 	$P0 = new 'Hash'
-	store_global "BASICARR", $P0
+	set_global "BASICARR", $P0
 	$P0 = new 'ResizablePMCArray'
-	store_global "READDATA", $P0
+	set_global "READDATA", $P0
 	$P0 = new 'Hash'
-	store_global "RESTOREINFO", $P0
+	set_global "RESTOREINFO", $P0
 	$P0=new 'Hash'
 	$P0["value"]=0
-	store_global "READPOINTER", $P0
+	set_global "READPOINTER", $P0
 	$P0=new 'Hash'
 	$P0["value"]=20021107
-	store_global "RANDSEED", $P0
+	set_global "RANDSEED", $P0
 	$P0=new 'Hash'
 	$P0["value"]=0
-	store_global "PRINTCOL", $P0
+	set_global "PRINTCOL", $P0
 	$P0=new 'Hash'
-	store_global "DEBUGGER", $P0
+	set_global "DEBUGGER", $P0
 	$P0=new 'Hash'
-	store_global "COMMON", $P0
+	set_global "COMMON", $P0
 	$P0=new 'ResizablePMCArray'
 	fdopen $P1, 0, "r"	# STDIN and friends...
         $P1 = getstdin
@@ -32,7 +32,7 @@
 	$P0[1]=$P1
         $P1 = getstderr
 	$P0[2]=$P1
-	store_global "FDS", $P0
+	set_global "FDS", $P0
 
 	_data()
 	_platform_setup()

Modified: trunk/languages/BASIC/compiler/RT_io.pir
==============================================================================
--- trunk/languages/BASIC/compiler/RT_io.pir	(original)
+++ trunk/languages/BASIC/compiler/RT_io.pir	Sat Jan 10 21:53:17 2009
@@ -8,7 +8,7 @@
 	.param int fd
 	ne fd, 0, NORESET
 	_line_read()
-NORESET:find_global $P0, "FDS"
+NORESET:get_global $P0, "FDS"
 	$P1=$P0[fd]
 	set $S0, ""
 	read $S0, $P1, numchar
@@ -27,14 +27,14 @@
 	print " in open\n"
 	end
 OPEN_OK:
-	find_global $P0, "FDS"
+	get_global $P0, "FDS"
 	$P0[fd]=$P1
-	store_global "FDS", $P0
+	set_global "FDS", $P0
 .end
 .sub _CLOSE		# void close(int fd)
 	.param int fd
 	.local int error
-	find_global $P0, "FDS"
+	get_global $P0, "FDS"
 	set $P1, $P0[fd]
 	close $P1
 	err error
@@ -44,21 +44,21 @@
 	print " in close\n"
 	end
 CLOSE_OK:
-	store_global "FDS", $P0
+	set_global "FDS", $P0
 .end
 .sub _WRITE		# void writestring(int fd, 1, string stuff)
 	.param int fd
 	.local string buffer
 	.local int oldprintcol
 
-	find_global $P1, "PRINTCOL"
+	get_global $P1, "PRINTCOL"
 	oldprintcol=$P1["value"]
 	buffer = _BUILTIN_DISPLAY(fd, buffer) #_WORK()
-	find_global $P1, "PRINTCOL"
+	get_global $P1, "PRINTCOL"
 	$P1["value"]=oldprintcol
-	store_global "PRINTCOL", $P1
+	set_global "PRINTCOL", $P1
 
-	find_global $P0, "FDS"
+	get_global $P0, "FDS"
 	set $P1, $P0[fd]
 	print $P1, buffer
 .end
@@ -74,7 +74,7 @@
 #        #       I0   Error?
 .sub _READLINE		# string readline(int fd)
 	.param int fd
-	$P0 = find_global "FDS"
+	$P0 = get_global "FDS"
 	$P1 = $P0[fd]
 	$S0 = readline $P1
 	.return($S0)

Modified: trunk/languages/BASIC/compiler/RT_platform.pir
==============================================================================
--- trunk/languages/BASIC/compiler/RT_platform.pir	(original)
+++ trunk/languages/BASIC/compiler/RT_platform.pir	Sat Jan 10 21:53:17 2009
@@ -19,9 +19,9 @@
 END:	noop
 .end
 .sub _screen_clear
-	find_global $P0, "PRINTCOL"
+	get_global $P0, "PRINTCOL"
 	set $P0["value"], 0
-	store_global "PRINTCOL", $P0
+	set_global "PRINTCOL", $P0
 	sysinfo S0, .SYSINFO_PARROT_OS
 	ne S0, "MSWin32", NOTWIN
 	_win32_screen_clear()

Modified: trunk/languages/BASIC/compiler/RT_platform_ANSIscreen.pir
==============================================================================
--- trunk/languages/BASIC/compiler/RT_platform_ANSIscreen.pir	(original)
+++ trunk/languages/BASIC/compiler/RT_platform_ANSIscreen.pir	Sat Jan 10 21:53:17 2009
@@ -28,7 +28,7 @@
 	$P0[5]= MAGENTA
 	$P0[6]= YELLOW
 	$P0[7]= WHITE
-	store_global "ANSI_fgcolors", $P0
+	set_global "ANSI_fgcolors", $P0
 
 	$P0=new 'ResizablePMCArray'
 	$P0[0]= BLACK
@@ -47,11 +47,11 @@
 	$P0[13]= MAGENTA
 	$P0[14]= YELLOW
 	$P0[15]= 8
-	store_global "ANSI_bgcolors", $P0
+	set_global "ANSI_bgcolors", $P0
 
 	$P0=new 'Hash'
 	$P0["value"]=0
-	store_global "scankey", $P0
+	set_global "scankey", $P0
 .end
 
 .sub _ansi_screen_clear
@@ -106,7 +106,7 @@
 #	# foreground in I0
 #	# background in I1
 	print "[0;"
-	find_global $P0, "ANSI_fgcolors"
+	get_global $P0, "ANSI_fgcolors"
 	lt fore, 8, ANSI_FG
 	sub fore, fore, 8
 	print "1;"	# Turn on high intensity
@@ -118,7 +118,7 @@
 
 	# Background
 ANSI_BG:
-	$P0 = find_global "ANSI_bgcolors"
+	$P0 = get_global "ANSI_bgcolors"
 	$I3 = $P0[back]
 	print "4"
 	print $I3
@@ -155,14 +155,14 @@
 
 	ioctl(0, TCSETAF, $P10)
 
-	store_global "ioctl_mode", $P9
+	set_global "ioctl_mode", $P9
 .end
 
 .sub _set_echo_nocbreak
 	$P1 = loadlib ""
 	.local pmc ioctl
 	ioctl = dlfunc $P1, "ioctl", "iiip"
-	$P9 = find_global "ioctl_mode"
+	$P9 = get_global "ioctl_mode"
 
 	ioctl(0, TCSETAF, $P9)
 .end
@@ -184,11 +184,11 @@
 
 	$P0=new 'Hash'
 	$P0["value"]= old_value
-	store_global "fcntl_mode", $P0
+	set_global "fcntl_mode", $P0
 .end
 
 .sub _unset_nonblock	# void _unset_nonblock
-	$P0 = find_global "fcntl_mode"
+	$P0 = get_global "fcntl_mode"
 	$I11= $P0["value"]
 	$P1 = loadlib ""
 	.local pmc fcntl
@@ -198,23 +198,23 @@
 .end
 
 .sub _TERMIO_scankey
-	find_global $P0, "scankey"
+	get_global $P0, "scankey"
 	I0= $P0["value"]
 	eq I0, 1, END
 	_set_noecho_cbreak()
 END:
 	$P0["value"]= 1
-	store_global "scankey", $P0
+	set_global "scankey", $P0
 .end
 
 .sub _TERMIO_normal
-	find_global $P0, "scankey"
+	get_global $P0, "scankey"
 	I0= $P0["value"]
 	eq I0, 0, END
 	_set_echo_nocbreak()
 END:
 	$P0["value"]= 0
-	store_global "scankey", $P0
+	set_global "scankey", $P0
 .end
 
 # For now, uses TERMIO calls directly and assumes you're on a

Modified: trunk/languages/BASIC/compiler/RT_platform_win32.pir
==============================================================================
--- trunk/languages/BASIC/compiler/RT_platform_win32.pir	(original)
+++ trunk/languages/BASIC/compiler/RT_platform_win32.pir	Sat Jan 10 21:53:17 2009
@@ -10,28 +10,28 @@
 	set I0, 1
 	set I5, -11
 	invoke
-	store_global "kernel32", P1
-	store_global "Win32handle", P5
+	set_global "kernel32", P1
+	set_global "Win32handle", P5
 	set I0, 1
 	set I5, -10
 	invoke
-	store_global "Win32Inputhandle", P5
+	set_global "Win32Inputhandle", P5
 	$P0= new 'Hash'
-	store_global "Win32console", $P0
+	set_global "Win32console", $P0
 	_WIN32_CONSOLE_INFO()
 .end
 .sub _win32_shutdown			# void win32_shutdown(void)
 .end
 .sub _WIN32_CONSOLE_INFO		# void WIN32_CONSOLE_INFO(void)
-	find_global P1, "kernel32"
+	get_global P1, "kernel32"
 	dlfunc P0, P1, "GetConsoleScreenBufferInfo", "ipp"
-	find_global P5, "Win32handle"
+	get_global P5, "Win32handle"
 	P6=new 'ManagedStruct'
 	set P6, SIZEOF_CONSOLE_SCREEN_BUFFER_INFO
 	set I0, 1
 	invoke
 	set P5, P6
-	find_global P0, "Win32console"
+	get_global P0, "Win32console"
 
 	$I1 = _UMS_GET_SHORT(0,P5) # 0==dwSize.X
 	set P0["xbuf"], $I1
@@ -65,20 +65,20 @@
 	_WIN32_CONSOLE_HOME()
 .end
 .sub _WIN32_CONSOLE_HOME	# void Win32_console_home(void)
-	find_global P2, "kernel32"
+	get_global P2, "kernel32"
 	dlfunc P0, P2, "SetConsoleCursorPosition", "ipi"
 	set I0, 1
-	find_global P5, "Win32handle"
+	get_global P5, "Win32handle"
 	set I5, 0
 	invoke
 .end
 
 .sub _WIN32_CONSOLE_CLEAR	# void Win32_console_clear(void)
-	find_global P1, "Win32console"
-	find_global P2, "kernel32"
+	get_global P1, "Win32console"
+	get_global P2, "kernel32"
 	dlfunc P0, P2, "FillConsoleOutputCharacterA", "ipcilp"
 	set I0, 1
-	find_global P5, "Win32handle"
+	get_global P5, "Win32handle"
 	P6=new 'ManagedStruct'
 	set P6, SIZEOF_DWORD
 	set I5, 32			# Char (space)
@@ -91,7 +91,7 @@
 	# in effect.
 	dlfunc P0, P2, "FillConsoleOutputAttribute", "ipiilp"
 	set I0, 1
-	find_global P5, "Win32handle"
+	get_global P5, "Win32handle"
 	P6= new 'ManagedStruct'
 	set P6, SIZEOF_DWORD
 	set I5, P1["attr"]		# Attrib
@@ -105,12 +105,12 @@
 	_WIN32_CONSOLE_INFO()
 .end
 .sub _WIN32_SCREEN_GETXCUR		# int win32_screen_getxcur(void)
-	find_global P1, "Win32console"
+	get_global P1, "Win32console"
 	set $I0, P1["curx"]
 	.return($I0)
 .end
 .sub _WIN32_SCREEN_GETYCUR		# int win32_screen_getycur(void)
-	find_global P1, "Win32console"
+	get_global P1, "Win32console"
 	set $I0, P1["cury"]
 	.return($I0)
 .end
@@ -136,11 +136,11 @@
 	set I5, x
 	shl I5, I5, 16
 	add I5, I5, y
-	find_global P1, "Win32console"
-	find_global P2, "kernel32"
+	get_global P1, "Win32console"
+	get_global P2, "kernel32"
 	dlfunc P0, P2, "SetConsoleCursorPosition", "ipi"
 	set I0, 1
-	find_global P5, "Win32handle"
+	get_global P5, "Win32handle"
 	invoke
 .end
 
@@ -178,9 +178,9 @@
 	.param int back
 	shl I5, back, 4
 	add I5, I5, fore
-	find_global P2, "kernel32"
+	get_global P2, "kernel32"
 	dlfunc P0, P2, "SetConsoleTextAttribute", "ipi"
-	find_global P5, "Win32handle"
+	get_global P5, "Win32handle"
 	set I0, 1
 	invoke
 	_WIN32_CONSOLE_INFO()  # refresh this.
@@ -192,16 +192,16 @@
 .sub _WIN32_INKEY	# string Win32_inkey(void)
 	set S0, ""
 	set I9, 0
-	find_global P1, "kernel32"
+	get_global P1, "kernel32"
 	dlfunc P0, P1, "SetConsoleMode", "ipi"
 	set I0, 1
-	find_global P5, "Win32Inputhandle"
+	get_global P5, "Win32Inputhandle"
 	set I5, 0
 	invoke
 INKEY:
 	dlfunc P9, P1,  "PeekConsoleInputA",  "ippip"
         dlfunc P10, P1, "ReadConsoleInputA", "ippip"
-	find_global P5, "Win32Inputhandle"
+	get_global P5, "Win32Inputhandle"
 	P6=new 'ManagedStruct'
 	P7=new 'ManagedStruct'
 	set P6, INPUT_BUFFER
@@ -245,7 +245,7 @@
 	inc I5
 	set P0, P10	# ReadConsoleInput
         set I0, 1
-	find_global P5, "Win32Inputhandle"
+	get_global P5, "Win32Inputhandle"
 	invoke
 	branch END
 

Modified: trunk/languages/BASIC/compiler/RT_support.pir
==============================================================================
--- trunk/languages/BASIC/compiler/RT_support.pir	(original)
+++ trunk/languages/BASIC/compiler/RT_support.pir	Sat Jan 10 21:53:17 2009
@@ -27,8 +27,8 @@
 .sub _READ		# ResizablePMCArray READ(void)
 	.local pmc READDATA
 	.local int READPOINTER
-	find_global READDATA, "READDATA"
-	find_global $P0, "READPOINTER"
+	get_global READDATA, "READDATA"
+	get_global $P0, "READPOINTER"
 	set READPOINTER, $P0["value"]
 
 	set $I0, READDATA
@@ -39,7 +39,7 @@
 	inc READPOINTER
 
 	set $P0["value"], READPOINTER
-	store_global "READPOINTER", $P0
+	set_global "READPOINTER", $P0
 
 	.return($S1)
 ERR_READ:
@@ -50,14 +50,14 @@
 	.param string where
 	.local int READPOINTER
 	.local pmc RESTOREINFO
-	find_global RESTOREINFO, "RESTOREINFO"
-	find_global $P0, "READPOINTER"
+	get_global RESTOREINFO, "RESTOREINFO"
+	get_global $P0, "READPOINTER"
 	set READPOINTER, $P0["value"]
 
 	set READPOINTER, RESTOREINFO[where]
 
 	set $P0["value"], READPOINTER
-	store_global "READPOINTER", $P0
+	set_global "READPOINTER", $P0
 .end
 
 .sub _get_little_endian # int get_little_endian(struct, offset, bytes)

Modified: trunk/languages/BASIC/compiler/compile.pl
==============================================================================
--- trunk/languages/BASIC/compiler/compile.pl	(original)
+++ trunk/languages/BASIC/compiler/compile.pl	Sat Jan 10 21:53:17 2009
@@ -93,7 +93,7 @@
     }
     if (@saves) {
         print CODE qq{\t\t# Grab "COMMON" variables from global stash\n};
-        print CODE qq{\t\tfind_global _GLOBALS, "COMMON"\n};
+        print CODE qq{\t\tget_global _GLOBALS, "COMMON"\n};
         foreach (@saves) {
             print CODE qq{\t\t$_=_GLOBALS["$_"]\n};
         }
@@ -111,11 +111,11 @@
                 }
             }
             if (@saves) {
-                $edit .= qq{\tfind_global _GLOBALS, "COMMON"\n};
+                $edit .= qq{\tget_global _GLOBALS, "COMMON"\n};
                 foreach (@saves) {
                     $edit .= qq{\t_GLOBALS["$_"]=$_\n};
                 }
-                $edit .= qq{\tstore_global "COMMON", _GLOBALS\n};
+                $edit .= qq{\tset_global "COMMON", _GLOBALS\n};
             }
             s/#SAVECOMMON/$edit/;
         }
@@ -128,7 +128,7 @@
                 }
             }
             if (@saves) {
-                $edit .= qq{\tfind_global _GLOBALS, "COMMON"\n};
+                $edit .= qq{\tget_global _GLOBALS, "COMMON"\n};
                 foreach (@saves) {
                     $edit .= qq{\t$_=_GLOBALS["$_"]\n};
                 }
@@ -147,11 +147,11 @@
         }
     }
     if (@saves) {
-        print CODE qq{\t\tfind_global _GLOBALS, "COMMON"\n};
+        print CODE qq{\t\tget_global _GLOBALS, "COMMON"\n};
         foreach (@saves) {
             print CODE qq{\t_GLOBALS["$_"]=$_\n};
         }
-        print CODE qq{\t\tstore_global "COMMON", _GLOBALS\n\t};
+        print CODE qq{\t\tset_global "COMMON", _GLOBALS\n\t};
     }
     delete $code{$seg};
     if ( !$debug ) {
@@ -163,7 +163,7 @@
     print CODE<<EOD;
         .sub ${seg}_debug
                 .param int debline
-                find_global \$P0, "DEBUGGER"
+                get_global \$P0, "DEBUGGER"
                 \$I0= \$P0["step"]
                 ne \$I0, 0, DEBUGGER_STOP
                 \$P1= \$P0["break"]
@@ -187,7 +187,7 @@
 .sub _DEBUG_INIT
         saveall
         \$P0=new 'ResizablePMCArray'
-        find_global \$P1, "DEBUGGER"
+        get_global \$P1, "DEBUGGER"
 FOO
     foreach ( 0 .. @main::basic - 1 ) {
         my $line = $main::basic[$_];
@@ -201,7 +201,7 @@
         \$P1["break"]= \$P0  # Breakpoints
         \$P0=new 'ResizablePMCArray'
         \$P1["watch"]= \$P0  # Watch
-        store_global "DEBUGGER", \$P1
+        set_global "DEBUGGER", \$P1
 .end
 FOO
 }



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About