Add a guard that we start executing on the first PC

Methods with optional parameters don't always start executing at the
first PC, but we compile all methods assuming that they do.  This commit
adds a guard to ensure that we're actually starting at the first PC for
methods with optional params
This commit is contained in:
Aaron Patterson 2021-07-15 11:09:08 -07:00 committed by Alan Wu
parent 0fdcdd267f
commit 05b5a7f011
5 changed files with 53 additions and 3 deletions

View file

@ -535,7 +535,7 @@ uint8_t* gen_entry_point(const rb_iseq_t *iseq, uint32_t insn_idx, rb_execution_
blockid_t blockid = { iseq, insn_idx };
// Write the interpreter entry prologue
uint8_t* code_ptr = yjit_entry_prologue();
uint8_t* code_ptr = yjit_entry_prologue(iseq);
// Try to generate code for the entry block
block_t* block = gen_block_version(blockid, &DEFAULT_CTX, ec);