Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(515)

Side by Side Diff: src/compiler/code-generator.cc

Issue 921443004: Get code flags from compilation info. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | src/objects-inl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698