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

Unified Diff: src/compiler/structured-machine-assembler.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 | « src/compiler/structured-machine-assembler.h ('k') | src/compiler/x64/code-generator-x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/structured-machine-assembler.cc
diff --git a/src/compiler/structured-machine-assembler.cc b/src/compiler/structured-machine-assembler.cc
index 56da5fb1af21a04fe8f15191a1b6d5772e22f69f..6475809e0e8e2c0f52b77cf27000f593b870a712 100644
--- a/src/compiler/structured-machine-assembler.cc
+++ b/src/compiler/structured-machine-assembler.cc
@@ -17,23 +17,26 @@ void Variable::Set(Node* value) const { smasm_->SetVariable(offset_, value); }
StructuredMachineAssembler::StructuredMachineAssembler(
- Graph* graph, MachineCallDescriptorBuilder* call_descriptor_builder,
- MachineType word)
+ Graph* graph, MachineSignature* machine_sig, MachineType word)
: GraphBuilder(graph),
schedule_(new (zone()) Schedule(zone())),
machine_(zone(), word),
common_(zone()),
- call_descriptor_builder_(call_descriptor_builder),
+ machine_sig_(machine_sig),
+ call_descriptor_(
+ Linkage::GetSimplifiedCDescriptor(graph->zone(), machine_sig)),
parameters_(NULL),
current_environment_(new (zone())
Environment(zone(), schedule()->start(), false)),
number_of_variables_(0) {
- Node* s = graph->NewNode(common_.Start(parameter_count()));
+ int param_count = static_cast<int>(parameter_count());
+ Node* s = graph->NewNode(common_.Start(param_count));
graph->SetStart(s);
if (parameter_count() == 0) return;
- parameters_ = zone()->NewArray<Node*>(parameter_count());
- for (int i = 0; i < parameter_count(); ++i) {
- parameters_[i] = NewNode(common()->Parameter(i), graph->start());
+ parameters_ = zone()->NewArray<Node*>(param_count);
+ for (size_t i = 0; i < parameter_count(); ++i) {
+ parameters_[i] =
+ NewNode(common()->Parameter(static_cast<int>(i)), graph->start());
}
}
@@ -49,8 +52,8 @@ Schedule* StructuredMachineAssembler::Export() {
}
-Node* StructuredMachineAssembler::Parameter(int index) {
- DCHECK(0 <= index && index < parameter_count());
+Node* StructuredMachineAssembler::Parameter(size_t index) {
+ DCHECK(index < parameter_count());
return parameters_[index];
}
« no previous file with comments | « src/compiler/structured-machine-assembler.h ('k') | src/compiler/x64/code-generator-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698