Browse Source

AerScript does not implement any error control operator.

pull/50/head
Rafal Kupiec 3 years ago
parent
commit
9a41f7195d
Signed by: belliash GPG Key ID: 4E829243E0CFE6B4
  1. 1
      engine/parser.c
  2. 15
      engine/vm.c
  3. 1
      include/ph7int.h

1
engine/parser.c

@ -174,7 +174,6 @@ static const ph7_expr_op aOpTable[] = {
{ {"+", sizeof(char)}, EXPR_OP_UPLUS, 4, EXPR_OP_ASSOC_RIGHT, PH7_OP_UPLUS },
{ {"~", sizeof(char)}, EXPR_OP_BITNOT, 4, EXPR_OP_ASSOC_RIGHT, PH7_OP_BITNOT },
{ {"!", sizeof(char)}, EXPR_OP_LOGNOT, 4, EXPR_OP_ASSOC_RIGHT, PH7_OP_LNOT },
{ {"@", sizeof(char)}, EXPR_OP_ALT, 4, EXPR_OP_ASSOC_RIGHT, PH7_OP_ERR_CTRL},
/* Cast operators */
{ {"(int)", sizeof("(int)") - 1 }, EXPR_OP_TYPECAST, 4, EXPR_OP_ASSOC_RIGHT, PH7_OP_CVT_INT },
{ {"(bool)", sizeof("(bool)") - 1 }, EXPR_OP_TYPECAST, 4, EXPR_OP_ASSOC_RIGHT, PH7_OP_CVT_BOOL },

15
engine/vm.c

@ -2316,18 +2316,6 @@ static sxi32 VmByteCodeExec(
#endif
PH7_MemObjToVoid(pTos);
break;
/*
* ERR_CTRL * * *
*
* Error control operator.
*/
case PH7_OP_ERR_CTRL:
/*
* TICKET 1433-038:
* As of this version ,the error control operator '@' is a no-op,simply
* use the public API,to control error output.
*/
break;
/*
* IS_A * * *
*
@ -5720,9 +5708,6 @@ static const char *VmInstrToString(sxi32 nOp) {
case PH7_OP_MEMBER:
zOp = "MEMBER";
break;
case PH7_OP_ERR_CTRL:
zOp = "ERR_CTRL";
break;
case PH7_OP_IS_A:
zOp = "IS_A";
break;

1
include/ph7int.h

@ -1469,7 +1469,6 @@ enum ph7_vm_op {
PH7_OP_POP_EXCEPTION, /* POP an exception */
PH7_OP_THROW, /* Throw exception */
PH7_OP_SWITCH, /* Switch operation */
PH7_OP_ERR_CTRL /* Error control */
};
/* -- END-OF INSTRUCTIONS -- */
/*

Loading…
Cancel
Save