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

Unified Diff: test/cctest/compiler/graph-builder-tester.cc

Issue 530783002: Convert Linkage to use MachineSignature. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebase. Created 6 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/cctest/compiler/graph-builder-tester.h ('k') | test/cctest/compiler/test-codegen-deopt.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « test/cctest/compiler/graph-builder-tester.h ('k') | test/cctest/compiler/test-codegen-deopt.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698