projects
/
ghc-hetmet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
b2c6611
)
[project @ 2005-07-12 12:20:58 by simonmar]
author
simonmar
<unknown>
Tue, 12 Jul 2005 12:20:58 +0000
(12:20 +0000)
committer
simonmar
<unknown>
Tue, 12 Jul 2005 12:20:58 +0000
(12:20 +0000)
More 64-fixing
ghc/rts/Interpreter.c
patch
|
blob
|
history
diff --git
a/ghc/rts/Interpreter.c
b/ghc/rts/Interpreter.c
index
4599552
..
004bb6f
100644
(file)
--- a/
ghc/rts/Interpreter.c
+++ b/
ghc/rts/Interpreter.c
@@
-514,7
+514,7
@@
do_apply:
case PAP: {
StgPAP *pap;
case PAP: {
StgPAP *pap;
- nat arity, i;
+ nat i, arity;
pap = (StgPAP *)obj;
pap = (StgPAP *)obj;
@@
-534,7
+534,8
@@
do_apply:
// Shuffle the args for this function down, and put
// the appropriate info table in the gap.
for (i = 0; i < arity; i++) {
// Shuffle the args for this function down, and put
// the appropriate info table in the gap.
for (i = 0; i < arity; i++) {
- Sp[i-1] = Sp[i];
+ Sp[(int)i-1] = Sp[i];
+ // ^^^^^ careful, i-1 might be negative, but i in unsigned
}
Sp[arity-1] = app_ptrs_itbl[n-arity-1];
Sp--;
}
Sp[arity-1] = app_ptrs_itbl[n-arity-1];
Sp--;
@@
-577,8
+578,7
@@
do_apply:
}
case BCO: {
}
case BCO: {
- nat arity;
- int i; // arithmetic involving i might go negative below
+ nat arity, i;
Sp++;
arity = ((StgBCO *)obj)->arity;
Sp++;
arity = ((StgBCO *)obj)->arity;
@@
-591,7
+591,8
@@
do_apply:
// Shuffle the args for this function down, and put
// the appropriate info table in the gap.
for (i = 0; i < arity; i++) {
// Shuffle the args for this function down, and put
// the appropriate info table in the gap.
for (i = 0; i < arity; i++) {
- Sp[i-1] = Sp[i];
+ Sp[(int)i-1] = Sp[i];
+ // ^^^^^ careful, i-1 might be negative, but i in unsigned
}
Sp[arity-1] = app_ptrs_itbl[n-arity-1];
Sp--;
}
Sp[arity-1] = app_ptrs_itbl[n-arity-1];
Sp--;