X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Frts%2FForeignCall.c;h=7dc5661116e217cc899c48e8049f87d2c8ef3d00;hb=90fa6b84fdc99ba99c0b7df9691ca69d50b62530;hp=38158ce4941ff12ef30021ae341232c75cbcbc8d;hpb=21198e4d1a1f7d41c48d08791b257479d257aba6;p=ghc-hetmet.git diff --git a/ghc/rts/ForeignCall.c b/ghc/rts/ForeignCall.c index 38158ce..7dc5661 100644 --- a/ghc/rts/ForeignCall.c +++ b/ghc/rts/ForeignCall.c @@ -1,6 +1,6 @@ /* ----------------------------------------------------------------------------- - * $Id: ForeignCall.c,v 1.14 2000/04/11 16:49:20 sewardj Exp $ + * $Id: ForeignCall.c,v 1.19 2000/10/09 10:28:33 daan Exp $ * * (c) The GHC Team 1994-1999. * @@ -205,7 +205,8 @@ static void universal_call_c_generic printf("%c",(char)argstr[i]); } printf("' [%d arg(s)]\n",n_args); - assert(0); + barf("aborting"); + ASSERT(0); } #undef CALL #undef CMP @@ -316,7 +317,6 @@ int ccall ( CFunDescriptor* d, PushPtr((StgPtr)(*bco)); cap->rCurrentTSO->sp = MainRegTable.rSp; cap->rCurrentTSO->su = MainRegTable.rSu; - cap->rCurrentTSO->splim = MainRegTable.rSpLim; token = suspendThread(cap); #if i386_TARGET_ARCH @@ -335,7 +335,6 @@ int ccall ( CFunDescriptor* d, cap = resumeThread(token); MainRegTable.rSp = cap->rCurrentTSO->sp; MainRegTable.rSu = cap->rCurrentTSO->su; - MainRegTable.rSpLim = cap->rCurrentTSO->splim; *bco=(StgBCO*)PopPtr(); /* INT, WORD, ADDR, STABLE don't need to do a word-size check @@ -385,7 +384,7 @@ int ccall ( CFunDescriptor* d, /* Make it possible for the evaluator to get hold of bytecode for a given function by name. Useful but a hack. Sigh. */ -extern void* getHugs_AsmObject_for ( char* s ); +extern void* /* StgClosure* */ getHugs_BCO_cptr_for ( char* s ); extern int /*Bool*/ combined; /* ----------------------------------------------------------------* @@ -430,7 +429,7 @@ unpackArgsAndCallHaskell_x86_nocallconv_wrk ( StgStablePtr stableptr, while (*argp) { switch (*argp) { case CHAR_REP: - node = rts_apply ( node, rts_mkChar ( *(char*)args ) ); + node = rts_apply ( node, rts_mkChar ( *(unsigned int*)args ) ); args += 4; break; case INT_REP: @@ -469,7 +468,7 @@ unpackArgsAndCallHaskell_x86_nocallconv_wrk ( StgStablePtr stableptr, sstat = rts_evalIO ( node, &nodeOut ); } else { node = rts_apply ( - asmClosureOfObject(getHugs_AsmObject_for("primRunST")), + getHugs_BCO_cptr_for("runST"), node ); sstat = rts_eval ( node, &nodeOut ); }