2012-02-05 11:35:58 -05:00
|
|
|
/****************************************************************
|
|
|
|
* *
|
2024-07-19 11:43:27 -04:00
|
|
|
* Copyright 2001, 2012 Fidelity Information Services, Inc *
|
2012-02-05 11:35:58 -05:00
|
|
|
* *
|
|
|
|
* This source code contains the intellectual property *
|
|
|
|
* of its copyright holder(s), and is made available *
|
|
|
|
* under a license. If you do not know the terms of *
|
|
|
|
* the license, please stop and do not read further. *
|
|
|
|
* *
|
|
|
|
****************************************************************/
|
|
|
|
|
|
|
|
#include "mdef.h"
|
|
|
|
#include "compiler.h"
|
|
|
|
#include "opcode.h"
|
|
|
|
#include "indir_enum.h"
|
|
|
|
#include "toktyp.h"
|
|
|
|
#include "mdq.h"
|
2012-03-24 14:06:46 -04:00
|
|
|
#include "fullbool.h"
|
2012-02-05 11:35:58 -05:00
|
|
|
|
2012-03-24 14:06:46 -04:00
|
|
|
error_def(ERR_VAREXPECTED);
|
2012-02-05 11:35:58 -05:00
|
|
|
|
|
|
|
int f_zqgblmod(oprtype *a, opctype op)
|
|
|
|
{
|
2024-07-19 11:43:27 -04:00
|
|
|
triple *oldchain, *r;
|
|
|
|
save_se save_state;
|
2012-02-05 11:35:58 -05:00
|
|
|
DCL_THREADGBL_ACCESS;
|
|
|
|
|
|
|
|
SETUP_THREADGBL_ACCESS;
|
|
|
|
r = maketriple(op);
|
2012-03-24 14:06:46 -04:00
|
|
|
switch (TREF(window_token))
|
2012-02-05 11:35:58 -05:00
|
|
|
{
|
|
|
|
case TK_CIRCUMFLEX:
|
|
|
|
if (!gvn())
|
|
|
|
return FALSE;
|
|
|
|
r->opcode = OC_FNZQGBLMOD;
|
|
|
|
ins_triple(r);
|
|
|
|
break;
|
|
|
|
case TK_ATSIGN:
|
|
|
|
r->opcode = OC_INDFUN;
|
2024-07-19 11:43:27 -04:00
|
|
|
if (SHIFT_SIDE_EFFECTS)
|
2012-02-05 11:35:58 -05:00
|
|
|
{
|
2024-07-19 11:43:27 -04:00
|
|
|
START_GVBIND_CHAIN(&save_state, oldchain);
|
2012-02-05 11:35:58 -05:00
|
|
|
if (!indirection(&(r->operand[0])))
|
|
|
|
{
|
|
|
|
setcurtchain(oldchain);
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
r->operand[1] = put_ilit((mint)indir_fnzqgblmod);
|
|
|
|
ins_triple(r);
|
2024-07-19 11:43:27 -04:00
|
|
|
PLACE_GVBIND_CHAIN(&save_state, oldchain);
|
2012-02-05 11:35:58 -05:00
|
|
|
} else
|
|
|
|
{
|
|
|
|
if (!indirection(&(r->operand[0])))
|
|
|
|
return FALSE;
|
|
|
|
r->operand[1] = put_ilit((mint)indir_fnzqgblmod);
|
|
|
|
ins_triple(r);
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
stx_error(ERR_VAREXPECTED);
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
*a = put_tref(r);
|
|
|
|
return TRUE;
|
|
|
|
}
|