Index: test/cctest/compiler/graph-builder-tester.cc |
diff --git a/test/cctest/compiler/graph-builder-tester.cc b/test/cctest/compiler/graph-builder-tester.cc |
index fb6e4a28ce9a8d1ff795c89c72d23618cd37d7ab..a22e7e17a65ceb5ba3eb780a94ed62021a591ec5 100644 |
--- a/test/cctest/compiler/graph-builder-tester.cc |
+++ b/test/cctest/compiler/graph-builder-tester.cc |
@@ -9,10 +9,8 @@ namespace v8 { |
namespace internal { |
namespace compiler { |
-MachineCallHelper::MachineCallHelper(Zone* zone, |
- MachineCallDescriptorBuilder* builder) |
- : CallHelper(zone->isolate()), |
- call_descriptor_builder_(builder), |
+MachineCallHelper::MachineCallHelper(Zone* zone, MachineSignature* machine_sig) |
+ : CallHelper(zone->isolate(), machine_sig), |
parameters_(NULL), |
graph_(NULL) {} |
@@ -21,9 +19,10 @@ void MachineCallHelper::InitParameters(GraphBuilder* builder, |
CommonOperatorBuilder* common) { |
DCHECK_EQ(NULL, parameters_); |
graph_ = builder->graph(); |
- if (parameter_count() == 0) return; |
- parameters_ = graph_->zone()->NewArray<Node*>(parameter_count()); |
- for (int i = 0; i < parameter_count(); ++i) { |
+ int param_count = static_cast<int>(parameter_count()); |
+ if (param_count == 0) return; |
+ parameters_ = graph_->zone()->NewArray<Node*>(param_count); |
+ for (int i = 0; i < param_count; ++i) { |
parameters_[i] = builder->NewNode(common->Parameter(i), graph_->start()); |
} |
} |
@@ -35,7 +34,8 @@ byte* MachineCallHelper::Generate() { |
if (code_.is_null()) { |
Zone* zone = graph_->zone(); |
CompilationInfo info(zone->isolate(), zone); |
- Linkage linkage(&info, call_descriptor_builder_->BuildCallDescriptor(zone)); |
+ Linkage linkage(&info, |
+ Linkage::GetSimplifiedCDescriptor(zone, machine_sig_)); |
Pipeline pipeline(&info); |
code_ = pipeline.GenerateCodeForMachineGraph(&linkage, graph_); |
} |
@@ -43,21 +43,10 @@ byte* MachineCallHelper::Generate() { |
} |
-void MachineCallHelper::VerifyParameters(int parameter_count, |
- MachineType* parameter_types) { |
- CHECK_EQ(this->parameter_count(), parameter_count); |
- const MachineType* expected_types = |
- call_descriptor_builder_->parameter_types(); |
- for (int i = 0; i < parameter_count; i++) { |
- CHECK_EQ(expected_types[i], parameter_types[i]); |
- } |
-} |
- |
- |
-Node* MachineCallHelper::Parameter(int offset) { |
+Node* MachineCallHelper::Parameter(size_t index) { |
DCHECK_NE(NULL, parameters_); |
- DCHECK(0 <= offset && offset < parameter_count()); |
- return parameters_[offset]; |
+ DCHECK(index < parameter_count()); |
+ return parameters_[index]; |
} |
} // namespace compiler |