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 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 if (jump_tables_) { | 118 if (jump_tables_) { |
119 masm()->Align(kPointerSize); | 119 masm()->Align(kPointerSize); |
120 for (JumpTable* table = jump_tables_; table; table = table->next()) { | 120 for (JumpTable* table = jump_tables_; table; table = table->next()) { |
121 masm()->bind(table->label()); | 121 masm()->bind(table->label()); |
122 AssembleJumpTable(table->targets(), table->target_count()); | 122 AssembleJumpTable(table->targets(), table->target_count()); |
123 } | 123 } |
124 } | 124 } |
125 | 125 |
126 safepoints()->Emit(masm(), frame()->GetSpillSlotCount()); | 126 safepoints()->Emit(masm(), frame()->GetSpillSlotCount()); |
127 | 127 |
128 // TODO(titzer): what are the right code flags here? | |
129 Code::Kind kind = Code::STUB; | |
130 if (linkage()->GetIncomingDescriptor()->IsJSFunctionCall()) { | |
131 kind = Code::OPTIMIZED_FUNCTION; | |
132 } | |
133 Handle<Code> result = v8::internal::CodeGenerator::MakeCodeEpilogue( | 128 Handle<Code> result = v8::internal::CodeGenerator::MakeCodeEpilogue( |
134 masm(), Code::ComputeFlags(kind), info); | 129 masm(), info->flags(), info); |
135 result->set_is_turbofanned(true); | 130 result->set_is_turbofanned(true); |
136 result->set_stack_slots(frame()->GetSpillSlotCount()); | 131 result->set_stack_slots(frame()->GetSpillSlotCount()); |
137 result->set_safepoint_table_offset(safepoints()->GetCodeOffset()); | 132 result->set_safepoint_table_offset(safepoints()->GetCodeOffset()); |
138 | 133 |
139 PopulateDeoptimizationData(result); | 134 PopulateDeoptimizationData(result); |
140 | 135 |
141 // Ensure there is space for lazy deoptimization in the relocation info. | 136 // Ensure there is space for lazy deoptimization in the relocation info. |
142 if (!info->IsStub()) { | 137 if (!info->IsStub()) { |
143 Deoptimizer::EnsureRelocSpaceForLazyDeoptimization(result); | 138 Deoptimizer::EnsureRelocSpaceForLazyDeoptimization(result); |
144 } | 139 } |
(...skipping 478 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
623 : masm_(gen->masm()), next_(gen->ools_) { | 618 : masm_(gen->masm()), next_(gen->ools_) { |
624 gen->ools_ = this; | 619 gen->ools_ = this; |
625 } | 620 } |
626 | 621 |
627 | 622 |
628 OutOfLineCode::~OutOfLineCode() {} | 623 OutOfLineCode::~OutOfLineCode() {} |
629 | 624 |
630 } // namespace compiler | 625 } // namespace compiler |
631 } // namespace internal | 626 } // namespace internal |
632 } // namespace v8 | 627 } // namespace v8 |
OLD | NEW |