projects
/
unix-history
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
BSD 4_3_Tahoe release
[unix-history]
/
usr
/
src
/
ucb
/
pascal
/
pdx
/
tree
/
eval.c
diff --git
a/usr/src/ucb/pascal/pdx/tree/eval.c
b/usr/src/ucb/pascal/pdx/tree/eval.c
index
ea0dce7
..
8d18258
100644
(file)
--- a/
usr/src/ucb/pascal/pdx/tree/eval.c
+++ b/
usr/src/ucb/pascal/pdx/tree/eval.c
@@
-1,6
+1,12
@@
-/* Copyright (c) 1982 Regents of the University of California */
+/*
+ * Copyright (c) 1980 Regents of the University of California.
+ * All rights reserved. The Berkeley software License Agreement
+ * specifies the terms and conditions for redistribution.
+ */
-static char sccsid[] = "@(#)eval.c 1.10 2/14/83";
+#ifndef lint
+static char sccsid[] = "@(#)eval.c 5.2 (Berkeley) 4/7/87";
+#endif not lint
/*
* Parse tree evaluation.
/*
* Parse tree evaluation.
@@
-15,6
+21,8
@@
static char sccsid[] = "@(#)eval.c 1.10 2/14/83";
#include "breakpoint.h"
#include "machine.h"
#include "tree.rep"
#include "breakpoint.h"
#include "machine.h"
#include "tree.rep"
+#include "process/process.rep"
+#include "process/pxinfo.h"
#define Boolean char /* underlying representation type for booleans */
#define Boolean char /* underlying representation type for booleans */
@@
-104,12
+112,16
@@
register NODE *p;
len = size(p->nodetype);
mov(p->sconval, sp, len);
sp += len;
len = size(p->nodetype);
mov(p->sconval, sp, len);
sp += len;
+#ifdef tahoe
+ alignstack();
+#endif tahoe
break;
}
case O_INDEX: {
long n; /* base address for array */
long i; /* index - lower bound */
break;
}
case O_INDEX: {
long n; /* base address for array */
long i; /* index - lower bound */
+ long evalindex();
n = pop(long);
i = evalindex(p->left->nodetype, p->right);
n = pop(long);
i = evalindex(p->left->nodetype, p->right);
@@
-136,7
+148,6
@@
register NODE *p;
case O_RVAL: {
ADDRESS addr, len;
case O_RVAL: {
ADDRESS addr, len;
- long i;
addr = pop(long);
if (addr == 0) {
addr = pop(long);
if (addr == 0) {
@@
-290,7
+301,7
@@
register NODE *p;
error("\"%s\" is not a procedure or function", name(b));
}
addr = firstline(b);
error("\"%s\" is not a procedure or function", name(b));
}
addr = firstline(b);
- if (addr == -1) {
+ if (
(int)
addr == -1) {
error("\"%s\" is empty", name(b));
}
skimsource(srcfilename(addr));
error("\"%s\" is empty", name(b));
}
skimsource(srcfilename(addr));
@@
-452,13
+463,23
@@
ADDRESS addr;
int len;
{
BOOLEAN success;
int len;
{
BOOLEAN success;
+#ifdef tahoe
+ register char *savesp = sp;
+#endif
if (sp + len >= &stack[STACKSIZE]) {
success = FALSE;
} else {
dread(sp, addr, len);
sp += len;
if (sp + len >= &stack[STACKSIZE]) {
success = FALSE;
} else {
dread(sp, addr, len);
sp += len;
- success = TRUE;
+#ifdef tahoe
+ alignstack();
+ if (sp >= &stack[STACKSIZE]) {
+ success = FALSE;
+ sp = savesp;
+ } else
+#endif
+ success = TRUE;
}
return success;
}
}
return success;
}