зеркало из https://github.com/github/ruby.git
[YARP] Pop AliasNode when appropriate (#8466)
This commit is contained in:
Родитель
53a373078d
Коммит
4c2fc88b21
|
@ -541,10 +541,15 @@ yp_compile_node(rb_iseq_t *iseq, const yp_node_t *node, LINK_ANCHOR *const ret,
|
||||||
ADD_INSN1(ret, &dummy_line_node, putspecialobject, INT2FIX(VM_SPECIAL_OBJECT_VMCORE));
|
ADD_INSN1(ret, &dummy_line_node, putspecialobject, INT2FIX(VM_SPECIAL_OBJECT_VMCORE));
|
||||||
ADD_INSN1(ret, &dummy_line_node, putspecialobject, INT2FIX(VM_SPECIAL_OBJECT_CBASE));
|
ADD_INSN1(ret, &dummy_line_node, putspecialobject, INT2FIX(VM_SPECIAL_OBJECT_CBASE));
|
||||||
|
|
||||||
YP_COMPILE(alias_node->new_name);
|
YP_COMPILE_NOT_POPPED(alias_node->new_name);
|
||||||
YP_COMPILE(alias_node->old_name);
|
YP_COMPILE_NOT_POPPED(alias_node->old_name);
|
||||||
|
|
||||||
ADD_SEND(ret, &dummy_line_node, id_core_set_method_alias, INT2FIX(3));
|
ADD_SEND(ret, &dummy_line_node, id_core_set_method_alias, INT2FIX(3));
|
||||||
|
|
||||||
|
if (popped) {
|
||||||
|
ADD_INSN(ret, &dummy_line_node, pop);
|
||||||
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
case YP_AND_NODE: {
|
case YP_AND_NODE: {
|
||||||
|
|
Загрузка…
Ссылка в новой задаче