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

Unified Diff: src/compiler/raw-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/raw-machine-assembler.h ('k') | src/compiler/structured-machine-assembler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/raw-machine-assembler.cc
diff --git a/src/compiler/raw-machine-assembler.cc b/src/compiler/raw-machine-assembler.cc
index 395c96e875a2186002a1a7af23244fd670aec717..329d8deada710d926740db43f3eba3cba03bdac5 100644
--- a/src/compiler/raw-machine-assembler.cc
+++ b/src/compiler/raw-machine-assembler.cc
@@ -10,23 +10,27 @@ namespace v8 {
namespace internal {
namespace compiler {
-RawMachineAssembler::RawMachineAssembler(
- Graph* graph, MachineCallDescriptorBuilder* call_descriptor_builder,
- MachineType word)
+RawMachineAssembler::RawMachineAssembler(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),
exit_label_(schedule()->end()),
current_block_(schedule()->start()) {
- 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());
}
}
@@ -42,8 +46,8 @@ Schedule* RawMachineAssembler::Export() {
}
-Node* RawMachineAssembler::Parameter(int index) {
- DCHECK(0 <= index && index < parameter_count());
+Node* RawMachineAssembler::Parameter(size_t index) {
+ DCHECK(index < parameter_count());
return parameters_[index];
}
@@ -95,17 +99,18 @@ Node* RawMachineAssembler::CallFunctionStub0(Node* function, Node* receiver,
Node* RawMachineAssembler::CallJS0(Node* function, Node* receiver,
- Node* frame_state) {
+ Node* context, Node* frame_state) {
CallDescriptor* descriptor = Linkage::GetJSCallDescriptor(1, zone());
Node* call = graph()->NewNode(common()->Call(descriptor), function, receiver,
- frame_state);
+ context, frame_state);
schedule()->AddNode(CurrentBlock(), call);
return call;
}
Node* RawMachineAssembler::CallRuntime1(Runtime::FunctionId function,
- Node* arg0, Node* frame_state) {
+ Node* arg0, Node* context,
+ Node* frame_state) {
CallDescriptor* descriptor = Linkage::GetRuntimeCallDescriptor(
function, 1, Operator::kNoProperties, zone());
@@ -113,7 +118,6 @@ Node* RawMachineAssembler::CallRuntime1(Runtime::FunctionId function,
Node* ref = NewNode(
common()->ExternalConstant(ExternalReference(function, isolate())));
Node* arity = Int32Constant(1);
- Node* context = Parameter(1);
Node* call = graph()->NewNode(common()->Call(descriptor), centry, arg0, ref,
arity, context, frame_state);
« no previous file with comments | « src/compiler/raw-machine-assembler.h ('k') | src/compiler/structured-machine-assembler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698