check number of locals and parameters
This commit is contained in:
parent
ea2c86ef0c
commit
b2824fe796
|
@ -1 +1 @@
|
||||||
static char Version[] = "ACK Modula-2 compiler Version 0.28";
|
static char Version[] = "ACK Modula-2 compiler Version 0.29";
|
||||||
|
|
|
@ -399,6 +399,9 @@ proc_type(result_type, parameters, n_bytes_params)
|
||||||
|
|
||||||
tp->prc_params = parameters;
|
tp->prc_params = parameters;
|
||||||
tp->prc_nbpar = n_bytes_params;
|
tp->prc_nbpar = n_bytes_params;
|
||||||
|
if (! fit(n_bytes_params, (int) word_size)) {
|
||||||
|
error("maximum parameter byte count exceeded");
|
||||||
|
}
|
||||||
return tp;
|
return tp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -339,6 +339,9 @@ WalkProcedure(procedure)
|
||||||
C_ret(func_res_size);
|
C_ret(func_res_size);
|
||||||
if (! options['n']) WalkDefList(sc->sc_def, RegisterMessage);
|
if (! options['n']) WalkDefList(sc->sc_def, RegisterMessage);
|
||||||
C_end(-sc->sc_off);
|
C_end(-sc->sc_off);
|
||||||
|
if (! fit(sc->sc_off, (int) word_size)) {
|
||||||
|
node_error(procedure->prc_body, "maximum local byte count exceeded");
|
||||||
|
}
|
||||||
TmpClose();
|
TmpClose();
|
||||||
CurrVis = savevis;
|
CurrVis = savevis;
|
||||||
proclevel--;
|
proclevel--;
|
||||||
|
|
Loading…
Reference in a new issue