summaryrefslogtreecommitdiff
path: root/mjit_compile.c
diff options
context:
space:
mode:
authork0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-07-05 15:56:48 (GMT)
committerk0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-07-05 15:56:48 (GMT)
commit7a0a58544452e6e01cf2ec87f83e7080d229dad5 (patch)
treea372d902b636cbcbc09c12bdbbbc5fa4f56e90e8 /mjit_compile.c
parent96f1c663779b434640c9c60f613566753ad17beb (diff)
revert r62655 for r63763
r63655 was tightly coupled to handle_frames and some assumptions seems to have been broken by r63763. To partially resolve Bug#14892, this reverts the optimization for now. I want to make MJIT CI happy first and then I'll probably retry r63655 by partially reverting r63763 for sp changes. The skipped test is not fixed yet. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63863 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'mjit_compile.c')
-rw-r--r--mjit_compile.c17
1 files changed, 1 insertions, 16 deletions
diff --git a/mjit_compile.c b/mjit_compile.c
index 5eafd72..1f92834 100644
--- a/mjit_compile.c
+++ b/mjit_compile.c
@@ -24,9 +24,6 @@
struct compile_status {
int success; /* has TRUE if compilation has had no issue */
int *stack_size_for_pos; /* stack_size_for_pos[pos] has stack size for the position (otherwise -1) */
- /* If TRUE, JIT-ed code will use local variables to store pushed values instead of
- using VM's stack and moving stack pointer. */
- int local_stack_p;
};
/* Storage to keep data which is consistent in each conditional branch.
@@ -175,13 +172,7 @@ compile_insns(FILE *f, const struct rb_iseq_constant_body *body, unsigned int st
static void
compile_cancel_handler(FILE *f, const struct rb_iseq_constant_body *body, struct compile_status *status)
{
- unsigned int i;
fprintf(f, "\ncancel:\n");
- if (status->local_stack_p) {
- for (i = 0; i < body->stack_max; i++) {
- fprintf(f, " *((VALUE *)reg_cfp->bp + %d) = stack[%d];\n", i + 1, i);
- }
- }
fprintf(f, " return Qundef;\n");
}
@@ -191,7 +182,6 @@ mjit_compile(FILE *f, const struct rb_iseq_constant_body *body, const char *func
{
struct compile_status status;
status.success = TRUE;
- status.local_stack_p = !body->catch_except_p;
status.stack_size_for_pos = ALLOC_N(int, body->iseq_size);
memset(status.stack_size_for_pos, NOT_COMPILED_STACK_SIZE, sizeof(int) * body->iseq_size);
@@ -205,12 +195,7 @@ mjit_compile(FILE *f, const struct rb_iseq_constant_body *body, const char *func
fprintf(f, "__declspec(dllexport)\n");
#endif
fprintf(f, "VALUE\n%s(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp)\n{\n", funcname);
- if (status.local_stack_p) {
- fprintf(f, " VALUE stack[%d];\n", body->stack_max);
- }
- else {
- fprintf(f, " VALUE *stack = reg_cfp->sp;\n");
- }
+ fprintf(f, " VALUE *stack = reg_cfp->sp;\n");
fprintf(f, " static const VALUE *const original_body_iseq = (VALUE *)0x%"PRIxVALUE";\n",
(VALUE)body->iseq_encoded);