Branch: Tag:

2019-09-03

2019-09-03 09:23:22 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler and runtime: Added byte codes F_PUSH_CATCHES and F_CATCH_AT.

These are needed to be able to save and restore the recovery context
for generator functions.

Updates the code generators for quite a few machine code backends.

2470:    return;       case F_CATCH: +  case F_CATCH_AT:    {    INT32 base_addr = 0;   
2477:    mov_rip_imm_reg(0, ARG1_REG); /* Address for the POINTER. */    base_addr = PIKE_PC;    +  if ((b + F_OFFSET) == F_CATCH) {    amd64_call_c_function (setup_catch_context); -  +  } else { +  amd64_call_c_function (setup_catch_at_context); +  }    mov_reg_reg(P_REG_RAX, P_REG_RBX);       /* Pass a pointer to Pike_interpreter.catch_ctx.recovery.recovery to