Revision: 24904
Author: [email protected]
Date: Mon Oct 27 12:39:20 2014 UTC
Log: [turbofan] reduce allocations outside of pipeline
BUG=
[email protected]
Review URL: https://codereview.chromium.org/679793003
https://code.google.com/p/v8/source/detail?r=24904
Modified:
/branches/bleeding_edge/src/compiler/arm/code-generator-arm.cc
/branches/bleeding_edge/src/compiler/arm64/code-generator-arm64.cc
/branches/bleeding_edge/src/compiler/ast-graph-builder.cc
/branches/bleeding_edge/src/compiler/code-generator.cc
/branches/bleeding_edge/src/compiler/code-generator.h
/branches/bleeding_edge/src/compiler/ia32/code-generator-ia32.cc
/branches/bleeding_edge/src/compiler/js-generic-lowering.cc
/branches/bleeding_edge/src/compiler/linkage.cc
/branches/bleeding_edge/src/compiler/linkage.h
/branches/bleeding_edge/src/compiler/mips/code-generator-mips.cc
/branches/bleeding_edge/src/compiler/pipeline.cc
/branches/bleeding_edge/src/compiler/x64/code-generator-x64.cc
/branches/bleeding_edge/test/cctest/compiler/codegen-tester.h
/branches/bleeding_edge/test/cctest/compiler/function-tester.h
/branches/bleeding_edge/test/cctest/compiler/graph-builder-tester.cc
/branches/bleeding_edge/test/cctest/compiler/test-changes-lowering.cc
/branches/bleeding_edge/test/cctest/compiler/test-codegen-deopt.cc
/branches/bleeding_edge/test/cctest/compiler/test-instruction.cc
/branches/bleeding_edge/test/cctest/compiler/test-linkage.cc
/branches/bleeding_edge/test/cctest/compiler/test-simplified-lowering.cc
/branches/bleeding_edge/test/unittests/compiler/change-lowering-unittest.cc
/branches/bleeding_edge/test/unittests/compiler/instruction-selector-unittest.cc
=======================================
--- /branches/bleeding_edge/src/compiler/arm/code-generator-arm.cc Tue Oct
14 11:57:06 2014 UTC
+++ /branches/bleeding_edge/src/compiler/arm/code-generator-arm.cc Mon Oct
27 12:39:20 2014 UTC
@@ -682,7 +682,7 @@
__ stm(db_w, sp, saves);
}
} else if (descriptor->IsJSFunctionCall()) {
- CompilationInfo* info = linkage()->info();
+ CompilationInfo* info = this->info();
__ Prologue(info->IsCodePreAgingActive());
frame()->SetRegisterSaveAreaSize(
StandardFrameConstants::kFixedFrameSizeFromFp);
@@ -914,7 +914,7 @@
void CodeGenerator::EnsureSpaceForLazyDeopt() {
int space_needed = Deoptimizer::patch_size();
- if (!linkage()->info()->IsStub()) {
+ if (!info()->IsStub()) {
// Ensure that we have enough space after the previous lazy-bailout
// instruction for patching the code here.
int current_pc = masm()->pc_offset();
=======================================
--- /branches/bleeding_edge/src/compiler/arm64/code-generator-arm64.cc Tue
Oct 21 06:59:50 2014 UTC
+++ /branches/bleeding_edge/src/compiler/arm64/code-generator-arm64.cc Mon
Oct 27 12:39:20 2014 UTC
@@ -752,7 +752,7 @@
__ PushCalleeSavedRegisters();
frame()->SetRegisterSaveAreaSize(20 * kPointerSize);
} else if (descriptor->IsJSFunctionCall()) {
- CompilationInfo* info = linkage()->info();
+ CompilationInfo* info = this->info();
__ SetStackPointer(jssp);
__ Prologue(info->IsCodePreAgingActive());
frame()->SetRegisterSaveAreaSize(
@@ -967,7 +967,7 @@
void CodeGenerator::EnsureSpaceForLazyDeopt() {
int space_needed = Deoptimizer::patch_size();
- if (!linkage()->info()->IsStub()) {
+ if (!info()->IsStub()) {
// Ensure that we have enough space after the previous lazy-bailout
// instruction for patching the code here.
intptr_t current_pc = masm()->pc_offset();
=======================================
--- /branches/bleeding_edge/src/compiler/ast-graph-builder.cc Sun Oct 26
10:24:49 2014 UTC
+++ /branches/bleeding_edge/src/compiler/ast-graph-builder.cc Mon Oct 27
12:39:20 2014 UTC
@@ -22,10 +22,10 @@
: StructuredGraphBuilder(local_zone, jsgraph->graph(),
jsgraph->common()),
info_(info),
jsgraph_(jsgraph),
- globals_(0, info->zone()),
+ globals_(0, local_zone),
breakable_(NULL),
execution_context_(NULL) {
- InitializeAstVisitor(info->zone());
+ InitializeAstVisitor(local_zone);
}
=======================================
--- /branches/bleeding_edge/src/compiler/code-generator.cc Wed Oct 22
11:24:55 2014 UTC
+++ /branches/bleeding_edge/src/compiler/code-generator.cc Mon Oct 27
12:39:20 2014 UTC
@@ -13,10 +13,11 @@
namespace compiler {
CodeGenerator::CodeGenerator(Frame* frame, Linkage* linkage,
- InstructionSequence* code)
+ InstructionSequence* code, CompilationInfo*
info)
: frame_(frame),
linkage_(linkage),
code_(code),
+ info_(info),
current_block_(BasicBlock::RpoNumber::Invalid()),
current_source_position_(SourcePosition::Invalid()),
masm_(code->zone()->isolate(), NULL, 0),
@@ -29,7 +30,7 @@
Handle<Code> CodeGenerator::GenerateCode() {
- CompilationInfo* info = linkage()->info();
+ CompilationInfo* info = this->info();
// Emit a code line info recording start event.
PositionsRecorder* recorder = masm()->positions_recorder();
@@ -166,7 +167,7 @@
masm()->positions_recorder()->WriteRecordedPositions();
if (FLAG_code_comments) {
Vector<char> buffer = Vector<char>::New(256);
- CompilationInfo* info = linkage()->info();
+ CompilationInfo* info = this->info();
int ln = Script::GetLineNumber(info->script(), code_pos);
int cn = Script::GetColumnNumber(info->script(), code_pos);
if (info->script()->name()->IsString()) {
@@ -196,7 +197,7 @@
void CodeGenerator::PopulateDeoptimizationData(Handle<Code> code_object) {
- CompilationInfo* info = linkage()->info();
+ CompilationInfo* info = this->info();
int deopt_count = static_cast<int>(deoptimization_states_.size());
if (deopt_count == 0) return;
Handle<DeoptimizationInputData> data =
=======================================
--- /branches/bleeding_edge/src/compiler/code-generator.h Wed Oct 22
11:24:55 2014 UTC
+++ /branches/bleeding_edge/src/compiler/code-generator.h Mon Oct 27
12:39:20 2014 UTC
@@ -21,7 +21,7 @@
class CodeGenerator FINAL : public GapResolver::Assembler {
public:
explicit CodeGenerator(Frame* frame, Linkage* linkage,
- InstructionSequence* code);
+ InstructionSequence* code, CompilationInfo* info);
// Generate native code.
Handle<Code> GenerateCode();
@@ -36,6 +36,7 @@
GapResolver* resolver() { return &resolver_; }
SafepointTableBuilder* safepoints() { return &safepoints_; }
Zone* zone() const { return code()->zone(); }
+ CompilationInfo* info() const { return info_; }
// Checks if {block} will appear directly after {current_block_} when
// assembling code, in which case, a fall-through can be used.
@@ -118,6 +119,7 @@
Frame* const frame_;
Linkage* const linkage_;
InstructionSequence* const code_;
+ CompilationInfo* const info_;
BasicBlock::RpoNumber current_block_;
SourcePosition current_source_position_;
MacroAssembler masm_;
=======================================
--- /branches/bleeding_edge/src/compiler/ia32/code-generator-ia32.cc Tue
Oct 21 07:12:18 2014 UTC
+++ /branches/bleeding_edge/src/compiler/ia32/code-generator-ia32.cc Mon
Oct 27 12:39:20 2014 UTC
@@ -793,7 +793,7 @@
frame->SetRegisterSaveAreaSize(register_save_area_size);
}
} else if (descriptor->IsJSFunctionCall()) {
- CompilationInfo* info = linkage()->info();
+ CompilationInfo* info = this->info();
__ Prologue(info->IsCodePreAgingActive());
frame->SetRegisterSaveAreaSize(
StandardFrameConstants::kFixedFrameSizeFromFp);
@@ -1023,7 +1023,7 @@
void CodeGenerator::EnsureSpaceForLazyDeopt() {
int space_needed = Deoptimizer::patch_size();
- if (!linkage()->info()->IsStub()) {
+ if (!info()->IsStub()) {
// Ensure that we have enough space after the previous lazy-bailout
// instruction for patching the code here.
int current_pc = masm()->pc_offset();
=======================================
--- /branches/bleeding_edge/src/compiler/js-generic-lowering.cc Fri Oct 24
12:39:49 2014 UTC
+++ /branches/bleeding_edge/src/compiler/js-generic-lowering.cc Mon Oct 27
12:39:20 2014 UTC
@@ -19,7 +19,7 @@
JSGenericLowering::JSGenericLowering(CompilationInfo* info, JSGraph*
jsgraph)
: info_(info),
jsgraph_(jsgraph),
- linkage_(new (jsgraph->zone()) Linkage(info)) {}
+ linkage_(new (jsgraph->zone()) Linkage(jsgraph->zone(), info)) {}
void JSGenericLowering::PatchOperator(Node* node, const Operator* op) {
=======================================
--- /branches/bleeding_edge/src/compiler/linkage.cc Sun Oct 26 10:44:57
2014 UTC
+++ /branches/bleeding_edge/src/compiler/linkage.cc Mon Oct 27 12:39:20
2014 UTC
@@ -39,28 +39,30 @@
}
-Linkage::Linkage(CompilationInfo* info) : info_(info) {
+CallDescriptor* Linkage::ComputeIncoming(Zone* zone, CompilationInfo*
info) {
if (info->function() != NULL) {
// If we already have the function literal, use the number of
parameters
// plus the receiver.
- incoming_ = GetJSCallDescriptor(1 +
info->function()->parameter_count());
- } else if (!info->closure().is_null()) {
+ return GetJSCallDescriptor(1 + info->function()->parameter_count(),
zone);
+ }
+ if (!info->closure().is_null()) {
// If we are compiling a JS function, use a JS call descriptor,
// plus the receiver.
SharedFunctionInfo* shared = info->closure()->shared();
- incoming_ = GetJSCallDescriptor(1 + shared->formal_parameter_count());
- } else if (info->code_stub() != NULL) {
+ return GetJSCallDescriptor(1 + shared->formal_parameter_count(), zone);
+ }
+ if (info->code_stub() != NULL) {
// Use the code stub interface descriptor.
CallInterfaceDescriptor descriptor =
info->code_stub()->GetCallInterfaceDescriptor();
- incoming_ = GetStubCallDescriptor(descriptor);
- } else {
- incoming_ = NULL; // TODO(titzer): ?
+ return GetStubCallDescriptor(descriptor, 0, CallDescriptor::kNoFlags,
zone);
}
+ return NULL; // TODO(titzer): ?
}
-FrameOffset Linkage::GetFrameOffset(int spill_slot, Frame* frame, int
extra) {
+FrameOffset Linkage::GetFrameOffset(int spill_slot, Frame* frame,
+ int extra) const {
if (frame->GetSpillSlotCount() > 0 || incoming_->IsJSFunctionCall() ||
incoming_->kind() == CallDescriptor::kCallAddress) {
int offset;
@@ -87,24 +89,22 @@
}
-CallDescriptor* Linkage::GetJSCallDescriptor(int parameter_count) {
- return GetJSCallDescriptor(parameter_count, this->info_->zone());
+CallDescriptor* Linkage::GetJSCallDescriptor(int parameter_count) const {
+ return GetJSCallDescriptor(parameter_count, zone_);
}
CallDescriptor* Linkage::GetRuntimeCallDescriptor(
Runtime::FunctionId function, int parameter_count,
- Operator::Properties properties) {
- return GetRuntimeCallDescriptor(function, parameter_count, properties,
- this->info_->zone());
+ Operator::Properties properties) const {
+ return GetRuntimeCallDescriptor(function, parameter_count, properties,
zone_);
}
CallDescriptor* Linkage::GetStubCallDescriptor(
CallInterfaceDescriptor descriptor, int stack_parameter_count,
- CallDescriptor::Flags flags) {
- return GetStubCallDescriptor(descriptor, stack_parameter_count, flags,
- this->info_->zone());
+ CallDescriptor::Flags flags) const {
+ return GetStubCallDescriptor(descriptor, stack_parameter_count, flags,
zone_);
}
=======================================
--- /branches/bleeding_edge/src/compiler/linkage.h Tue Sep 30 10:29:32 2014
UTC
+++ /branches/bleeding_edge/src/compiler/linkage.h Mon Oct 27 12:39:20 2014
UTC
@@ -129,16 +129,18 @@
private:
friend class Linkage;
- Kind kind_;
- MachineType target_type_;
- LinkageLocation target_loc_;
- MachineSignature* machine_sig_;
- LocationSignature* location_sig_;
- size_t js_param_count_;
- Operator::Properties properties_;
- RegList callee_saved_registers_;
- Flags flags_;
- const char* debug_name_;
+ const Kind kind_;
+ const MachineType target_type_;
+ const LinkageLocation target_loc_;
+ const MachineSignature* const machine_sig_;
+ const LocationSignature* const location_sig_;
+ const size_t js_param_count_;
+ const Operator::Properties properties_;
+ const RegList callee_saved_registers_;
+ const Flags flags_;
+ const char* const debug_name_;
+
+ DISALLOW_COPY_AND_ASSIGN(CallDescriptor);
};
DEFINE_OPERATORS_FOR_FLAGS(CallDescriptor::Flags)
@@ -161,25 +163,28 @@
// Call[Runtime] CEntryStub, arg 1, arg 2, arg 3, [...], fun, #arg,
context
class Linkage : public ZoneObject {
public:
- explicit Linkage(CompilationInfo* info);
- explicit Linkage(CompilationInfo* info, CallDescriptor* incoming)
- : info_(info), incoming_(incoming) {}
+ Linkage(Zone* zone, CompilationInfo* info)
+ : zone_(zone), incoming_(ComputeIncoming(zone, info)) {}
+ Linkage(Zone* zone, CallDescriptor* incoming)
+ : zone_(zone), incoming_(incoming) {}
+
+ static CallDescriptor* ComputeIncoming(Zone* zone, CompilationInfo*
info);
// The call descriptor for this compilation unit describes the locations
// of incoming parameters and the outgoing return value(s).
- CallDescriptor* GetIncomingDescriptor() { return incoming_; }
- CallDescriptor* GetJSCallDescriptor(int parameter_count);
+ CallDescriptor* GetIncomingDescriptor() const { return incoming_; }
+ CallDescriptor* GetJSCallDescriptor(int parameter_count) const;
static CallDescriptor* GetJSCallDescriptor(int parameter_count, Zone*
zone);
- CallDescriptor* GetRuntimeCallDescriptor(Runtime::FunctionId function,
- int parameter_count,
- Operator::Properties
properties);
+ CallDescriptor* GetRuntimeCallDescriptor(
+ Runtime::FunctionId function, int parameter_count,
+ Operator::Properties properties) const;
static CallDescriptor* GetRuntimeCallDescriptor(
Runtime::FunctionId function, int parameter_count,
Operator::Properties properties, Zone* zone);
CallDescriptor* GetStubCallDescriptor(
CallInterfaceDescriptor descriptor, int stack_parameter_count = 0,
- CallDescriptor::Flags flags = CallDescriptor::kNoFlags);
+ CallDescriptor::Flags flags = CallDescriptor::kNoFlags) const;
static CallDescriptor* GetStubCallDescriptor(
CallInterfaceDescriptor descriptor, int stack_parameter_count,
CallDescriptor::Flags flags, Zone* zone);
@@ -192,37 +197,37 @@
MachineSignature* sig);
// Get the location of an (incoming) parameter to this function.
- LinkageLocation GetParameterLocation(int index) {
+ LinkageLocation GetParameterLocation(int index) const {
return incoming_->GetInputLocation(index + 1); // + 1 to skip target.
}
// Get the machine type of an (incoming) parameter to this function.
- MachineType GetParameterType(int index) {
+ MachineType GetParameterType(int index) const {
return incoming_->GetInputType(index + 1); // + 1 to skip target.
}
// Get the location where this function should place its return value.
- LinkageLocation GetReturnLocation() {
+ LinkageLocation GetReturnLocation() const {
return incoming_->GetReturnLocation(0);
}
// Get the machine type of this function's return value.
- MachineType GetReturnType() { return incoming_->GetReturnType(0); }
+ MachineType GetReturnType() const { return incoming_->GetReturnType(0); }
// Get the frame offset for a given spill slot. The location depends on
the
// calling convention and the specific frame layout, and may thus be
// architecture-specific. Negative spill slots indicate arguments on the
// caller's frame. The {extra} parameter indicates an additional offset
from
// the frame offset, e.g. to index into part of a double slot.
- FrameOffset GetFrameOffset(int spill_slot, Frame* frame, int extra = 0);
-
- CompilationInfo* info() const { return info_; }
+ FrameOffset GetFrameOffset(int spill_slot, Frame* frame, int extra = 0)
const;
static bool NeedsFrameState(Runtime::FunctionId function);
private:
- CompilationInfo* info_;
- CallDescriptor* incoming_;
+ Zone* const zone_;
+ CallDescriptor* const incoming_;
+
+ DISALLOW_COPY_AND_ASSIGN(Linkage);
};
} // namespace compiler
=======================================
--- /branches/bleeding_edge/src/compiler/mips/code-generator-mips.cc Tue
Oct 14 17:26:14 2014 UTC
+++ /branches/bleeding_edge/src/compiler/mips/code-generator-mips.cc Mon
Oct 27 12:39:20 2014 UTC
@@ -709,7 +709,7 @@
__ MultiPush(saves);
}
} else if (descriptor->IsJSFunctionCall()) {
- CompilationInfo* info = linkage()->info();
+ CompilationInfo* info = this->info();
__ Prologue(info->IsCodePreAgingActive());
frame()->SetRegisterSaveAreaSize(
StandardFrameConstants::kFixedFrameSizeFromFp);
@@ -942,7 +942,7 @@
void CodeGenerator::EnsureSpaceForLazyDeopt() {
int space_needed = Deoptimizer::patch_size();
- if (!linkage()->info()->IsStub()) {
+ if (!info()->IsStub()) {
// Ensure that we have enough space after the previous lazy-bailout
// instruction for patching the code here.
int current_pc = masm()->pc_offset();
=======================================
--- /branches/bleeding_edge/src/compiler/pipeline.cc Mon Oct 27 09:36:51
2014 UTC
+++ /branches/bleeding_edge/src/compiler/pipeline.cc Mon Oct 27 12:39:20
2014 UTC
@@ -397,7 +397,7 @@
PhaseScope phase_scope(pipeline_statistics.get(), "change lowering");
SourcePositionTable::Scope pos(data.source_positions(),
SourcePosition::Unknown());
- Linkage linkage(info());
+ Linkage linkage(data.graph_zone(), info());
ValueNumberingReducer vn_reducer(data.graph_zone());
SimplifiedOperatorReducer simple_reducer(data.jsgraph());
ChangeLowering lowering(data.jsgraph(), &linkage);
@@ -452,7 +452,7 @@
Handle<Code> code = Handle<Code>::null();
{
// Generate optimized code.
- Linkage linkage(info());
+ Linkage linkage(data.instruction_zone(), info());
code = GenerateCode(&linkage, &data);
info()->SetCode(code);
}
@@ -552,14 +552,13 @@
{
int node_count = sequence.VirtualRegisterCount();
if (node_count > UnallocatedOperand::kMaxVirtualRegisters) {
-
linkage->info()->AbortOptimization(kNotEnoughVirtualRegistersForValues);
+ info()->AbortOptimization(kNotEnoughVirtualRegistersForValues);
return Handle<Code>::null();
}
ZonePool::Scope zone_scope(data->zone_pool());
- RegisterAllocator allocator(zone_scope.zone(), &frame, linkage->info(),
- &sequence);
+ RegisterAllocator allocator(zone_scope.zone(), &frame, info(),
&sequence);
if (!allocator.Allocate(data->pipeline_statistics())) {
-
linkage->info()->AbortOptimization(kNotEnoughVirtualRegistersRegalloc);
+ info()->AbortOptimization(kNotEnoughVirtualRegistersRegalloc);
return Handle<Code>::null();
}
if (FLAG_trace_turbo) {
@@ -582,7 +581,7 @@
Handle<Code> code;
{
PhaseScope phase_scope(data->pipeline_statistics(), "generate code");
- CodeGenerator generator(&frame, linkage, &sequence);
+ CodeGenerator generator(&frame, linkage, &sequence, info());
code = generator.GenerateCode();
}
if (profiler_data != NULL) {
=======================================
--- /branches/bleeding_edge/src/compiler/x64/code-generator-x64.cc Tue Oct
21 06:59:50 2014 UTC
+++ /branches/bleeding_edge/src/compiler/x64/code-generator-x64.cc Mon Oct
27 12:39:20 2014 UTC
@@ -766,7 +766,7 @@
frame()->SetRegisterSaveAreaSize(register_save_area_size);
}
} else if (descriptor->IsJSFunctionCall()) {
- CompilationInfo* info = linkage()->info();
+ CompilationInfo* info = this->info();
__ Prologue(info->IsCodePreAgingActive());
frame()->SetRegisterSaveAreaSize(
StandardFrameConstants::kFixedFrameSizeFromFp);
@@ -992,7 +992,7 @@
void CodeGenerator::EnsureSpaceForLazyDeopt() {
int space_needed = Deoptimizer::patch_size();
- if (!linkage()->info()->IsStub()) {
+ if (!info()->IsStub()) {
// Ensure that we have enough space after the previous lazy-bailout
// instruction for patching the code here.
int current_pc = masm()->pc_offset();
=======================================
--- /branches/bleeding_edge/test/cctest/compiler/codegen-tester.h Wed Sep
10 12:23:45 2014 UTC
+++ /branches/bleeding_edge/test/cctest/compiler/codegen-tester.h Mon Oct
27 12:39:20 2014 UTC
@@ -66,7 +66,7 @@
CallDescriptor* call_descriptor = this->call_descriptor();
Graph* graph = this->graph();
CompilationInfo info(graph->zone()->isolate(), graph->zone());
- Linkage linkage(&info, call_descriptor);
+ Linkage linkage(graph->zone(), call_descriptor);
Pipeline pipeline(&info);
code_ = pipeline.GenerateCodeForMachineGraph(&linkage, graph,
schedule);
}
=======================================
--- /branches/bleeding_edge/test/cctest/compiler/function-tester.h Tue Oct
21 12:16:37 2014 UTC
+++ /branches/bleeding_edge/test/cctest/compiler/function-tester.h Mon Oct
27 12:39:20 2014 UTC
@@ -221,7 +221,7 @@
CHECK(Compiler::EnsureDeoptimizationSupport(&info));
Pipeline pipeline(&info);
- Linkage linkage(&info);
+ Linkage linkage(info.zone(), &info);
Handle<Code> code = pipeline.GenerateCodeForMachineGraph(&linkage,
graph);
CHECK(!code.is_null());
function->ReplaceCode(*code);
=======================================
--- /branches/bleeding_edge/test/cctest/compiler/graph-builder-tester.cc
Fri Sep 12 11:59:26 2014 UTC
+++ /branches/bleeding_edge/test/cctest/compiler/graph-builder-tester.cc
Mon Oct 27 12:39:20 2014 UTC
@@ -36,7 +36,7 @@
if (code_.is_null()) {
Zone* zone = graph_->zone();
CompilationInfo info(zone->isolate(), zone);
- Linkage linkage(&info,
+ Linkage linkage(zone,
Linkage::GetSimplifiedCDescriptor(zone, machine_sig_));
Pipeline pipeline(&info);
code_ = pipeline.GenerateCodeForMachineGraph(&linkage, graph_);
=======================================
--- /branches/bleeding_edge/test/cctest/compiler/test-changes-lowering.cc
Wed Oct 15 11:38:04 2014 UTC
+++ /branches/bleeding_edge/test/cctest/compiler/test-changes-lowering.cc
Mon Oct 27 12:39:20 2014 UTC
@@ -125,7 +125,7 @@
void LowerChange(Node* change) {
// Run the graph reducer with changes lowering on a single node.
CompilationInfo info(this->isolate(), this->zone());
- Linkage linkage(&info);
+ Linkage linkage(this->zone(), &info);
ChangeLowering lowering(&jsgraph, &linkage);
GraphReducer reducer(this->graph());
reducer.AddReducer(&lowering);
=======================================
--- /branches/bleeding_edge/test/cctest/compiler/test-codegen-deopt.cc Tue
Oct 21 14:44:50 2014 UTC
+++ /branches/bleeding_edge/test/cctest/compiler/test-codegen-deopt.cc Mon
Oct 27 12:39:20 2014 UTC
@@ -66,7 +66,7 @@
}
// Initialize the codegen and generate code.
- Linkage* linkage = new (scope_->main_zone()) Linkage(&info);
+ Linkage* linkage = new (scope_->main_zone()) Linkage(info.zone(),
&info);
code = new
v8::internal::compiler::InstructionSequence(scope_->main_zone(),
graph,
schedule);
SourcePositionTable source_positions(graph);
@@ -88,7 +88,7 @@
<< *code;
}
- compiler::CodeGenerator generator(&frame, linkage, code);
+ compiler::CodeGenerator generator(&frame, linkage, code, &info);
result_code = generator.GenerateCode();
#ifdef OBJECT_PRINT
=======================================
--- /branches/bleeding_edge/test/cctest/compiler/test-instruction.cc Tue
Oct 21 12:38:46 2014 UTC
+++ /branches/bleeding_edge/test/cctest/compiler/test-instruction.cc Mon
Oct 27 12:39:20 2014 UTC
@@ -31,7 +31,7 @@
graph(zone()),
schedule(zone()),
info(static_cast<HydrogenCodeStub*>(NULL), main_isolate()),
- linkage(&info),
+ linkage(zone(), &info),
common(zone()),
code(NULL) {}
=======================================
--- /branches/bleeding_edge/test/cctest/compiler/test-linkage.cc Wed Sep 3
10:13:21 2014 UTC
+++ /branches/bleeding_edge/test/cctest/compiler/test-linkage.cc Mon Oct 27
12:39:20 2014 UTC
@@ -45,7 +45,7 @@
InitializedHandleScope handles;
Handle<JSFunction> function = Compile("a + b");
CompilationInfoWithZone info(function);
- Linkage linkage(&info);
+ Linkage linkage(info.zone(), &info);
}
@@ -60,7 +60,7 @@
Handle<JSFunction> function = v8::Utils::OpenHandle(
*v8::Handle<v8::Function>::Cast(CompileRun(sources[i])));
CompilationInfoWithZone info(function);
- Linkage linkage(&info);
+ Linkage linkage(info.zone(), &info);
CallDescriptor* descriptor = linkage.GetIncomingDescriptor();
CHECK_NE(NULL, descriptor);
@@ -76,7 +76,7 @@
TEST(TestLinkageCodeStubIncoming) {
Isolate* isolate = CcTest::InitIsolateOnce();
CompilationInfoWithZone info(static_cast<HydrogenCodeStub*>(NULL),
isolate);
- Linkage linkage(&info);
+ Linkage linkage(info.zone(), &info);
// TODO(titzer): test linkage creation with a bonafide code stub.
// this just checks current behavior.
CHECK_EQ(NULL, linkage.GetIncomingDescriptor());
@@ -87,7 +87,7 @@
HandleAndZoneScope handles;
Handle<JSFunction> function = Compile("a + c");
CompilationInfoWithZone info(function);
- Linkage linkage(&info);
+ Linkage linkage(info.zone(), &info);
for (int i = 0; i < 32; i++) {
CallDescriptor* descriptor = linkage.GetJSCallDescriptor(i);
=======================================
---
/branches/bleeding_edge/test/cctest/compiler/test-simplified-lowering.cc
Thu Oct 23 14:40:43 2014 UTC
+++
/branches/bleeding_edge/test/cctest/compiler/test-simplified-lowering.cc
Mon Oct 27 12:39:20 2014 UTC
@@ -61,7 +61,7 @@
Zone* zone = this->zone();
CompilationInfo info(zone->isolate(), zone);
Linkage linkage(
- &info, Linkage::GetSimplifiedCDescriptor(zone,
this->machine_sig_));
+ zone, Linkage::GetSimplifiedCDescriptor(zone, this->machine_sig_));
ChangeLowering lowering(&jsgraph, &linkage);
GraphReducer reducer(this->graph());
reducer.AddReducer(&lowering);
=======================================
---
/branches/bleeding_edge/test/unittests/compiler/change-lowering-unittest.cc
Mon Oct 20 11:26:23 2014 UTC
+++
/branches/bleeding_edge/test/unittests/compiler/change-lowering-unittest.cc
Mon Oct 27 12:39:20 2014 UTC
@@ -69,7 +69,7 @@
JSOperatorBuilder javascript(zone());
JSGraph jsgraph(graph(), common(), &javascript, &machine);
CompilationInfo info(isolate(), zone());
- Linkage linkage(&info);
+ Linkage linkage(zone(), &info);
ChangeLowering reducer(&jsgraph, &linkage);
return reducer.Reduce(node);
}
=======================================
---
/branches/bleeding_edge/test/unittests/compiler/instruction-selector-unittest.cc
Fri Oct 24 09:36:40 2014 UTC
+++
/branches/bleeding_edge/test/unittests/compiler/instruction-selector-unittest.cc
Mon Oct 27 12:39:20 2014 UTC
@@ -36,8 +36,7 @@
}
EXPECT_NE(0, graph()->NodeCount());
int initial_node_count = graph()->NodeCount();
- CompilationInfo info(test_->isolate(), test_->zone());
- Linkage linkage(&info, call_descriptor());
+ Linkage linkage(test_->zone(), call_descriptor());
InstructionSequence sequence(test_->zone(), graph(), schedule);
SourcePositionTable source_position_table(graph());
InstructionSelector selector(test_->zone(), &linkage, &sequence,
schedule,
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.