Maintenance of fatal code enum (#2670)
- `ERR_SYSCALL` is a legacy that has not been used anymore since the removal of jerry-libc. This commit removes it from the port API. - `ERR_DISABLED_BYTE_CODE` is a (relatively) recent addition to the fatal code enum. At the time it was added, the documentation has not been updated. This commit adds the missing documentation. (Plus, it removes a superfluous `JERRY_UNREACHABLE` from after a `jerry_fatal (ERR_DISABLED_BYTE_CODE)`.) Note: As the port API is modified, this is an API-breaking change. JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
This commit is contained in:
+1
-1
@@ -25,8 +25,8 @@ Error codes
|
|||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
ERR_OUT_OF_MEMORY = 10,
|
ERR_OUT_OF_MEMORY = 10,
|
||||||
ERR_SYSCALL = 11,
|
|
||||||
ERR_REF_COUNT_LIMIT = 12,
|
ERR_REF_COUNT_LIMIT = 12,
|
||||||
|
ERR_DISABLED_BYTE_CODE = 13,
|
||||||
ERR_FAILED_INTERNAL_ASSERTION = 120
|
ERR_FAILED_INTERNAL_ASSERTION = 120
|
||||||
} jerry_fatal_code_t;
|
} jerry_fatal_code_t;
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -48,7 +48,6 @@ extern "C"
|
|||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
ERR_OUT_OF_MEMORY = 10,
|
ERR_OUT_OF_MEMORY = 10,
|
||||||
ERR_SYSCALL = 11,
|
|
||||||
ERR_REF_COUNT_LIMIT = 12,
|
ERR_REF_COUNT_LIMIT = 12,
|
||||||
ERR_DISABLED_BYTE_CODE = 13,
|
ERR_DISABLED_BYTE_CODE = 13,
|
||||||
ERR_FAILED_INTERNAL_ASSERTION = 120
|
ERR_FAILED_INTERNAL_ASSERTION = 120
|
||||||
|
|||||||
@@ -37,11 +37,6 @@ jerry_fatal (jerry_fatal_code_t code) /**< status code */
|
|||||||
JERRY_ERROR_MSG ("Error: ERR_OUT_OF_MEMORY\n");
|
JERRY_ERROR_MSG ("Error: ERR_OUT_OF_MEMORY\n");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case ERR_SYSCALL:
|
|
||||||
{
|
|
||||||
/* print nothing as it may invoke syscall recursively */
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case ERR_REF_COUNT_LIMIT:
|
case ERR_REF_COUNT_LIMIT:
|
||||||
{
|
{
|
||||||
JERRY_ERROR_MSG ("Error: ERR_REF_COUNT_LIMIT\n");
|
JERRY_ERROR_MSG ("Error: ERR_REF_COUNT_LIMIT\n");
|
||||||
|
|||||||
@@ -3112,7 +3112,6 @@ vm_loop (vm_frame_ctx_t *frame_ctx_p) /**< frame context */
|
|||||||
JERRY_ASSERT (VM_OC_GROUP_GET_INDEX (opcode_data) == VM_OC_NONE);
|
JERRY_ASSERT (VM_OC_GROUP_GET_INDEX (opcode_data) == VM_OC_NONE);
|
||||||
|
|
||||||
jerry_fatal (ERR_DISABLED_BYTE_CODE);
|
jerry_fatal (ERR_DISABLED_BYTE_CODE);
|
||||||
JERRY_UNREACHABLE ();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user