mirror of
https://github.com/dschmenk/PLASMA.git
synced 2025-04-05 03:37:43 +00:00
PLASM compiler patch #1
This commit is contained in:
parent
7f9975c442
commit
b986e1da38
BIN
PLASMA-BLD1.PO
BIN
PLASMA-BLD1.PO
Binary file not shown.
@ -232,6 +232,14 @@ void idglobal_size(int type, int size, int constsize)
|
||||
else if (size)
|
||||
emit_data(0, 0, 0, size);
|
||||
}
|
||||
void idlocal_size(int size)
|
||||
{
|
||||
localsize += size;
|
||||
if (localsize > 255)
|
||||
{
|
||||
parse_error("Local variable size overflow\n");
|
||||
}
|
||||
}
|
||||
int id_tag(char *name, int len)
|
||||
{
|
||||
int i;
|
||||
|
@ -1170,8 +1170,13 @@ int parse_var(int type, long basesize)
|
||||
{
|
||||
if (idlen)
|
||||
id_add(idstr, idlen, type, size);
|
||||
else
|
||||
emit_data(0, 0, 0, size);
|
||||
else if (!(type & EXTERN_TYPE))
|
||||
{
|
||||
if (type & LOCAL_TYPE)
|
||||
idlocal_size(size);
|
||||
else
|
||||
emit_data(0, 0, 0, size);
|
||||
}
|
||||
}
|
||||
return (1);
|
||||
}
|
||||
|
@ -941,8 +941,12 @@ def parse_var(type, basesize)#0
|
||||
else
|
||||
new_iddata(idptr, idlen, type, size)
|
||||
fin
|
||||
elsif not (type & (EXTERN_TYPE|LOCAL_TYPE))
|
||||
emit_fill(size)
|
||||
elsif not type & EXTERN_TYPE
|
||||
if type & LOCAL_TYPE
|
||||
framesize = framesize + size
|
||||
else
|
||||
size_iddata(type, size, 0)
|
||||
fin
|
||||
fin
|
||||
fin
|
||||
end
|
||||
|
@ -411,7 +411,7 @@ include "toolsrc/parse.pla"
|
||||
//
|
||||
// Look at command line arguments and compile module
|
||||
//
|
||||
puts("PLASMA Compiler, Version 1.0\n")
|
||||
puts("PLASMA Compiler, Version 1.01\n")
|
||||
arg = argNext(argFirst)
|
||||
if ^arg and ^(arg + 1) == '-'
|
||||
opt = arg + 2
|
||||
|
@ -46,4 +46,6 @@ int id_tag(char *name, int len);
|
||||
int id_const(char *name, int len);
|
||||
int id_type(char *name, int len);
|
||||
void idglobal_size(int type, int size, int constsize);
|
||||
void idlocal_size(int size);
|
||||
void idlocal_size(int size);
|
||||
int tag_new(int type);
|
||||
|
Loading…
x
Reference in New Issue
Block a user