mirror of
https://github.com/irmen/prog8.git
synced 2025-01-11 13:29:45 +00:00
comment about builtin function call ast node type
This commit is contained in:
parent
70a2b11271
commit
ea3871d0c4
@ -1,5 +1,4 @@
|
|||||||
%import syslib
|
%import syslib
|
||||||
%import textio
|
|
||||||
|
|
||||||
; Bitmap pixel graphics module for the CommanderX16
|
; Bitmap pixel graphics module for the CommanderX16
|
||||||
; Wraps the graphics functions that are in ROM.
|
; Wraps the graphics functions that are in ROM.
|
||||||
@ -35,7 +34,7 @@ graphics {
|
|||||||
sub disable_bitmap_mode() {
|
sub disable_bitmap_mode() {
|
||||||
; enables text mode, erase the text screen, color white
|
; enables text mode, erase the text screen, color white
|
||||||
void cx16.screen_mode(0, false)
|
void cx16.screen_mode(0, false)
|
||||||
txt.clear_screen()
|
cbm.CHROUT(147)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1272,11 +1272,15 @@ internal class AstChecker(private val program: Program,
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun visit(bfc: BuiltinFunctionCall) {
|
override fun visit(bfc: BuiltinFunctionCall) {
|
||||||
|
// most function calls, even to builtin functions, are still regular FunctionCall nodes here.
|
||||||
|
// they get converted to the more specialized node type in BeforeAsmTypecastCleaner
|
||||||
checkLongType(bfc)
|
checkLongType(bfc)
|
||||||
super.visit(bfc)
|
super.visit(bfc)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun visit(functionCallStatement: FunctionCallStatement) {
|
override fun visit(functionCallStatement: FunctionCallStatement) {
|
||||||
|
// most function calls, even to builtin functions, are still regular FunctionCall nodes here.
|
||||||
|
// they get converted to the more specialized node type in BeforeAsmTypecastCleaner
|
||||||
val targetStatement = functionCallStatement.target.checkFunctionOrLabelExists(program, functionCallStatement, errors)
|
val targetStatement = functionCallStatement.target.checkFunctionOrLabelExists(program, functionCallStatement, errors)
|
||||||
if(targetStatement!=null) {
|
if(targetStatement!=null) {
|
||||||
checkFunctionCall(targetStatement, functionCallStatement.args, functionCallStatement.position)
|
checkFunctionCall(targetStatement, functionCallStatement.args, functionCallStatement.position)
|
||||||
|
@ -168,6 +168,7 @@ class TestCompilerOnExamplesBothC64andCx16: FunSpec({
|
|||||||
"cube3d-gfx",
|
"cube3d-gfx",
|
||||||
"dirlist",
|
"dirlist",
|
||||||
"fibonacci",
|
"fibonacci",
|
||||||
|
"fractal-tree",
|
||||||
"line-circle-gfx",
|
"line-circle-gfx",
|
||||||
"line-circle-txt",
|
"line-circle-txt",
|
||||||
"maze",
|
"maze",
|
||||||
|
@ -14,7 +14,6 @@ Future Things and Ideas
|
|||||||
|
|
||||||
- Add a new SublimeText syntax file for prog8, and also install this for bat: https://github.com/sharkdp/bat?tab=readme-ov-file#adding-new-syntaxes--language-definitions
|
- Add a new SublimeText syntax file for prog8, and also install this for bat: https://github.com/sharkdp/bat?tab=readme-ov-file#adding-new-syntaxes--language-definitions
|
||||||
- callfar() should allow setting an argument in the X register as well?
|
- callfar() should allow setting an argument in the X register as well?
|
||||||
- AST weirdness: why is call(...) a normal FunctionCallStatement and not a BuiltinFunctionCall? What does ror() produce for instance?
|
|
||||||
- Can we support signed % (remainder) somehow?
|
- Can we support signed % (remainder) somehow?
|
||||||
- Don't add "random" rts to %asm blocks but instead give a warning about it? (but this breaks existing behavior that others already depend on... command line switch? block directive?)
|
- Don't add "random" rts to %asm blocks but instead give a warning about it? (but this breaks existing behavior that others already depend on... command line switch? block directive?)
|
||||||
- IR: implement missing operators in AssignmentGen (array shifts etc)
|
- IR: implement missing operators in AssignmentGen (array shifts etc)
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
main {
|
main {
|
||||||
sub start() {
|
sub start() {
|
||||||
word x1 = -118
|
word @shared x1 = -118
|
||||||
floats.print(x1 as float)
|
floats.print(x1 as float)
|
||||||
txt.nl()
|
txt.nl()
|
||||||
floats.print(x1 as float/1.9)
|
floats.print(x1 as float/1.9)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user