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

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

From:
coke
Date:
January 10, 2009 22:13
Subject:
[svn:parrot] r35387 - trunk/languages/BASIC/compiler
Message ID:
20090111061324.93739CB9F9@x12.develooper.com
Author: coke
Date: Sat Jan 10 22:13:23 2009
New Revision: 35387

Modified:
   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_platform.pir
   trunk/languages/BASIC/compiler/RT_platform_ANSIscreen.pir

Log:
[BASIC] - can't use PASM-style registers in PIR anymore; pioctl opcode has been removed; must use .tailcall instead of .return



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 22:13:23 2009
@@ -298,7 +298,7 @@
 	.param string full
 	.param string substring
 
-	.return _BUILTIN_INSTR(argc,1.0,full,substring)
+	.tailcall _BUILTIN_INSTR(argc,1.0,full,substring)
 .end
 
 .sub _BUILTIN_UCASE_STRING	# string ucase$(string targ)

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 22:13:23 2009
@@ -34,7 +34,7 @@
 	add $I0, $I0, $I1
 	eq $I0, 0, DEBUGGER_COMMAND  # If no step mode, and no input, re-prompt
 
-	$P1 = _SPLITLINE($S0,1)	# P1 will have array of values
+	$P1 = _SPLITLINE($S0,1)	# $P1 will have array of values
 
 	set $I0, $P1
 	add $I0, $I0, $I1
@@ -143,18 +143,18 @@
 
 
 DEBUG_CLEAR:
-	set P0, P25["watch"]
-	set I0, P0
-        eq I0, 0, DEBUG_CLEAREND
-        set I1, 0
+	set $P0, $P25["watch"]
+	set $I0, $P0
+        eq $I0, 0, DEBUG_CLEAREND
+        set $I1, 0
 DEBUG_CLEARLOOP:
-        eq I1, I0, DEBUG_CLEAREND
-        set S1, P0[I1]
-        eq S1, S0, DEBUG_CLEARBLANK
-        inc I1
+        eq $I1, $I0, DEBUG_CLEAREND
+        set $S1, $P0[$I1]
+        eq $S1, $S0, DEBUG_CLEARBLANK
+        inc $I1
         branch DEBUG_CLEARLOOP
 DEBUG_CLEARBLANK:
-        set P0[I1], ""
+        set $P0[$I1], ""
         branch DEBUG_CLEAREND
 DEBUG_CLEAREND:
         ret

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 22:13:23 2009
@@ -28,7 +28,7 @@
 	$P0[0]=$P1
         $P1 = getstdout
 	#Don't buffer stdout...
-        $I0 = pioctl $P1, 3, 0
+        $P1.'buffer_type'('unbuffered')
 	$P0[1]=$P1
         $P1 = getstderr
 	$P0[2]=$P1

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 22:13:23 2009
@@ -3,16 +3,16 @@
 .include "sysinfo.pasm"
 
 .sub _platform_setup		# void platform_setup(void)
-	sysinfo S0, .SYSINFO_PARROT_OS
-	ne S0, "MSWin32", NOTWIN
+	sysinfo $S0, .SYSINFO_PARROT_OS
+	ne $S0, "MSWin32", NOTWIN
 	_win32_setup()
 	branch END
 NOTWIN: _ansi_setup()
 END:	noop
 .end
 .sub _platform_shutdown
-	sysinfo S0, .SYSINFO_PARROT_OS
-	ne S0, "MSWin32", NOTWIN
+	sysinfo $S0, .SYSINFO_PARROT_OS
+	ne $S0, "MSWin32", NOTWIN
 	_win32_shutdown()
 	branch END
 NOTWIN: _ansi_shutdown()
@@ -22,8 +22,8 @@
 	get_global $P0, "PRINTCOL"
 	set $P0["value"], 0
 	set_global "PRINTCOL", $P0
-	sysinfo S0, .SYSINFO_PARROT_OS
-	ne S0, "MSWin32", NOTWIN
+	sysinfo $S0, .SYSINFO_PARROT_OS
+	ne $S0, "MSWin32", NOTWIN
 	_win32_screen_clear()
 	branch END
 NOTWIN: _ansi_screen_clear()
@@ -31,18 +31,18 @@
 .end
 
 #SCREEN_SETXCUR:
-#	set I1, P6[.VALUE]
-#	sysinfo S0, .SYSINFO_PARROT_OS
-#	eq S0, "MSWin32", WIN32_SCREEN_SETXCUR
+#	set $I1, $P6[.VALUE]
+#	sysinfo $S0, .SYSINFO_PARROT_OS
+#	eq $S0, "MSWin32", WIN32_SCREEN_SETXCUR
 #	branch ANSI_SCREEN_SETXCUR
 #
 #SCREEN_SETYCUR:
-#	set I1, P6[.VALUE]
-#	sysinfo S0, .SYSINFO_PARROT_OS
-#	eq S0, "MSWin32", WIN32_SCREEN_SETYCUR
+#	set $I1, $P6[.VALUE]
+#	sysinfo $S0, .SYSINFO_PARROT_OS
+#	eq $S0, "MSWin32", WIN32_SCREEN_SETYCUR
 #	branch ANSI_SCREEN_SETYCUR
 #
-#	# X in P7, Y in P6
+#	# X in $P7, Y in $P6
 .sub _screen_locate		# void screen_locate(float x, float y)
 	.param num xf
 	.param num yf

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 22:13:23 2009
@@ -75,22 +75,22 @@
 
 ## These don't work exactly right.  ANSI would require that I send
 ## \e[6n and read the input stream for a \e[row;colR reply from the
-## terminal.  I *really* can't do that until IO is fixed, because STDIN
+## terminal.  I *really* can't do that until $IO is fixed, because STDIN
 ## is line-buffered and asking the user to press return after each cursor
 ## positioning is lame.
 #ANSI_SCREEN_SETXCUR:
 #	print "\e[;"
-#	print I1
+#	print $I1
 #	print "H"
 #	ret
 #
 #ANSI_SCREEN_SETYCUR:
 #	print "\e["
-#	print I1
+#	print $I1
 #	print ";H"
 #	ret
 #
-#	# I0,I1
+#	# $I0,$I1
 #	# QB origin is 1,1
 
 ## QB.exe
@@ -103,8 +103,8 @@
 	.param int fore
 	.param int back
 	print "\e"
-#	# foreground in I0
-#	# background in I1
+#	# foreground in $I0
+#	# background in $I1
 	print "[0;"
 	get_global $P0, "ANSI_fgcolors"
 	lt fore, 8, ANSI_FG
@@ -168,7 +168,7 @@
 .end
 
 .sub _set_nonblock	# void _set_nonblock
-	I11= 0
+	$I11= 0
 	$P1 = loadlib ""
 	.local pmc fcntl
 	fcntl = dlfunc $P1, "fcntl", "iiii"
@@ -178,7 +178,7 @@
 
 	fcntl = dlfunc $P1, "fcntl", "iiil"
 
-	$I7 = bor I5, 2048  # O_NONBLOCK 04000
+	$I7 = bor $I5, 2048  # O_NONBLOCK 04000
 	#invoke		# nmode=fcntl(0, F_SETFL, mode | O_NONBLOCK)
 	fcntl(STDIN, F_SETFL, $I7)
 
@@ -199,8 +199,8 @@
 
 .sub _TERMIO_scankey
 	get_global $P0, "scankey"
-	I0= $P0["value"]
-	eq I0, 1, END
+	$I0= $P0["value"]
+	eq $I0, 1, END
 	_set_noecho_cbreak()
 END:
 	$P0["value"]= 1
@@ -209,8 +209,8 @@
 
 .sub _TERMIO_normal
 	get_global $P0, "scankey"
-	I0= $P0["value"]
-	eq I0, 0, END
+	$I0= $P0["value"]
+	eq $I0, 0, END
 	_set_echo_nocbreak()
 END:
 	$P0["value"]= 0



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