| Index: src/compiler/code-generator.cc
|
| diff --git a/src/compiler/code-generator.cc b/src/compiler/code-generator.cc
|
| index 5b3a2db086fcd51309843af177bec8e44701e051..4f278fdcd5a4a5f2fb581f96f8481b7673de2d02 100644
|
| --- a/src/compiler/code-generator.cc
|
| +++ b/src/compiler/code-generator.cc
|
| @@ -44,10 +44,20 @@ Handle<Code> CodeGenerator::GenerateCode() {
|
| info->set_prologue_offset(masm()->pc_offset());
|
| AssemblePrologue();
|
|
|
| - // Assemble all instructions.
|
| - for (InstructionSequence::const_iterator i = code()->begin();
|
| - i != code()->end(); ++i) {
|
| - AssembleInstruction(*i);
|
| + // Assemble all non-deferred instructions.
|
| + for (auto const block : code()->instruction_blocks()) {
|
| + if (block->IsDeferred()) continue;
|
| + for (int i = block->code_start(); i < block->code_end(); ++i) {
|
| + AssembleInstruction(code()->InstructionAt(i));
|
| + }
|
| + }
|
| +
|
| + // Assemble all deferred instructions.
|
| + for (auto const block : code()->instruction_blocks()) {
|
| + if (!block->IsDeferred()) continue;
|
| + for (int i = block->code_start(); i < block->code_end(); ++i) {
|
| + AssembleInstruction(code()->InstructionAt(i));
|
| + }
|
| }
|
|
|
| FinishCode(masm());
|
| @@ -83,6 +93,12 @@ Handle<Code> CodeGenerator::GenerateCode() {
|
| }
|
|
|
|
|
| +bool CodeGenerator::IsNextInAssemblyOrder(BasicBlock::RpoNumber block) const {
|
| + return code()->InstructionBlockAt(current_block_)->ao_number().IsNext(
|
| + code()->InstructionBlockAt(block)->ao_number());
|
| +}
|
| +
|
| +
|
| void CodeGenerator::RecordSafepoint(PointerMap* pointers, Safepoint::Kind kind,
|
| int arguments,
|
| Safepoint::DeoptMode deopt_mode) {
|
|
|