mirror of
https://github.com/dart-lang/sdk
synced 2024-09-05 16:41:07 +00:00
[vm/bytecode] Fix max used block id when compiling from bytecode
Fixes https://github.com/dart-lang/sdk/issues/35789 Change-Id: I061d8d5b709fa5469824c8f5d7490aa2038746a3 Reviewed-on: https://dart-review.googlesource.com/c/91440 Reviewed-by: Aart Bik <ajcbik@google.com> Commit-Queue: Alexander Markov <alexmarkov@google.com>
This commit is contained in:
parent
ff2e8eb681
commit
601094e3f2
|
@ -60,13 +60,11 @@ void FlowGraphChecker::CheckBasicBlocks() {
|
|||
}
|
||||
|
||||
// Iterate over all basic blocks.
|
||||
// const intptr_t max_block_id = flow_graph_->max_block_id();
|
||||
const intptr_t max_block_id = flow_graph_->max_block_id();
|
||||
for (BlockIterator block_it = flow_graph_->reverse_postorder_iterator();
|
||||
!block_it.Done(); block_it.Advance()) {
|
||||
BlockEntryInstr* block = block_it.Current();
|
||||
// Re-enable this if possible
|
||||
// https://github.com/dart-lang/sdk/issues/35789
|
||||
// ASSERT(block->block_id() <= max_block_id);
|
||||
ASSERT(block->block_id() <= max_block_id);
|
||||
// Make sure ordering is consistent.
|
||||
ASSERT(block->preorder_number() <= block_count);
|
||||
ASSERT(block->postorder_number() <= block_count);
|
||||
|
|
|
@ -508,11 +508,11 @@ void BytecodeFlowGraphBuilder::BuildEntryOptional() {
|
|||
PrologueBuilder prologue_builder(parsed_function(), B->last_used_block_id_,
|
||||
B->IsCompiledForOsr(), B->IsInlining());
|
||||
|
||||
B->last_used_block_id_ = prologue_builder.last_used_block_id();
|
||||
|
||||
copy_args_prologue += prologue_builder.BuildOptionalParameterHandling(
|
||||
throw_no_such_method_, temp_var);
|
||||
|
||||
B->last_used_block_id_ = prologue_builder.last_used_block_id();
|
||||
|
||||
JoinEntryInstr* prologue_exit = B->BuildJoinEntry();
|
||||
copy_args_prologue += B->Goto(prologue_exit);
|
||||
copy_args_prologue.current = prologue_exit;
|
||||
|
|
Loading…
Reference in a new issue