Don't use SF_TRAMPOLINE, change symbol references instead.

In smart mode, use RTL instead of RTS if the enclosing .PROC is far.
More address size changes.


git-svn-id: svn://svn.cc65.org/cc65/trunk@2696 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
cuz
2003-11-29 07:53:26 +00:00
parent 05f3f154a9
commit c5cc4e1536
12 changed files with 365 additions and 390 deletions

View File

@@ -534,11 +534,31 @@ static ExprNode* Function (ExprNode* (*F) (void))
static ExprNode* Symbol (SymEntry* S)
/* Reference a symbol and return an expression for it */
{
if (S == 0) {
/* Some weird error happened before */
return GenLiteralExpr (0);
} else {
/* Mark the symbol as referenced */
SymRef (S);
/* Remove the symbol if possible */
if (SymHasExpr (S)) {
return CloneExpr (GetSymExpr (S));
} else {
/* Create symbol node */
return GenSymExpr (S);
}
}
}
static ExprNode* Factor (void)
{
ExprNode* L;
ExprNode* N;
SymEntry* S;
long Val;
switch (Tok) {
@@ -555,24 +575,14 @@ static ExprNode* Factor (void)
case TOK_NAMESPACE:
case TOK_IDENT:
/* Search for the symbol */
S = ParseScopedSymName (SYM_ALLOC_NEW);
if (S == 0) {
/* Some weird error happened before */
N = GenLiteralExpr (0);
} else {
/* Mark the symbol as referenced */
SymRef (S);
/* Remove the symbol if possible */
if (SymHasExpr (S)) {
N = CloneExpr (GetSymExpr (S));
} else {
/* Create symbol node */
N = GenSymExpr (S);
}
}
N = Symbol (ParseScopedSymName (SYM_ALLOC_NEW));
break;
case TOK_LOCAL_IDENT:
N = Symbol (SymFindLocal (SVal, SYM_ALLOC_NEW));
NextTok ();
break;
case TOK_ULABEL:
N = ULabRef (IVal);
NextTok ();