Fix bug unnecessarily causing version limit hit
This commit is contained in:
parent
d2ad0a1175
commit
21c4dd037d
@ -148,6 +148,9 @@ int ctx_diff(const ctx_t* src, const ctx_t* dst)
|
|||||||
// Add a block version to the map
|
// Add a block version to the map
|
||||||
static void add_block_version(blockid_t blockid, block_t* block)
|
static void add_block_version(blockid_t blockid, block_t* block)
|
||||||
{
|
{
|
||||||
|
// Function entry blocks must have stack size 0
|
||||||
|
RUBY_ASSERT(!(block->blockid.idx == 0 && block->ctx.stack_size > 0));
|
||||||
|
|
||||||
// If there exists a version for this block id
|
// If there exists a version for this block id
|
||||||
block_t* first_version = NULL;
|
block_t* first_version = NULL;
|
||||||
st_lookup(version_tbl, (st_data_t)&blockid, (st_data_t*)&first_version);
|
st_lookup(version_tbl, (st_data_t)&blockid, (st_data_t*)&first_version);
|
||||||
@ -266,6 +269,9 @@ block_t* gen_block_version(blockid_t blockid, const ctx_t* start_ctx)
|
|||||||
rb_bug("invalid target for last branch");
|
rb_bug("invalid target for last branch");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Use the context from the branch
|
||||||
|
*ctx = last_branch->target_ctxs[0];
|
||||||
|
|
||||||
// Allocate a new block version object
|
// Allocate a new block version object
|
||||||
block = calloc(1, sizeof(block_t));
|
block = calloc(1, sizeof(block_t));
|
||||||
block->blockid = last_branch->targets[0];
|
block->blockid = last_branch->targets[0];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user