mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-14 07:30:32 +02:00
Merge branch 'master' into lightning
This includes a manual cherry-pick of relevant stable-2.2 commits up to
4c91de3e45
.
This commit is contained in:
commit
41100f7786
58 changed files with 1549 additions and 468 deletions
|
@ -322,6 +322,7 @@ VM_NAME (scm_thread *thread)
|
|||
/* Empty frame, then values. */
|
||||
size_t first_value = frame_size;
|
||||
uint32_t nvals = FRAME_LOCALS_COUNT_FROM (first_value);
|
||||
union scm_vm_stack_element *fp;
|
||||
SCM ret;
|
||||
|
||||
if (nvals == 1)
|
||||
|
@ -336,9 +337,10 @@ VM_NAME (scm_thread *thread)
|
|||
SCM_SET_CELL_OBJECT (ret, n+1, FP_REF (first_value + n));
|
||||
}
|
||||
|
||||
VP->ip = SCM_FRAME_VIRTUAL_RETURN_ADDRESS (VP->fp);
|
||||
VP->sp = SCM_FRAME_PREVIOUS_SP (VP->fp);
|
||||
VP->fp = SCM_FRAME_DYNAMIC_LINK (VP->fp);
|
||||
fp = VP->fp;
|
||||
VP->fp = SCM_FRAME_DYNAMIC_LINK (fp);
|
||||
VP->ip = SCM_FRAME_VIRTUAL_RETURN_ADDRESS (fp);
|
||||
VP->sp = SCM_FRAME_PREVIOUS_SP (fp);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
@ -359,16 +361,17 @@ VM_NAME (scm_thread *thread)
|
|||
VM_DEFINE_OP (1, call, "call", OP2 (X8_F24, X8_C24))
|
||||
{
|
||||
uint32_t proc, nlocals;
|
||||
union scm_vm_stack_element *old_fp;
|
||||
union scm_vm_stack_element *old_fp, *new_fp;
|
||||
|
||||
UNPACK_24 (op, proc);
|
||||
UNPACK_24 (ip[1], nlocals);
|
||||
|
||||
old_fp = VP->fp;
|
||||
VP->fp = SCM_FRAME_SLOT (old_fp, proc - 1);
|
||||
SCM_FRAME_SET_DYNAMIC_LINK (VP->fp, old_fp);
|
||||
SCM_FRAME_SET_VIRTUAL_RETURN_ADDRESS (VP->fp, ip + 2);
|
||||
SCM_FRAME_SET_MACHINE_RETURN_ADDRESS (VP->fp, 0);
|
||||
new_fp = SCM_FRAME_SLOT (old_fp, proc - 1);
|
||||
SCM_FRAME_SET_DYNAMIC_LINK (new_fp, old_fp);
|
||||
SCM_FRAME_SET_VIRTUAL_RETURN_ADDRESS (new_fp, ip + 2);
|
||||
SCM_FRAME_SET_MACHINE_RETURN_ADDRESS (new_fp, 0);
|
||||
VP->fp = new_fp;
|
||||
|
||||
RESET_FRAME (nlocals);
|
||||
|
||||
|
@ -398,17 +401,18 @@ VM_NAME (scm_thread *thread)
|
|||
{
|
||||
uint32_t proc, nlocals;
|
||||
int32_t label;
|
||||
union scm_vm_stack_element *old_fp;
|
||||
union scm_vm_stack_element *old_fp, *new_fp;
|
||||
|
||||
UNPACK_24 (op, proc);
|
||||
UNPACK_24 (ip[1], nlocals);
|
||||
label = ip[2];
|
||||
|
||||
old_fp = VP->fp;
|
||||
VP->fp = SCM_FRAME_SLOT (old_fp, proc - 1);
|
||||
SCM_FRAME_SET_DYNAMIC_LINK (VP->fp, old_fp);
|
||||
SCM_FRAME_SET_VIRTUAL_RETURN_ADDRESS (VP->fp, ip + 3);
|
||||
SCM_FRAME_SET_MACHINE_RETURN_ADDRESS (VP->fp, 0);
|
||||
new_fp = SCM_FRAME_SLOT (old_fp, proc - 1);
|
||||
SCM_FRAME_SET_DYNAMIC_LINK (new_fp, old_fp);
|
||||
SCM_FRAME_SET_VIRTUAL_RETURN_ADDRESS (new_fp, ip + 3);
|
||||
SCM_FRAME_SET_MACHINE_RETURN_ADDRESS (new_fp, 0);
|
||||
VP->fp = new_fp;
|
||||
|
||||
RESET_FRAME (nlocals);
|
||||
|
||||
|
@ -2383,9 +2387,11 @@ VM_NAME (scm_thread *thread)
|
|||
*/
|
||||
VM_DEFINE_OP (184, return_from_interrupt, "return-from-interrupt", OP1 (X32))
|
||||
{
|
||||
VP->sp = sp = SCM_FRAME_PREVIOUS_SP (VP->fp);
|
||||
ip = SCM_FRAME_VIRTUAL_RETURN_ADDRESS (VP->fp);
|
||||
VP->fp = SCM_FRAME_DYNAMIC_LINK (VP->fp);
|
||||
union scm_vm_stack_element *fp = VP->fp;
|
||||
|
||||
ip = SCM_FRAME_VIRTUAL_RETURN_ADDRESS (fp);
|
||||
VP->fp = SCM_FRAME_DYNAMIC_LINK (fp);
|
||||
VP->sp = sp = SCM_FRAME_PREVIOUS_SP (fp);
|
||||
|
||||
NEXT (0);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue