Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/compiler/code-generator.h" | 5 #include "src/compiler/code-generator.h" |
| 6 | 6 |
| 7 #include "src/compiler/code-generator-impl.h" | 7 #include "src/compiler/code-generator-impl.h" |
| 8 #include "src/compiler/linkage.h" | 8 #include "src/compiler/linkage.h" |
| 9 #include "src/compiler/pipeline.h" | 9 #include "src/compiler/pipeline.h" |
| 10 | 10 |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 106 } | 106 } |
| 107 | 107 |
| 108 // Ensure there is space for lazy deoptimization in the code. | 108 // Ensure there is space for lazy deoptimization in the code. |
| 109 if (!info->IsStub()) { | 109 if (!info->IsStub()) { |
| 110 int target_offset = masm()->pc_offset() + Deoptimizer::patch_size(); | 110 int target_offset = masm()->pc_offset() + Deoptimizer::patch_size(); |
| 111 while (masm()->pc_offset() < target_offset) { | 111 while (masm()->pc_offset() < target_offset) { |
| 112 masm()->nop(); | 112 masm()->nop(); |
| 113 } | 113 } |
| 114 } | 114 } |
| 115 | 115 |
| 116 FinishCode(masm()); | |
| 117 | |
| 118 // Emit the jump tables. | 116 // Emit the jump tables. |
| 119 if (jump_tables_) { | 117 if (jump_tables_) { |
| 120 masm()->Align(kPointerSize); | 118 masm()->Align(kPointerSize); |
| 121 for (JumpTable* table = jump_tables_; table; table = table->next()) { | 119 for (JumpTable* table = jump_tables_; table; table = table->next()) { |
| 122 masm()->bind(table->label()); | 120 masm()->bind(table->label()); |
| 123 AssembleJumpTable(table->targets(), table->target_count()); | 121 AssembleJumpTable(table->targets(), table->target_count()); |
| 124 } | 122 } |
| 125 } | 123 } |
| 126 | 124 |
| 125 FinishCode(masm()); | |
|
rmcilroy
2015/04/08 12:38:55
Don't move this - instead insert a separate step w
MTBrandyberry
2015/05/07 20:38:32
Acknowledged.
| |
| 126 | |
| 127 safepoints()->Emit(masm(), frame()->GetSpillSlotCount()); | 127 safepoints()->Emit(masm(), frame()->GetSpillSlotCount()); |
| 128 | 128 |
| 129 Handle<Code> result = v8::internal::CodeGenerator::MakeCodeEpilogue( | 129 Handle<Code> result = v8::internal::CodeGenerator::MakeCodeEpilogue( |
| 130 masm(), info->flags(), info); | 130 masm(), info->flags(), info); |
| 131 result->set_is_turbofanned(true); | 131 result->set_is_turbofanned(true); |
| 132 result->set_stack_slots(frame()->GetSpillSlotCount()); | 132 result->set_stack_slots(frame()->GetSpillSlotCount()); |
| 133 result->set_safepoint_table_offset(safepoints()->GetCodeOffset()); | 133 result->set_safepoint_table_offset(safepoints()->GetCodeOffset()); |
| 134 | 134 |
| 135 // Emit exception handler table. | 135 // Emit exception handler table. |
| 136 if (!handlers_.empty()) { | 136 if (!handlers_.empty()) { |
| (...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 640 : masm_(gen->masm()), next_(gen->ools_) { | 640 : masm_(gen->masm()), next_(gen->ools_) { |
| 641 gen->ools_ = this; | 641 gen->ools_ = this; |
| 642 } | 642 } |
| 643 | 643 |
| 644 | 644 |
| 645 OutOfLineCode::~OutOfLineCode() {} | 645 OutOfLineCode::~OutOfLineCode() {} |
| 646 | 646 |
| 647 } // namespace compiler | 647 } // namespace compiler |
| 648 } // namespace internal | 648 } // namespace internal |
| 649 } // namespace v8 | 649 } // namespace v8 |
| OLD | NEW |