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

Unified Diff: src/compiler/raw-machine-assembler.cc

Issue 1412243017: [turbofan] Tiny cleanup in RawMachineAssembler constructor. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@local_cleanup-raw-machine-assembler-call-function-stub
Patch Set: Created 5 years, 1 month 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') | no next file » | 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 ab118ed9a77d91ef0b4ad1a1a1b36a13b6105747..d658c294d9bdcf28feef6d5a09b330b39d2da5ca 100644
--- a/src/compiler/raw-machine-assembler.cc
+++ b/src/compiler/raw-machine-assembler.cc
@@ -22,14 +22,11 @@ RawMachineAssembler::RawMachineAssembler(Isolate* isolate, Graph* graph,
machine_(zone(), word, flags),
common_(zone()),
call_descriptor_(call_descriptor),
- parameters_(nullptr),
+ parameters_(parameter_count(), zone()),
current_block_(schedule()->start()) {
int param_count = static_cast<int>(parameter_count());
- // Add an extra input node for the JSFunction parameter to the start node.
- Node* s = graph->NewNode(common_.Start(param_count + 1));
- graph->SetStart(s);
- if (parameter_count() == 0) return;
- parameters_ = zone()->NewArray<Node*>(param_count);
+ // Add an extra input for the JSFunction parameter to the start node.
+ graph->SetStart(graph->NewNode(common_.Start(param_count + 1)));
for (size_t i = 0; i < parameter_count(); ++i) {
parameters_[i] =
AddNode(common()->Parameter(static_cast<int>(i)), graph->start());
« no previous file with comments | « src/compiler/raw-machine-assembler.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698