gh-145866: Convert _CALL_INTRINSIC_2 to leave its inputs on the stack to be cleaned up by _POP_TOP (GH-146262)

This commit is contained in:
Kevin Huai 2026-03-26 03:41:07 -06:00 committed by GitHub
parent 495178ab05
commit f5364ae750
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 1346 additions and 1283 deletions

View file

@ -1460,11 +1460,21 @@
}
case _CALL_INTRINSIC_2: {
JitOptRef value1_st;
JitOptRef value2_st;
JitOptRef res;
JitOptRef vs1;
JitOptRef vs2;
value1_st = stack_pointer[-1];
value2_st = stack_pointer[-2];
res = sym_new_not_null(ctx);
CHECK_STACK_BOUNDS(-1);
vs1 = value1_st;
vs2 = value2_st;
CHECK_STACK_BOUNDS(1);
stack_pointer[-2] = res;
stack_pointer += -1;
stack_pointer[-1] = vs1;
stack_pointer[0] = vs2;
stack_pointer += 1;
ASSERT_WITHIN_STACK_BOUNDS(__FILE__, __LINE__);
break;
}